Closed Thread
Results 1 to 7 of 7

Thread: Python on Vista :(

  1. #1
    Will.S Guest

    Python on Vista :(

    I just started using Python yesterday and have already ran into a few walls. I'm using a tutorial by Alan Gauld and at first everything worked fine. It wasn't until I came to the part about running your python program through the window's command prompt that i ran into an issue... I finally found out how you make python run using the command prompt (Editing the Path in Environmental Variables), but I have yet figured out how to make my simple program execute. Any help at all would be greatly appreciated. Maybe I should use a different tutorial (one specific to Vista)? Thanks for your time.

  2. CODECALL Circuit advertisement

     
  3. #2
    PythonPower's Avatar
    PythonPower is offline Programming Professional
    Join Date
    Feb 2009
    Posts
    228
    Rep Power
    13

    Re: Python on Vista :(

    Say you make a file on your desktop called test.py with the text:

    Code:
    print('hi!'
    Then open the console and type:

    Code:
    cd desktop 
    So that it display something like:

    C:\Users\PythonPower\Desktop>
    Then you can run your file by typing either:

    Code:
    python test.py 
    Code:
    python3 test.py 

  4. #3
    Will.S Guest

    Re: Python on Vista :(

    Thanks for the advice, but i won't be able to try it out until I get home, I'm at work right now lol.

  5. #4
    Will.S Guest

    Re: Python on Vista :(

    ok so I finally had time to try it out and when I type cd desktop in my command prompt I get the following message.

    The system cannot find the path specified.

    The spelling is correct and typed exactly how you typed it... So what did I do wrong?

  6. #5
    psam is offline Learning Programmer
    Join Date
    Jun 2009
    Posts
    34
    Rep Power
    10

    Re: Python on Vista :(

    Try writing this on the command prompt "set path=%path%;C:\python26".

  7. #6
    MrJoey is offline Newbie
    Join Date
    Jan 2009
    Location
    Bristol, UK
    Posts
    18
    Rep Power
    0

    Re: Python on Vista :(

    You might have to navigate to the directory which contains it first.. I know that's how it's done in ubuntu anyway. You can't ./filename.pyc unless you're in the directory which contains the program.. like I said, that's how it goes with ubuntu (I think? I'm still quite new with ubuntu, there may be a way..) but I don't have any experience with Python on a Windows OS.

    EDIT: Ignore my post.. I didn't realise your error was from 'cd desktop'

  8. #7
    ImTheMessenger's Avatar
    ImTheMessenger is offline Learning Programmer
    Join Date
    Dec 2009
    Location
    Virginia
    Posts
    30
    Rep Power
    0

    Re: Python on Vista :(

    well when i use python off command prompt (which i do rarely) i usually do the regular run as... , CMD, then i type python in the Command Prompt then usually it comes up with___ Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information.___
    and then the usual >>> where i can just put print "hello world"
    however for some reason i don't think i'm getting the nature of your question just right...

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Python and Windows Vista
    By abdulrauf in forum Python
    Replies: 2
    Last Post: 02-12-2011, 01:50 AM
  2. Replies: 11
    Last Post: 07-31-2010, 12:52 AM
  3. Python for vista
    By micheal knight in forum Computer Software/OS
    Replies: 13
    Last Post: 11-01-2008, 06:28 PM
  4. Vista prying on us!!!Another reason not to use vista
    By Chinmoy in forum Technology Ramble
    Replies: 3
    Last Post: 04-22-2008, 11:19 AM

Tags for this Thread

Bookmarks

Posting Permissions

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