Can a Python script be invoked like a exe?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bkunjitam
    New Member
    • Nov 2006
    • 17

    Can a Python script be invoked like a exe?

    Hi,

    I have a file say GUI.py which on executing (F5 in IDLE) would display the GUI with some check buttons, text field.

    Is there any way that the same script be invoked like a exe file.
    Something like double clicking an exe.

    If yes, then how do i do that?

    Kindly help me in this regard.

    thanks,
    BK
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Originally posted by bkunjitam
    Hi,

    I have a file say GUI.py which on executing (F5 in IDLE) would display the GUI with some check buttons, text field.

    Is there any way that the same script be invoked like a exe file.
    Something like double clicking an exe.

    If yes, then how do i do that?

    Kindly help me in this regard.

    thanks,
    BK
    Check out this thread: http://www.thescripts.com/forum/thread578225.html

    Comment

    • dshimer
      Recognized Expert New Member
      • Dec 2006
      • 136

      #3
      Because of impatience with some snags that my own poor coding probably caused that resulted in my having problems with py2exe (which I really liked), I have started using PyInstaller. For what I was doing it was just a couple of minutes from download to my first exe, and I have been quite pleased with the ease and results.

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by bkunjitam
        Hi,

        I have a file say GUI.py which on executing (F5 in IDLE) would display the GUI with some check buttons, text field.

        Is there any way that the same script be invoked like a exe file.
        Something like double clicking an exe.

        If yes, then how do i do that?

        Kindly help me in this regard.

        thanks,
        BK
        To be able to double-click an icon to make your scipt run (my system is set to do this), use Explorer:Tools: Folder Options:File Types tab; select PY and Change to Python. You may also use Advanced to set additional things (Edit with IDLE) which you access with right-click.

        Please be kind enough to post a reply saying what works or doesn't work for you.

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          Originally posted by bartonc
          To be able to double-click an icon to make your scipt run (my system is set to do this), use Explorer:Tools: Folder Options:File Types tab; select PY and Change to Python. You may also use Advanced to set additional things (Edit with IDLE) which you access with right-click.

          Please be kind enough to post a reply saying what works or doesn't work for you.
          If you don't need to see output and/or the command screen bugs you, you can set PYW to pythonw and save you files as .pyw (python without output window). Then when you double-click then they look just like a Window program (especially if you use wxPython as you GUI toolkit).

          Comment

          Working...