sgzwiz / pyscripter

Automatically exported from code.google.com/p/pyscripter
1 stars 2 forks source link

Crash when running twice a PyQt example #719

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install PyQt4 (Windows x86 version for Python 2.7 32-bit)
2. Create a new document and paste the following code:

#!/usr/bin/env python
# -*- coding: latin1 -*-

import sys
from PyQt4 import QtGui, QtCore

app = QtGui.QApplication(sys.argv)
push = QtGui.QPushButton("Botao")

push.show()

app.exec_()

2. Run the code. The program works fine. Close the window
3. Run the code again. PyScripter closes itself.

What is the expected output? What do you see instead?
The script should run twice without crashing the editor.

What version of the product are you using? On what operating system?
Version 2.5.3.0(x86) on Windows 7 x64.

Original issue reported on code.google.com by mateusa...@gmail.com on 12 Jan 2013 at 2:05

GoogleCodeExporter commented 9 years ago
Are you using the remote interpreter?
Run, Python Engine, Remote.

Do you have Tools, Option, IDE Options, Interpreter, Reinitialize before run on?
Should be on by default.

Original comment by pyscripter on 23 Mar 2015 at 2:32

GoogleCodeExporter commented 9 years ago
In my case all options is default.
Try both Python interpreter.

Original comment by bugraz...@gmail.com on 30 Mar 2015 at 8:18

GoogleCodeExporter commented 9 years ago
- Make sure you use the remote engine.  Run, Python, Engine Remote.
- Make sure you reinitialize the remote engine before each Run.  Tools, 
Options, IDE Options, Python Interpreter, Reinitialize before each run.

Then it should run smoothly.

See also https://code.google.com/p/pyscripter/wiki/RemoteEngines

Original comment by pyscripter on 30 Mar 2015 at 8:29

GoogleCodeExporter commented 9 years ago
Running PyScripter engine in Remote(Tk) solved the problem for me.

Original comment by glen.l...@gmail.com on 30 Mar 2015 at 10:07

GoogleCodeExporter commented 9 years ago
The remote engine should just work fine.  It is important to reinitialize the 
remote engine before each run.

For PyQt code completion see 
https://groups.google.com/forum/?hl=en#!topic/pyscripter/cx4Ah15cb4E

Original comment by pyscripter on 30 Mar 2015 at 10:23