79 questions
5
votes
1
answer
343
views
How to do infinite (or really deep) recursions in Stackless Python?
I know standard CPython has a limit on recursion depth, less than 1000 I think, so the below example code will fail with a "maximum recursion depth exceeded" error.
def rec_add(x):
if x == 0:
...
1
vote
2
answers
3k
views
Embedded python not picking up PYTHONPATH
I have a really weird problem with embedding python. If I don't specify PYTHONPATH, Py_Initialize fails with ImportError: No module named site.
If I set PYTHONPATH in cmd and then run my program, it ...
3
votes
1
answer
483
views
parallel computations with task manager
I need to run some parallel computations in python. The only compatible approach I can think of is the multiprocess/fork model, which is less than ideal for several reasons:
from what I understand, ...
1
vote
1
answer
1k
views
Couldn't find index page for 'stackless_installer_c4_win32' (maybe misspelled?)
I am trying to install stackless python. I have tried
pip install stackless-python
easy_install stackless-python
python -m pip install stackless-python
I have done all these and also the same with an ...
1
vote
0
answers
108
views
Factory returning boost exposed python object seg faults
I am having a wicked problem with exposing a polymorphic class hierarchy via a factory. I have created an example that demonstrates the problem.
This is all being hosted in a executable with an ...
0
votes
0
answers
235
views
stackless python and multiprocessing slowdown
I have a program that runs multiple tasklets using stackless python, and my problem is that though it is fast, I do notice a slowdown if I start one or more processes that run the same code.
For ...
1
vote
1
answer
62
views
python program without stackless.run()
How the below program execute my member A.fun without calling stackless.run() in the program?
import stackless
class A:
def __init__(self,name):
self.name = name
self.ch = ...
3
votes
1
answer
135
views
Sleep instead of thread.join() for platform legacy reasons
Working on a git fork of someone's code, I came across the following, there to halt the master thread until such a time as all the sub-threads are done:
while(True):
if not any([thread.isAlive() ...
1
vote
0
answers
67
views
How robust is `func(*argument)`? [duplicate]
In python, you can expand a sequence into discrete function arguments with the star operator:
args = [2, 3]
print(pow(*args)) # same as `print(pow(2, 3))`
There's even a nice idiom for transposing a ...
1
vote
1
answer
170
views
Create tasklets at runtime
Just starting with Stackless Python. I'm trying to create some tasklets at run time, that is, after calling stackless.run(). I thought this function wouldn't block the main thread, so I would be able ...
2
votes
0
answers
51
views
How can I use stackless python on heroku?
I'm trying to use stackless python for a heroku app, but they don't support the runtime:
! Requested runtime (stackless-3.3.5) was not found.
This is surprising, since stackless-3.3.5 was ...
3
votes
2
answers
265
views
Aren't Python tasklets breaking the rule of no "GOTO"?
I've made a huge google research about Stackless Python's tasklets.
Every source mentions it as a thread
stackless.com : Microthreads: tasklets wrap functions allowing them to be launched as ...
0
votes
2
answers
129
views
stackless python constructor
import stackless
class MyTasklet(stackless.tasklet):
def __init__(self, func, msg):
pass
def foo():
pass
msg = 'hello'
MyTasklet(foo, msg)()
I am using stackless python, this code ...
1
vote
0
answers
513
views
PyCharm can't resolve stackless
I am using PyCharm 3 on OS X. I've configured a Python Stackless binary in virtual env to be used as a project interpreter. It runs okay, and imports stackless module, but in the editor it is showed ...
0
votes
2
answers
761
views
Install Stackless without uninstalling Python
It seems like on Windows I have to uninstall Python before installing stackless (http://stackless.com/wiki/Download). I have Python 2.7 installed, a solution may be installing Stackless Python 3.2, ...