The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Running Python scripts?

Discussion in 'General Discussion' started by Jeff75, May 2, 2006.

  1. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I have a client who wants to use a python script to generate a sitemap for Google. I don't allow clients access via SSH and was wondering if there is anyway that this script could be run directly through a browser or without requiring SSH access?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Depends entirely on who the script should be initiated. If it's meant to be run from shell, then presumably, it would be easiest to run it from a cron job. Simply enough to run any script in shell from a perl or php web script:

    Code:
    #!/usr/bin/perl
    print "content-type: text/html\n\n";
    print "Running python script";
    system ("/usr/bin/python /path/to/script.py");
    
     
  3. Mejoramos.com

    Mejoramos.com Member

    Joined:
    Feb 11, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page