Tim N. van der Leeuw
I already posted a bug about this (id: 1114635) b/c that's what the feature-list told me to do, but I wanted to ask on the forum too: the "restore PYTHONPATH" button in the pydev project properties doesn't work.
I have pydev 0.8.5, eclipse 3.0.1, java jdk 1.5.0, and BOTH Python 2.3.4 and Python 2.4 installed.
In the preferences, under pydev / debug, I configured the Python 2.4 version. (I also had Python 2.3.4 configured there; I removed that entry just in case it caused problems but it made no difference to have just one entry there)
I would like to have a PYTHONPATH for Python 2.4
Any hints why it doesn't work? Where to find out what could cause the problems?
Is your python shell configured properly?
In window->preferences->pydev->debug, if python is not in your path, it must be properly configured.
Python is not in my path; in the pydev / debug dialog I entered the path to Python 2.4 executable. (I can run my program using this entry, so it's the right path.)
Initially I had two entries there: python2.3, and python2.4
After removing the python2.3 entry it still didn't work (but I didn't restart Eclipse after doing so; might that make a difference?)
It would be nice if in the pydev / debug dialog you can select one Python runtime as your default runtime. Then when creating a new launch configuration, this default runtime can instantly be selected too. (Shall I file a RFE for that?)
Actually, the default is the one that is in the top of the list... You don't have to restart it, but you must kill the python shells that are already started (it usually creates 2 shells, one used for code compleiton and the other for refactoring/find)
If you do it, it will restart them when needed.
(or you could restart eclipse - should have the same effect).
If it still does not work, please contact me again.
I meanwhile restarted Eclipse, and no luck -- it didn't work :-(
The Python2.4 path was at the top btw, and is now the only entry.
Meanwhile in another thread I found the hint to open the Error Log View, and I see there a large number of errors failing to connect to the Python process, and indeed there is no running Python process! The path in there points to Python2.4 and looks correct.
Any hints what to do next? Clues why Python isn't running? (Should I use pythonw.exe on windows, instead of python.exe?)
thanks a lot,
I think actually, that Python is started but bails out with an error. However, I don't know how to catch that error.
I never see anything like a console-window showing me an error message...
Another message! I tried to put Python2.3 at the top and now I get the PYTHONPATH. But it's the python2.3 pythonpath and I want the python2.4 pythonpath!
(And unfortunately I cannot edit the entries in the pythonpath, only add or remove them)
Any hints to get this feature to work with python2.4?
Actually it would be very nice if it would be possible to select the preferred Python runtime per project.
Cheers and thanks a lot for your help!
I managed to get some steps further, by following another hint found in the forum, to remove .pyc files... Then Python 2.4 does suddenly work...
But my next problem is: when trying to get the popup menu of completions, python.exe crashes! Does it with python 2.3.4, python 2.3.5rc1, and python 2.4.0!
(Guess I'll somehow have to inform the python crowd of these problems)
I'm trying to get the code-completions for PyGtk modules, which is when it crashes.
Sorry... forgot about it... next build, probably tomorrow will have it fixed.
does it work with other modules?
only in pygtk it crashes? exactly how does that happen?
In my code I import the modules pygtk, gtk.
When I try auto-completion on the pygtk module, no problems.
As soon as I try auto-completion on the gtk module, I get a crash of the python.exe (with a send/don't send message from winxp).
I do still get the auto-completion popup, but incomplete (missing a number of methods / constants, perhaps even most of them).
I didn't observe any crashes of python.exe with other modules, but then, I didn't try any other (binary/DLL loaded) modules.
Thanks a lot for your attention to my problem!
Hi Tim, well, it seems that it has something to do with gtk then. Could you report that as a bug? - it is a better way of keeping track of it - and we can keep the discussion there, where this belongs.
p.s.I use some dlls in my project and didn't have any problems so far... So, it seems it is something related to gtk itself...
Tim N. van der Leeuw
Before filing a bug report:
I looked at the drwatson stacktrace and it does seem that the bug is in GTK. Since I can use PyGTK for a number of basic things and can use dir(gtk) to get the list of symbols in the 'gtk' module of PyGtk, I do wonder what it exactly is that pydev does when the crash occurs.
Perhaps you can point me to the right source file / line number for that?
Forget my last request, I already found a reproduction recipe:
st_list = dir(gtk)
for st in st_list:
print 'Found string:', st
print 'Object:', getattr(gtk, st) # This will crash somewhere in GTK dll
Leaves the question if this problem is with PyGtk, or Gtk.