Jump to content

Recommended Posts

Hi,

 

I have part of a server only, and I want to create a sitemap using Google's sitemap generator (python).

 

However, I don't know whether the server has python installed, and which command would run it if it is.

 

Does anyone know how I can find out, and whether, if I just try to run the file, I would do any damage if it isn't installed (I presume not).

 

Thanks

Emma

If you have access to a shell, type...

 

python -v

 

This will determin if Python is installed (its pretty standard on most Linux systems these days).

 

No shell acccess? Put this in a php page.

 

<?php

  $out = shell_exec('python -v');
  echo "<pre>$out</pre>";

?>

Howvever, just because Python is installed does not mean mod_python is built into Apache. You'd need to contact your host to see I think.

Thanks a lot. I think you saved me loads of time - the php page comes back blank ($out is '') so I guess python is not installed (?). Alternatively, perhaps the server is operating in "safe mode" which i keep reading about.

 

In which case, I presume I couldn't run a python script on it anyway. I guess I'll have to make a sitemap some other way.

 

If any of this sounds wrong, please let me know! Otherwise, thanks again for your help.

 

Emma

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.