|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
getting a python SPE up and running (newbie)
Hi,
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) I've installed: 1) Python 2.32 2) wxPythonWIN32-2.5.1.5-Py23.exe 3) SPE-0[1].4.2.a-wx2.4.2.4.-bl2.28c.exe 4) boa-constructor-0.2.3.win32.exe 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: //------------------------------------------------- C:\Python23\Lib\site-packages\spe>spe_.py 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 s_t_a_n_i@yahoo.com Importing modules... 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 ? import parentInit File "C:\PYTHON23\Lib\site-packages\spe\framework\parentInit.py", line 22, in ? import dropTarget,help File "C:\PYTHON23\Lib\site-packages\spe\framework\dropTarget.py", line 11, in ? from wxPython.wx import wx ImportError: cannot import name wx //------------------------------------------------- Help appreciated greetings Patrick PS some background: I am experienced in PHP. Javascript/actionscript and a bit of VB. Last edited by cuboctahedron : April 5th, 2004 at 04:35 PM. |
|
#2
|
|||
|
|||
|
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 2.4.2.4 (the version prior to 2.5.1.5) 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 2.4.2.4, and see if that works. Dave - The Developers' Coach Last edited by DevCoach : April 5th, 2004 at 05:51 PM. |
|
#3
|
|||
|
|||
|
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? gr Patrick |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
I'm using wxPython 2.4.2.4 with Boa and that works too. The Boa program is Boa.pyw.
Asuming your Python install is on C: drive: C:\Python23\Lib\site-packages\wxPython\tools\boa\Docs\boa\guide will show you what is what. Grim
__________________
*** Experimental Python Markup CGI V2 *** |
|
#6
|
|||
|
|||
|
I uninstalled and reinstalled wxPhyton v2.4.24 and the IDE interface shows.
![]() Just 3 more newbie questions 1) 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) thanks Patrick Last edited by cuboctahedron : April 6th, 2004 at 11:55 AM. |
|
#7
|
||||
|
||||
|
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 01:45 PM. |
|
#8
|
|||
|
|||
|
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? thanks Patrick 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 03:22 PM. |
|
#9
|
||||
|
||||
|
Quote:
Correct. Quote:
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. |
|
#10
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > getting a python IDE up and running (newbie) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|