Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-27 Thread Dave Angel
On 2:59 PM, Roy Hinkelman wrote: I am posting here as well as a PHP list since I am now getting an odd python error. Rance: Thanks for the note. I get the same error with system or exec or passthru Now, this is very strange. I made the command line string more explicit, and now it recognizes

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-26 Thread Roy Hinkelman
t & Management 707-774-7411 r...@worldtradepress.com www.WorldTradePress.com (main website) www.StockMapAgency.com (3700+ Antique & Modern Maps) www.BestCountryReports.com (country reports for 175 countries) www.GiantMapArt.com (giant wall maps) www.WorldTradeRef.com (t

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-26 Thread Emile van Sebille
On 10/26/2010 12:55 PM Roy Hinkelman said... I am posting here as well as a PHP list since I am now getting an odd python error. The traceback of the python error would help us diagnose the problem but it's not been included. Can you paste in the actual traceback? Emile __

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-26 Thread Roy Hinkelman
;Variables' count = 0 for ea in sys.argv: if ea == '-c': city = sys.argv[count+1] elif ea == '-s': state = sys.argv[count+1] count+=1 _result = str(weatherSmall(city,state)) #print _result [/code] Roy Hinkelman Technical Services Website Development & Manag

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-23 Thread Emile van Sebille
On 10/22/2010 11:28 AM Roy Hinkelman said... My script doesn't want to recognize the variables from the exec() command in PHP. Plus, it won't capture the results of the script. This Python script works in IDLE, and I've got some testing code in there. If your python code works and you're havi

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-22 Thread Steven D'Aprano
On Sat, 23 Oct 2010 05:52:06 am Roy Hinkelman wrote: > My script doesn't want to recognize the variables from the exec() > command in PHP. Plus, it won't capture the results of the script. "My script"? What are you talking about? You have at least two -- a PHP script and a Python script. If you'r

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-22 Thread bob gailer
On 10/22/2010 2:52 PM, Roy Hinkelman wrote: My script doesn't want to recognize the variables from the exec() command in PHP. Plus, it won't capture the results of the script. This is a pretty vague description of the problem. Please provide explicit details. This Python script works in