By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

Can't import Stackless in Pythonwin

P: n/a
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
>>>import stackless
If I start pythonwin I get the following error
....No Module named Stackless

Any help?

Feb 9 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
En Fri, 09 Feb 2007 13:50:56 -0300, <ar*******@gmail.comescribió:
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
>>>import stackless

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"

--
Gabriel Genellina

Feb 9 '07 #2

P: n/a
On Feb 9, 2:06 pm, "Gabriel Genellina" <gagsl...@yahoo.com.arwrote:
En Fri, 09 Feb 2007 13:50:56 -0300, <archae...@gmail.comescribió:
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
>>import stackless
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"

--
Gabriel Genellina
Ok, for Idle I get:
IDLE 1.2
>>import sys
print sys.version
2.5 Stackless 3.1b3 060516 (python-2.5:53557:53567, Jan 25 2007,
22:01:46) [MSC v.1310 32 bit (Intel)]
>>print sys.executable
C:\Python25\pythonw.exe
>>>
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
Feb 10 '07 #3

P: n/a
ar*******@gmail.com wrote:
....
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:ti****@stackless.com>
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/
Sep 21 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.