no trace of PyRun_SimpleString() ???

2007-04-18 Thread iwl
Hi, it seems like I can't trace scripts run by PyRun_SimpleString(): a=0 def test(frame, event, arg): global a a+=1 import sys sys.settrace(test) print a print a print a -> 0 0 0 Does anybody know how I can get something similar with the C-Funcs for Tracing?? -- http://mail.python.org/mail

BUG?: Saving empty array in shelve

2007-04-02 Thread iwl
Hi, I've tryed to save some data containing empty arrays (array('f')) in a shelve. It looks like the shelve has some problems with empty arrays, get allways: TypeError: ("'NoneType' object is not iterable", , ('f', None))- Messages when dealing with the readed back shelve. Seems like I have to avo

Re: askstring Window to the top under Windows

2007-03-07 Thread iwl
On 7 Mrz., 02:49, jim-on-linux <[EMAIL PROTECTED]> wrote: > On Tuesday 06 March 2007 08:13, iwl wrote: > > > Hi, > > > I tryed askstring to input some text in my > > script, but some ugly empty Window appears with > > the Input-Window behind and all together

Re: askstring Window to the top under Windows

2007-03-06 Thread iwl
On 6 Mrz., 14:48, "Tim Golden" <[EMAIL PROTECTED]> wrote: > On Mar 6, 1:13 pm, "iwl" <[EMAIL PROTECTED]> wrote: > > It's not clear whether you're talking about the usual > "Why do I get a DOS window when I run my python script?"

askstring Window to the top under Windows

2007-03-06 Thread iwl
Hi, I tryed askstring to input some text in my script, but some ugly empty Window appears with the Input-Window behind and all together behind my Console showing my script. So all have to brought to the top first by the user - very unconfortable -- http://mail.python.org/mailman/listinfo/python-

Creating arrays (builtin) in C Extensions

2007-02-28 Thread iwl
Hello, there is an builtin documented array module in phyton, but no documentation how such an array can be created in C-Extension functions. So I have to use Lists at time, but this is I think inefficient with large data sets. Is there some interface aviable which I can link to my Programm witho

predefined empty base class ??

2007-01-17 Thread iwl
Hi, is there an predefined empty base class which I can instanziate to have an container i can copy attributes in? -- http://mail.python.org/mailman/listinfo/python-list

PyThreadState_SetAsyncExc (nThreadId ??????, exc);

2006-12-14 Thread iwl
what is the nThreadId-Parameter of PyThreadState_SetAsyncExc? I try to implement a Terminate-Button in my C-Prog for my embedded Python, but its hard to find an example how to stop an interpreter running in an thread. I found no other Python C-App-Func returning such a parameter. -- http://mail

Re: Using Py_InitModule3 -> [Linker Error] Unresolved external '_Py_InitModule4TraceRefs'

2006-12-09 Thread iwl
Fredrik Lundh schrieb: > > you've mixed components compiled with Py_TRACE_REFS with components that > aren't compiled with Py_TRACE_REFS. don't do that. > H'm does this mean I have to write something like #define Py_TRACE_REFS befor I include > (what is it with you C programmers these days, btw

Using Py_InitModule3 -> [Linker Error] Unresolved external '_Py_InitModule4TraceRefs'

2006-12-08 Thread iwl
Hello I copied the code from the Extending Embedded Python section in the Python 2.5 but get an linker Error Unresolved external _Py_InitModule4TraceRefs. Who knows what's wrong? -- http://mail.python.org/mailman/listinfo/python-list

funcs without () like print

2006-12-07 Thread iwl
Hello can I make funktions callable without () like print at time the interpreter seems to printout the adres when I type the function without () -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedded python adding variables linking to C++-Variables / callbacks

2006-12-07 Thread iwl
[EMAIL PROTECTED] schrieb: > > Write some C functions -callable from Python- which will be used to get > and set the variable value. > >From inside Python, declare a property with getter and setter which > will call your C functions. > This works fine for object attributes. If you want to trap ref

Embedded python adding variables linking to C++-Variables / callbacks

2006-12-07 Thread iwl
Hello, I would like to add Variables to my embedded python which represents variables from my C++-Programm. I found C-Api-funcs for adding my C-Funcs to python but none to add variables. I would like some C-Function is called when the added Python-varible is set (LValue) and some other when it is

PyRun_SimpleString no sys.argv[0]

2006-12-06 Thread iwl
Hello, I'm just starting with Python - would like to embed it in my windows-programm as an script-processor. For tests I use easygui some easy-wrapper for the py-tck-stuff. PyRun_SimpleString("from easygui import *\n"); PyRun_SimpleString("import sys\n"); PyRun_SimpleString("msgbox()\n"); Tra