Find the answer to your Linux question:
Results 1 to 3 of 3
How do i run a python script from a C program or shell script?...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Location
    bangalore
    Posts
    38

    to run python script

    How do i run a python script from a C program or shell script?

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    1) Make the first line of the script #! /usr/bin/python
    2) Make the file executable: chmod u+x filename.
    2) Put it in a directory on your command path, e.g. $HOME/bin.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined! geniuz's Avatar
    Join Date
    Mar 2008
    Location
    Netherlands, Europe
    Posts
    71
    If you have python installed, you could also just do: "python youpythonscript.py".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...