Can't import Stackless in Pythonwin

A

archaegeo

I am getting started in Python, and I have looked on both the
stackless page and python.org and cannot find the answer to what I
think is a simple problem.

If I start the python command line or idle, i can
If I start pythonwin I get the following error
....No Module named Stackless

Any help?
 
G

Gabriel Genellina

I am getting started in Python, and I have looked on both the
stackless page and python.org and cannot find the answer to what I
think is a simple problem.

If I start the python command line or idle, i can

If I start pythonwin I get the following error
...No Module named Stackless

Any help?

Maybe they are different versions, or installed on different places.

In those three environments, execute:

import sys
print sys.version
print sys.executable

All should report the same version.
The executables for both python and IDLE should reside on the same
directory; for pythonwin, you should get the *same* directory plus
"Lib\site-packages\pythonwin\Pythonwin.exe"
 
A

archaegeo

Maybe they are different versions, or installed on different places.

In those three environments, execute:

import sys
print sys.version
print sys.executable

All should report the same version.
The executables for both python and IDLE should reside on the same
directory; for pythonwin, you should get the *same* directory plus
"Lib\site-packages\pythonwin\Pythonwin.exe"

Ok, for Idle I get:
IDLE 1.22.5 Stackless 3.1b3 060516 (python-2.5:53557:53567, Jan 25 2007,
22:01:46) [MSC v.1310 32 bit (Intel)]
And for the command line i get the same thing except the executable is
python.exe

But for pythonwin i get
import sys
print sys.version 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
print sys.executable C:\Python25\Lib\site-packages\pythonwin\Pythonwin.exe

So does this mean stackless is not usable with pythonwin?

Also, is pythonwin needed for the win32 extensions and mfc?

Thanks
 
C

Christian Tismer

But for pythonwin i get
import sys
print sys.version 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
print sys.executable
C:\Python25\Lib\site-packages\pythonwinPythonwin.exe

So does this mean stackless is not usable with pythonwin?

Your python<version>.dll needs to live in your <windows>\system32
directory (or in the current directory if you are running
stackless temporarily).

If things are set up properly, you will
be able to import stackless from PythonWin.

Be aware of Stackless not being very stable on PythonWin, cause
it creates a new interpreter state after every input.
It works to some extent, but I did not test this for a longer time.
Also, it is quite likely that the debugger gets confused by tasklet
switching.

It seems to work pretty stable with wxpython and Boa constructor.
wxpython has a few problems, too, but they are easy to work around.
Contact me privately or on the stackless list if you need support.
Also, is pythonwin needed for the win32 extensions and mfc?

yes.

cheers - chris
--
Christian Tismer :^) <mailto:[email protected]>
tismerysoft GmbH : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Pythonwin 7
Stackless python and microthreads 28
Can't understand code 2
Stackless Python 4
Alternatives to Stackless Python? 11
import serial failure 2
Cannot import cookies 0
PythonWin 3

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top