"Kann Vearasilp" wrote
I tested the complete java command via terminal and it worked fine.
The PNG image was created correctly.
So as your user account with your local environment set up, it worked.
I tested the python package using python shell ...
and the PNG image was created
And in y
Hi All,
I apologize for now being specific enough. The testing environment was
actually "django ver. 1.2" which is a CMS based on python codes; so, I
figured it's python related and want to post my question here as well.
Anyway, Here is a more detail about what I have facing now. The java
script
Kann Vearasilp wrote:
Dear all,
I tried using python to execute some external java program in my code.
My problem is the os.system(cmd) was not working properly while
Define "not working properly".
My guess is that you're probably getting an exception
OSError: [Errno 2] No such file or dire
Hi Kann,
So you are saying that you printed your command, then ran it at the
terminal prompt, and it ran ok?
You might want to look at the subprocess library so that you can collect
stderr from the process. The online documentation is great, with lots of
examples.
BTW, on your line 6, you str(s
Hi Kann,
I haven't looked at your problem closely but you might need to
explicitly tell Python where to output stderr/stdout. I just ran
os.system('ls -al') on my Linux box and it seems to print both
stderr/stdout to my terminal. The return value is the return code of
the process (might be differe
Dear all,
I tried using python to execute some external java program in my code.
My problem is the os.system(cmd) was not working properly while
executing 'java' from terminal worked just fine. I am not sure what is
wrong here. Is there a way to print out/detect error in my code for
this case?
>>