Re: Using a dictionary to pass data to/from embedded python functions

2006-08-13 Thread Alex Martelli
Bill Pursell <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > > > I wrote the following file za.c: > > > > > and proceeded to compile and execute as follows: [[Note: it does not > > matter that I'm using 2.5, the code is just as fine with previous > > versions -- it just happens that 2.5 i

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-13 Thread Bill Pursell
Alex Martelli wrote: > > I wrote the following file za.c: > and proceeded to compile and execute as follows: [[Note: it does not > matter that I'm using 2.5, the code is just as fine with previous > versions -- it just happens that 2.5 is what I'm using right now in > order to help out with 2.5

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-12 Thread Alex Martelli
wardm <[EMAIL PROTECTED]> wrote: > Thanks again for your help, I agree, it seems I need to read a good book on > Python. > > One last question, will Python allow me to add new items to > InterfaceModule.VarDictionary > from the Python functions I call ? Yes, no problem with that. Alex -- htt

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-12 Thread wardm
Thanks again for your help, I agree, it seems I need to read a good book on Python. One last question, will Python allow me to add new items to InterfaceModule.VarDictionary from the Python functions I call ? "Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > wardm

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-12 Thread Alex Martelli
wardm <[EMAIL PROTECTED]> wrote: > Thanks Alex for your help, (and advice on focusing the point of my > question). > > I was able to compile and run your example OK, but when I try to use the > "VarDictionary" in the > MyScriptModule.py code, I get an exception. > > I added the following code

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-12 Thread wardm
Thanks Alex for your help, (and advice on focusing the point of my question). I was able to compile and run your example OK, but when I try to use the "VarDictionary" in the MyScriptModule.py code, I get an exception. I added the following code to the C app just to add two entries to the Dict

Re: Using a dictionary to pass data to/from embedded python functions

2006-08-12 Thread Alex Martelli
wardm <[EMAIL PROTECTED]> wrote: > I have created a Dict object in a C++ App that calls (embedded) Python > functions. [[snip snip]] > This python code throws an exception when it attempts to access the > "VarDictionary". > Does anyone know why this fails ? It fails due to some code of yours t

Using a dictionary to pass data to/from embedded python functions

2006-08-11 Thread wardm
I have created a Dict object in a C++ App that calls (embedded) Python functions. The Dict is to be used to pass variable data between the C++ App and the python functions. However I cannot get the Python functions to 'see' the Dict created in the C++ App. The C++ app creates the Dict using th