Re: exec a string in an embedded environment

2006-01-17 Thread Tommy Ryding
No it didn't help me :( the foo_ptr that is returned from PyRun_String is not a callable object. Therefor I can't call it from PyObject_Call. I would like to do the exact same procedure as I do when the code is located in a module (file). pModule = PyImport_Import(pName);

Re: exec a string in an embedded environment

2006-01-17 Thread Tommy Ryding
I can't post that much of what I have done but some questions might answer if you e-mail me the question to my gmail.com address. [EMAIL PROTECTED] //Tommy -- http://mail.python.org/mailman/listinfo/python-list

typo in the documentation or am I stupid?

2005-11-03 Thread Tommy . Ryding
In the embedding Python manual at Python.org an example is presented that uses the function: PyDict_GetAttrString. Is it possible that this is a typo? I have searched the source code and I can't find it, I have also used google and I only get 4 hits. In for example Programming Python another

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Tommy . Ryding
I have done the same thing in my organisation. Show them concrete examples of when they can benefit from Python to Convince them. My colleagues and bosses has been conviced and therefore my current work task is to integrate the interpreter in a VxWorks environment so everyone at the company can

Re: global interpreter lock

2005-10-19 Thread Tommy . Ryding
Thanks, PyThread_release_lock() is implemented in all thread_xxx.h files. So I thought right but specified my question like a stupid ;) //T -- http://mail.python.org/mailman/listinfo/python-list

global interpreter lock

2005-10-18 Thread Tommy . Ryding
I just need confirmation that I think right. Is the files thread_xxx.h (xxx = nt, os2 or whatever) responsible for the global interpreter lock in a multithreaded environment? I'm currently writing my own thread_VW for VxWorks, thats why I'm asking. //Tommy --

Re: Controlling memory allocation

2005-09-06 Thread Tommy . Ryding
Yep! I redirect Free, Realloc and Malloc. (calloc is never used by Python). The more I thoug... That could be a possible problem. I will look in to it today and try and find out if that occurs and in that case how often. //T -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling memory allocation

2005-09-05 Thread Tommy . Ryding
Hello. I have done the thing you are requesting. You can easily create your own memory pool and have Python to use it. I added some rows to Pyconfig.h: #ifdef malloc #undef malloc #endif /*malloc*/ #define malloc Python_malloc Then I have some overhead in my own Python_malloc(size_t nBytes)

Extend Python

2005-09-01 Thread Tommy . Ryding
Hi All I have a problem with extentions of Python. Background: I'm workin within a large industrial control system and I have created a Port for VxWorks. In the system we have different permissions depending on which state the controller is in. To perform some actions in some states may even

Re: Extend Python

2005-09-01 Thread Tommy . Ryding
What is Qt? I have looked at PyQT and I canĀ“t use it. I haven't tried it but the PyQT license makes the program useless. :( Any other suggestions? -- http://mail.python.org/mailman/listinfo/python-list

Embed Python

2005-05-17 Thread Tommy Ryding
Hi, Background: Im currently working on my own Python port for VxWorks this is part of my master thesis. What I want to do is to only to embed the interpreter and not the compiler. Both to save memory on the target device and to be get some security in the device. It is a mission critical device