FAQ
Im running Linux and I would like to run a filename.py file..how do I
go about running this program? through the command line ? I have
version 1.5.2 and I do not have the control to upgrade it. thanks

brent

Search Discussions

  • Steve Holden at Mar 27, 2002 at 8:55 pm
    "wilby31" <wilby31 at yahoo.com> wrote in message
    news:mailman.1017259391.21846.python-list at python.org...
    Im running Linux and I would like to run a filename.py file..how do I
    go about running this program? through the command line ? I have
    version 1.5.2 and I do not have the control to upgrade it. thanks
    Either:

    1: python filename.py arg1 arg2 ...

    or

    2: make sure your Python file begins with

    #!/usr/bin.env python

    then

    % chmod +x filename.py
    % filename.py arg1 arg2 ...

    regards
    Steve
  • Sean 'Shaleh' Perry at Mar 27, 2002 at 8:58 pm

    On 27-Mar-2002 wilby31 wrote:
    Im running Linux and I would like to run a filename.py file..how do I
    go about running this program? through the command line ? I have
    version 1.5.2 and I do not have the control to upgrade it. thanks
    make sure the first line of the file looks like:

    #!/usr/bin/python

    (the path may be different)

    then you do 'chmod +x filename.py'. Now you can run it by typing
    './filename.py' or '/path/to/filename.py'.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 27, '02 at 7:54p
activeMar 27, '02 at 8:58p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase