Running a Python Program

  • pleopard

    pleopard - 2006-09-28

    Pardon me for being such a noob but I have been unable to find any documentation at all that describes how to run a python program. Can someone help me?

    Also, assuming I have more than one python distribution installed, can I pick which distribution will be used? (I have Python 2.4.3 installed but I also use ppython from the Panda3D distribution).


    • Josiah Carlson

      Josiah Carlson - 2006-09-28
      1. Open up a command prompt or command shell.

      2. Use the 'cd' command to choose what directory your Python program is.

      3. Type in 'python' and hit enter, where 'file' is replaced by the name of your .py file.

      If python is not on your path, you may need to provide something like 'c:\python24\python', if you used the default Python installation path on Windows.

      If you don't want to have your program attached to a console, you can use 'pythonw'.

      If you need to have other similar questions answered, there is the mailing list.

      • pleopard

        pleopard - 2006-09-28

        I already know how to do that, I have been using Python for quite a while now. I want to be able to run the program I am editing in PyPE from within PyPE. It just seems that there would be a quick way to do this in PyPE by clicking on a button of some sort.

        For example, I have a customized M$ Developer Studio V6 to have an icon on the toolbar that I can click on and run the code in the current window.

        • Josiah Carlson

          Josiah Carlson - 2006-09-28

          There is macro in the 'macros/samples' subdirectory that offers the functionality.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks