April 5th, 2004, 04:19 PM
getting a python SPE up and running (newbie)
I've looked every where for several GUI for Python, but couldn't seem to start any of them (for Windows XP).
SPE seemed to be promising though.(looking at the screenshots)
1) Python 2.32
For items 3 and 4 (which suppose to be GUI's) I found that the instructions doesnt even tell me to start the GUI.(?)
Basically; I don't see an EXE file that starts an interface. If I browse to the directories I see only py files, an clicking on them start a dos prompt, and shuts it down again.
When I try to start SPE in a dos prompt I get:
Starting Spe v0.4.2.a ...
If spe fails to start:
- type "python SPE_.py --debug" at the command prompt
- send the error report to email@example.com
Traceback (most recent call last):
File "C:\Python23\Lib\site-packages\spe\SPE_.py", line 20, in ?
import framework.wxMDIParentFrame1 as wxMDIParentFrame1
File "C:\PYTHON23\Lib\site-packages\spe\framework\wxMDIParentFrame1.py", line
21, in ?
File "C:\PYTHON23\Lib\site-packages\spe\framework\parentInit.py", line 22, in
File "C:\PYTHON23\Lib\site-packages\spe\framework\dropTarget.py", line 11, in
from wxPython.wx import wx
ImportError: cannot import name wx
Last edited by cuboctahedron; April 5th, 2004 at 05:35 PM.
April 5th, 2004, 06:46 PM
You have found the right file to run. There should also be a file with a .pyw extension - if you double click on that it will run without opening a console window.
I think the problem you are having is that the latest version of wxPython is not backwards compatible with previous versions - I have Python 2.3.3, wxPython 126.96.36.199 (the version prior to 188.8.131.52) and SPE 0.4.2.c, and they work fine together.
wxPython has been going through a process of renaming the packages and classes, culminating in the current release. For this reason there is likely to be a lot of code broken by the new version, and is why I have not upgraded. Try uninistalling wxPython and installing 184.108.40.206, and see if that works.
Dave - The Developers' Coach
Last edited by DevCoach; April 5th, 2004 at 06:51 PM.
April 6th, 2004, 03:18 AM
Thanks for the answer Dave, I'll try it as soon I get home
I though Pyhton was suppose to be backwards-compatible?
Would this mean I'd have te rewrite code if a mayor upgrade happens?
April 6th, 2004, 03:26 AM
The problem is not with Python itself, but with the wxPython GUI framework.
Python itself has managed to keep a very high level of backwards compatibility over the years, despite significant changes and additions to the language.
Dave - The Developers' Coach
April 6th, 2004, 04:38 AM
I'm using wxPython 220.127.116.11 with Boa and that works too. The Boa program is Boa.pyw.
Asuming your Python install is on C: drive:
will show you what is what.
April 6th, 2004, 12:40 PM
I uninstalled and reinstalled wxPhyton v2.4.24 and the IDE interface shows.
Just 3 more newbie questions
I am looking for a 'hello world' tutorial in a GUI popup, but I can't find it anywhere; most information at http://www.wxpython.org/ seem to be focussed on more experienced users.
2) How do you compile a written application? (Some even say you need a C++ compiler?) I though Python could compile it's own files?, but I could find a menu option saying 'compile'.
3) It is mention that wxpython is "wxPython is a fine layer over the native GUI classes".
Does that mean the wxpython still depends largely on the native OS?
I ask this because I would like to create a cross-OS application, which will run on Unix,Linux Windows, (and Longhorn in the future)
Last edited by cuboctahedron; April 6th, 2004 at 12:55 PM.
April 6th, 2004, 02:40 PM
Glad you got things working.
If you are using Boa there is a tutorial in the Getting Started section of the Boa Help. (It was a little out of date last the last time I looked but it should show you the basics )
Don't worry about compiling stuff - it is complied automatically.
wxPython works well on all of those OS (Longhorn - who knows yet). By a thin wrapper - I think they mean a wxPython app will look like a native Linux or Windows application.
As a suggestion, try out your new setup with this code:
Another Thread If using the documentation you can work out what's going on then you have most of the principles sorted
Last edited by Grim Archon; April 6th, 2004 at 02:45 PM.
April 6th, 2004, 04:09 PM
It work, and indeed the hello word-ish tutorial I've done succesfully.
About the compiling:
What I meant was, the application I see, executes by pressing 'Myapp.py' , which I presume can only run because I have Python installed. Is it possible to make an executable from it (linux & Windows), so it could be run without having Python installed?
PS I saw 'py2exe' at http://starship.python.net/crew/theller/py2exe/
But is this the 'official' method to create a Window application? It does't look like a 'professional' tool?
Last edited by cuboctahedron; April 6th, 2004 at 04:22 PM.
April 6th, 2004, 07:37 PM
No, not really.
The only answer, as you've found, is Py2exe - and that just stuffs (Python.exe + yourprog.py) into one file, it doesn't compile anything.
I don't know quite why there isn't a compiler, just that no-one has created one.
April 7th, 2004, 05:05 AM
Generally, the fact that python is not compiled down to machine code will not be a problem. In the unlikely event that some of your program is too slow most times changing the algorithm is enough but you can turn portions into C code.
Py2exe does give the user an .exe file to run - there is no reason for the user to care. Don't forget that although your program is byte code, that byte code is used to call good
old-fashioned compiled C code.