caller process hangs
reidom1 at yahoo.com
Fri Dec 8 09:14:36 EST 2000
I have embedded python into a C program. From there I
have to call a python - script. Unfortunately,
whenever I do this, the script starts to run, but the
C programm hangs until the script is finished. I need
to have access to both programs at the same time. Is
there any way to do this. I'm running on a SGI machine
with python 1.6 (necessary). The code for the C
program looks like this (shortened):
#define R_ROUTINE "main"
int argc ;
char **argv ;
char *app_name = "vlo";
char *rsrc_name = "vlo";
char *top_menu = "menu";
and here's the code for the script, which itself calls
import os, string
# set v for Module-directory
v = 'mod'
# set s for startupfile
s = 'somefile.py'
a = os.environ['PYTHONPATH']
b = string.split(a, ':')
for i in b:
if i[-3:] == 'lib':
if string.find(i, v) > 0:
c = i
d = os.path.join(c, s)
os.system('python ' + d)
I've tried to do something with threads, or call a new
Shell, but to no effect.
Any help on this is greatly appreciated
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
More information about the Python-list