How to make executable file ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BOOGIEMAN

    #1

    How to make executable file ?

    Just how to make *.exe file from python code ??
    I typed this :

    a, b = 0, 1
    while b < 1000:
    print b,
    a, b = b, a+b

    and saved it as pyt.txt

    Now, how do I make pyt.exe file ???
    I want to run it on windows where isn't installed python.
  • Gian Mario Tagliaretti

    #2
    Re: How to make executable file ?

    BOOGIEMAN wrote:

    [...][color=blue]
    > and saved it as pyt.txt
    >[/color]

    Maybe pyt.py is better :)
    [color=blue]
    > Now, how do I make pyt.exe file ???
    > I want to run it on windows where isn't installed python.[/color]

    Have a look at py2exe:


    don't be scared when you see the dimension of the files...

    cheers
    --
    Gian Mario Tagliaretti
    PyGTK GUI programming

    Comment

    • BOOGIEMAN

      #3
      Re: How to make executable file ?

      On Sun, 02 Jan 2005 21:56:45 +0100, Gian Mario Tagliaretti wrote:
      [color=blue]
      > don't be scared when you see the dimension of the files...[/color]

      1.9 Mb for a console application ?!
      And is it possible to make Windows application ?
      I want to display results in windows message box.

      Comment

      • Maurice LING

        #4
        Re: How to make executable file ?

        Hi all,

        This may be OT but is there a way to do the same for *nix type of
        system? Like cast a python interpreter with scripts together?

        I'm running Mac OSX here.

        The only remote idea I have is to use jythonc to convert everything into
        ..class files and package that as a .jar file but I can't do that with C
        bindings.

        Any suggestions?

        Thanks,
        Maurice

        Comment

        • Tim Jarman

          #5
          Re: How to make executable file ?

          Maurice LING wrote:
          [color=blue]
          > Hi all,
          >
          > This may be OT but is there a way to do the same for *nix type of
          > system? Like cast a python interpreter with scripts together?
          >
          > I'm running Mac OSX here.
          >[/color]

          For OSX, google for py2app - for *nix in general, I believe freeze is your
          mman, although so many *nixen ship with Python these days it's not such an
          issue.

          --
          Website: www DOT jarmania FULLSTOP com

          Comment

          • Grant Edwards

            #6
            Re: How to make executable file ?

            On 2005-01-02, BOOGIEMAN <BOOGIEMANPN@YA HOO.COM> wrote:
            [color=blue][color=green]
            >> don't be scared when you see the dimension of the files...[/color]
            >
            > 1.9 Mb for a console application ?![/color]

            Yup. I know it's rather small for a Windows application.
            [color=blue]
            > And is it possible to make Windows application?[/color]

            Yes.
            [color=blue]
            > I want to display results in windows message box.[/color]

            --
            Grant Edwards grante Yow! Pardon me, but do you
            at know what it means to be
            visi.com TRULY ONE with your BOOTH!

            Comment

            • Alex Martelli

              #7
              Re: How to make executable file ?

              Maurice LING <mauriceling@ac m.org> wrote:
              [color=blue]
              > Hi all,
              >
              > This may be OT but is there a way to do the same for *nix type of
              > system? Like cast a python interpreter with scripts together?[/color]

              Yes, but fortunately on the Mac you don't need that.
              [color=blue]
              > I'm running Mac OSX here.[/color]

              Assuming we're talking Mac OS X 10.3 or later, Python itself comes with
              the operating system (it's used somewhere in stuff provided with the
              system, such as fax handling). As I saw others suggest, google for
              py2app, it's probably the best way to handle this for the Mac today.


              Alex

              Comment

              • Andrew Robert

                #8
                Re: How to make executable file ?

                BOOGIEMAN wrote:[color=blue]
                > Just how to make *.exe file from python code ??
                > I typed this :
                >
                > a, b = 0, 1
                > while b < 1000:
                > print b,
                > a, b = b, a+b
                >
                > and saved it as pyt.txt
                >
                > Now, how do I make pyt.exe file ???
                > I want to run it on windows where isn't installed python.[/color]

                You may want to try cx_freeze.

                Details on it can be found at


                Binaries are available for Linux and Windows.

                Alternately, source code is available if you need to compile it for a
                different platform.


                --
                Thank you,
                Andrew Robert

                E-mail: arobert@townisp .com
                Ur: http://shardservant.no-ip.info

                Comment

                • Catalin Lungu

                  #9
                  Re: How to make executable file ?

                  Also, you can try with py2exe. It's very easy.
                  Catalin.

                  "Andrew Robert" <arobert@townis p.com> escribió en el mensaje
                  news:10to3sve2n buraf@corp.supe rnews.com...[color=blue]
                  > BOOGIEMAN wrote:[color=green]
                  >> Just how to make *.exe file from python code ??
                  >> I typed this :
                  >>
                  >> a, b = 0, 1
                  >> while b < 1000:
                  >> print b,
                  >> a, b = b, a+b
                  >>
                  >> and saved it as pyt.txt
                  >>
                  >> Now, how do I make pyt.exe file ???
                  >> I want to run it on windows where isn't installed python.[/color]
                  >
                  > You may want to try cx_freeze.
                  >
                  > Details on it can be found at
                  > http://starship.python.net/crew/atuining/cx_Freeze/
                  >
                  > Binaries are available for Linux and Windows.
                  >
                  > Alternately, source code is available if you need to compile it for a
                  > different platform.
                  >
                  >
                  > --
                  > Thank you,
                  > Andrew Robert
                  >
                  > E-mail: arobert@townisp .com
                  > Ur: http://shardservant.no-ip.info[/color]


                  Comment

                  • Fuzzyman

                    #10
                    Re: How to make executable file ?

                    An alternative way is to use Movable Python. It's a frozen distribution
                    of python that can run without being 'installed'.

                    See http://sourceforge.net/projects/movpy

                    To display things in a 'window' you'll need to use a GUI toolkit like
                    Tkinter or wxPython.
                    Regards,

                    Fuzzy
                    http://www.voidspace.org.uk/python/index.shtml

                    Comment

                    Working...