#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Bombay, India
    Posts
    159
    Rep Power
    12

    Running from the command prompt


    Hi,
    I'm unable to run my programs from the command prompt. It has to be one stupid error for sure!

    Can anyone figure it out!

    C:\Python23\Scripts>python area.py
    'python' is not recognised as an internal or external command, operable program or batch file.

    Do I've to create a batch file or something in DOS. Whats the problem???

    Thanks & Rgds,
    Subha
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Just typing python only works if
    c:\python23 has been added to the PATH environment variable.
    Type:
    PATH
    at a command prompt to see what the path is set to. You can view/set the environment variables by
    right-clicking My Computer,click Properties, click Advanced, click Environment Variables - (its in System variables).

    Normally it is not set up so I usually type:
    c:\python23\python
    instead.
    grim
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Bombay, India
    Posts
    159
    Rep Power
    12
    But Grim, the PATH command shows me..........

    PATH=C:\PYTHON23\SCRIPTS

    So what more do I need to do??

    Thanks,
    Subha
  6. #4
  7. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    But......
    is that where the python.exe program is located?
    I think not - it should be located in c:\python23.
    Unless the c:\python23 directory is in the path then python.exe will not be found!

    grim
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Bombay, India
    Posts
    159
    Rep Power
    12
    Hey thanks soooooooo much Grim.
    I've got my mistake....its now working....thank you once again!!!!

    I know I'm really being silly...but pls bear my questions...

    Thanks,
    Subha

IMN logo majestic logo threadwatch logo seochat tools logo