code-google-com / blur-dev

Automatically exported from code.google.com/p/blur-dev
1 stars 0 forks source link

py script closes Python after it's executed #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Whenever I try to execute this script, Python (including IDLE) closes down
without any warnings or errors:

# Use the blur.wingui package vs. the default PyQt4 packages for windows
and dialogs
 # because these items contain 3dsMax specific code needed to run

 from blur.wingui import Dialog
 from PyQt4.QtGui import QPushButton

 # Create the dialog
 dialog = Dialog()
 button = QPushButton( dialog )
 button.setText( 'Test' )

 # Launch the dialog
 dialog.show()

Here are some machine/app specs:
- I'm using Windows XP Professional version.
- Python 2.6
- Max 2008 32 bit
- Installed Py3dsMax10_python24_x32_install_8678.exe
- Installed PyQt4-gpl-snapshot-20090412_win32-msvc2008.exe
- Installed blur_libs_install_8851_win32-msvc2008.exe
- Installed blur_pyqt_modules_install_8851_win32-msvc2008.exe
- Installed qt_install_4.5.2-1_win32-msvc2008.exe
- Installed Qt SDK: Complete Development Environment

I'm able to import blur and PyQt4 modules without problems. Let me know if
you need any more information.

Original issue reported on code.google.com by jasonla...@gmail.com on 1 Nov 2009 at 7:04

GoogleCodeExporter commented 9 years ago
Figured it out, was a problem on my end. This can be ignored and deleted. :)

Original comment by jasonla...@gmail.com on 2 Nov 2009 at 1:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This happens when running Qt code in Python before initializing a QApplication. 
 The 3dsMax example code has 
to be run from within 3dsMax - I am handling all the application initialization 
code in the 
[max]/scripts/python/__startup__.py file, but if you are going to run external 
code, then you'll need to initialize 
and manage your own QApplication instances.

Original comment by eric.hul...@gmail.com on 2 Nov 2009 at 3:38