Coming from Perl

Steve Holden steve at holdenweb.com
Tue Sep 18 09:30:39 EDT 2007


Amer Neely wrote:
> Bryan Olson wrote:
>> Amer Neely wrote:
>>> I don't have shell access but I can run 'which python' from a Perl 
>>> script, and I will try the different shebang line you suggested.
>> And after trying it, Amer Neely reported:
>>
>>> I tried `which python` and `whereis python` and got 0 back as a 
>>> result. So it seems Python is not installed at all.
>> Probably right, but just to be thorough...  Since you do not
>> have shell access, I'm guessing you are running these within
>> a Perl cgi script, and getting the results via a browser. Is
>> that right?
> 
> Yes.
>> Can you backtick other commands? What do you get if you run
>> `which perl` the same way? How about `whoami`, `whereis sh`,
>> and `which nosuchthingas5748614`? Can you list /, /bin and
>> /usr/bin?
> 
> I just looked at my code and tried something else:
> @SysCmd="which python";
> system(@SysCmd);
> 
> and it came back
> /usr/local/bin/python
> 
>> How did you learn that this system could run your Perl
>> scripts? Can that source give us anything to go on here?
>> If Python is not installed, do you have some avenue for
>> requesting it?
>>
>> We're down to long shots. Still, hosts that support Perl
>> but will not support Python are getting to be the rare.
>>
>>
> 
> I've asked my host to put in a request for it.
> 
> So it seems python IS installed, but not where I thought it was.
> 
> I just tried my script with the new path, but still got a 500 server 
> error. Can I trap errors to a file locally?
> 
You could try putting an ErrorLog directive in your local .htaccess file.

   http://httpd.apache.org/docs/1.3/logs.html#errorlog

regards
  Steve

-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline




More information about the Python-list mailing list