From: Riccardo T. <de...@em...> - 2007-01-20 18:53:45
|
Hi everybody, I'm quite a newbie with Python and I need to make an EXE of an application of mine that uses Tkinter. I checked the site but I didn't find what I was looking for and unfortunately I don't have much time to spend searching all the mailing lists to find answers right now. All the files of my application lie in a single directory. I have 3 pictures to load and one binary datafile;the rest are python source files. I used Tkinter, pickle and Numpy modules. What do I have to put in my setup.py to build a working exe? Where to specify the pictures and the dafafile? Where the modules?.. and yet.. if the Tkinter GUI I wrote is in a file different from the starting file of my application, what do I have to write under the "windows" option? I know I'm asking too many things at once.. but I really don't know where to start. I'd need an example of a setup file with all the features that my setup will request... do you know where I can find it? Thanks a Lot Regards Riccardo Taormina -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Crea il tuo sito web dinamico con PHP e MySQL - VideoCorso professionale direttamente nel tuo computer. Trucchi e segreti Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5142&d=20-1 |
From: jim-on-linux <in...@ve...> - 2007-01-21 15:25:57
|
On Saturday 20 January 2007 13:53, Riccardo Taormina wrote: > Hi everybody, > > I'm quite a newbie with Python and I need to > make an EXE of an application of mine that uses > Tkinter. I checked the site but I didn't find > what I was looking for and unfortunately I > don't have much time to spend searching all the > mailing lists to find answers right now. On your Win machine go to, \Python Lib\site-packages\py2exd\samples you should find most of what you want. Make a simple app and build on it. I found that if one has a specific problem, more people may be able to help. jim-on-linux http:\\www.inqvista/com > > All the files of my application lie in a single > directory. I have 3 pictures to load and one > binary datafile;the rest are python source > files. I used Tkinter, pickle and Numpy > modules. > > What do I have to put in my setup.py to build a > working exe? Where to specify the pictures and > the dafafile? Where the modules?.. and yet.. if > the Tkinter GUI I wrote is in a file different > from the starting file of my application, what > do I have to write under the "windows" option? > > I know I'm asking too many things at once.. but > I really don't know where to start. I'd need an > example of a setup file with all the features > that my setup will request... do you know where > I can find it? > > Thanks a Lot > Regards > Riccardo Taormina > > > > > > -- > Email.it, the professional e-mail, gratis per > te: http://www.email.it/f > > Sponsor: > Crea il tuo sito web dinamico con PHP e MySQL > - VideoCorso professionale direttamente nel tuo > computer. Trucchi e segreti Clicca qui: > http://adv.email.it/cgi-bin/foclick.cgi?mid=514 >2&d=20-1 > > ----------------------------------------------- >-------------------------- Take Surveys. Earn > Cash. Influence the Future of IT Join > SourceForge.net's Techsay panel and you'll get > the chance to share your opinions on IT & > business topics through brief surveys - and > earn cash > http://www.techsay.com/default.php?page=join.ph >p&p=sourceforge&CID=DEVDEV > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py >2exe-users |
From: jim-on-linux <in...@ve...> - 2007-01-21 23:41:51
|
py2exe help, I'm running on a vinilla win XP pro sp2 with nothing on it except python, pywin32, py2exe, and a simple setup file with two module to create the exe package. Win is installed on drive D: I'm using python 2.4.4, py2exe-0-6-3-win32-py2-4, pywin32-210-win32-py2-4 When I run py2exe I get the build and dist directories but the dist dir only contains the td dir. No exe file, or any other files. The last four lines of the build process are; creating python loader for extension 'win32ui' creating python loader for extension 'unicodedat' creating python loader for extension 'bz2' *** finding dlls needed *** -//- Any help is appreciated. jim-on-linux |
From: jim-on-linux <in...@ve...> - 2007-01-22 20:13:58
|
py2exe help, I'm running on a vinilla win XP pro sp2 with nothing on it except python, pywin32, py2exe, and a simple setup file with two module to create the exe package. > Win is installed on drive D: I upgraded everything to 2.5 > I'm using python 2.5, py2exe-0-6-6-win32-py2-5, pywin32-210-win32-py2-5. > When I run py2exe I get the build and dist directories but the dist dir only contains the td dir. No exe file, or any other files. > The last four lines of the build process are; > creating python loader for extension 'win32ui' creating python loader for extension 'unicodedat' creating python loader for extension 'bz2' *** finding dlls needed *** I like the new Logo. Any help is appreciated. jim-on-linux |
From: jim-on-linux <in...@ve...> - 2007-01-26 00:37:12
|
py2exe help, I'm trying to build an exe file on XP Pro. For some reason I can't determine why the file below will not produce an exe file. Dist and build directories are built but no exe file. This file will run by itself and print "Test Line Sent". Any insight would be appreciated. jim-on-linux > > ############# >import win32ui >from distutils.core import setup >import py2exe >def PrintLine(): > dc = win32ui.CreateDC() > dc.CreatePrinterDC() > dc.StartDoc('Test File') > dc.StartPage() > dc.TextOut(20,10, 'Test Line Sent') > dc.EndPage() > dc.EndDoc() > del dc >if __name__ == '__main__': > PrintLine() |
From: John M. <sjm...@le...> - 2007-01-26 01:32:54
|
On 26/01/2007 11:43 AM, jim-on-linux wrote: > py2exe help, > > I'm trying to build an exe file on XP Pro. > For some reason I can't determine why the > file below will not produce an exe file. What are you typing in when you are trying to produce an exe file? Do you have a setup.py file as well as the file you show at the end of the message? Please give a comprehensive answer along these lines: 1. I type: \python25\python setup.py py2exe 2. Here is my setup.py: from distutils.core import setup import py2exe setup(console=['printline.py']) 3. Here is printline.py: blah blah etc > > Dist and build directories are built but no exe > file. > > This file will run by itself and print "Test Line > Sent". > > Any insight would be appreciated. Try reading the tutorial: http://www.py2exe.org/index.cgi/Tutorial You need at least *TWO* files, one called (by convention) "setup.py", and the other(s) is/are your app. In the tutorial, the "app" is hello.py. You'll see in the tutorial that setup.py contains a reference to hello.py HTH, John > > jim-on-linux >> > ############# >> import win32ui > >>from distutils.core import setup >> import py2exe You shouldn't have the above lines in your "app". They are for use when you make an exe file, *not* for when you run it. > >> def PrintLine(): [snip] |
From: jim-on-linux <in...@ve...> - 2007-01-26 04:45:35
|
Thanks for responding, I don't have a problem producing an exe file. The=20 problem has been narrowed down to my last post. I made the set up is as simple as I can get it.; the setup builds the dist dir and the build dir.=20 But the dis dir only contains the tcl dir and=20 nothing else. Correctly built it will contain lib.zip,=20 msvcr71.dll and other stuff along with an exe=20 file. There is an error in what I submitted below but I=20 haven't been able to find it.=20 ## setup is below should produce an exe file if=20 the TESTPRT.py is valid. >#!/usr/bin/env python >import sys >from distutils.core import setup >import py2exe >setup( > =A0 version =3D "Test", > =A0 description =3D "win 32 sample", > =A0 name =3D "Test exe", > =A0console =3D ["TESTPRT.py"], > =A0 ) ### below is the code for TESTPRT.py that will run=20 from IDLE and print, "Test Line Sent". but when running setup.py, it does not produce the=20 expected exe file or anything else. ##TESTPRINT.py=20 >import win32ui > >from distutils.core import setup >import py2exe > >def PrintLine(): > =A0 =A0 =A0 =A0dc =3D win32ui.CreateDC() > =A0 =A0 =A0 =A0dc.CreatePrinterDC() > =A0 =A0 =A0 =A0dc.StartDoc('Test File') > =A0 =A0 =A0 =A0dc.StartPage() > =A0 =A0 =A0 =A0dc.TextOut(20,10, 'Test Line Sent') > =A0 =A0 =A0 =A0dc.EndPage() > =A0 =A0 =A0 =A0dc.EndDoc() > =A0 =A0 =A0 =A0del dc > >if __name__ =3D=3D '__main__': > =A0 PrintLine() On Thursday 25 January 2007 20:32, John Machin=20 wrote: > On 26/01/2007 11:43 AM, jim-on-linux wrote: > > py2exe help, > > > > I'm trying to build an exe file on XP Pro. > > For some reason I can't determine why the > > file below will not produce an exe file. > > What are you typing in when you are trying to > produce an exe file? Do you have a setup.py > file as well as the file you show at the end of > the message? > > Please give a comprehensive answer along these > lines: 1. I type: > \python25\python setup.py py2exe > 2. Here is my setup.py: > from distutils.core import setup > import py2exe > setup(console=3D['printline.py']) > 3. Here is printline.py: > blah > blah > etc > > > Dist and build directories are built but no > > exe file. > > > > This file will run by itself and print "Test > > Line Sent". > > > |
From: John M. <sjm...@le...> - 2007-01-26 04:54:32
|
On 26/01/2007 3:51 PM, jim-on-linux wrote: > > ### below is the code for TESTPRT.py that will run > from IDLE and print, "Test Line Sent". > > but when running setup.py, it does not produce the > expected exe file or anything else. > Try running setup.py from the command line, not from IDLE. Like I said, read the tutorial: """ Run your setup script The next step is to run your setup script. Make sure to give the py2exe command and expect to see lots and lots of output: C:\Tutorial>python setup.py py2exe """ |
From: Dieter V. <di...@op...> - 2007-01-26 07:59:49
|
Hi, TESTPRINT.py should not have this: from distutils.core import setup import py2exe You only want those in setup.py hth, Dieter |
From: jim-on-linux <in...@ve...> - 2007-01-26 16:00:00
|
setup.py is run from command line. Only TESTPRT.py is run from idle to make sure no error are in it.. On Thursday 25 January 2007 23:54, John Machin wrote: > On 26/01/2007 3:51 PM, jim-on-linux wrote: > > ### below is the code for TESTPRT.py that > > will run from IDLE and print, "Test Line > > Sent". > > > > but when running setup.py, it does not > > produce the expected exe file or anything > > else. > > Try running setup.py from the command line, not > from IDLE. > > Like I said, read the tutorial: > > """ > Run your setup script > > The next step is to run your setup script. Make > sure to give the py2exe command and expect to > see lots and lots of output: > > C:\Tutorial>python setup.py py2exe > """ |
From: jim-on-linux <in...@ve...> - 2007-01-26 16:00:03
|
On Friday 26 January 2007 02:59, Dieter Verfaillie wrote: Thanks for responding, The code in TESTPRINT.py dosn't have from distutils.core import setup import py2exe On;ly the setup.p contains those lines. > Hi, > > TESTPRINT.py should not have this: > from distutils.core import setup > import py2exe > > You only want those in setup.py > > hth, > Dieter > > > ----------------------------------------------- >-------------------------- Take Surveys. Earn > Cash. Influence the Future of IT Join > SourceForge.net's Techsay panel and you'll get > the chance to share your opinions on IT & > business topics through brief surveys - and > earn cash > http://www.techsay.com/default.php?page=join.ph >p&p=sourceforge&CID=DEVDEV > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py >2exe-users |