2007年07月04日 星期三 14:49
请问如何用py2exe生成一个单独的文件?我现在生成是一个dist文件夹,里很多东西。 是否能生成一个单独的exe文件? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070704/37d1cbdf/attachment.htm
2007年07月04日 星期三 15:15
ÎÒÒ²ÈÌÊܲ»×¡ÁË£¬ÓïÑÔÖ»ÊÇÒ»ÖÖ¹¤¾ß£¬Ë¼Ïë²ÅÄܸıäÊÀ½ç£¬ÎÞÂÛºÎÖÖ¼ÆËã»úÓïÑÔ¶¼ÓÐÆäÓÅÊƺÍÁÓÊÆ¡£ ¶øÇÒ²»Í¬µÄÈË£¬²»Í¬µÄ¿ª·¢Ð¡×飬²»Í¬µÄÏîÄ¿£¬Ê¹Óò»Í¬µÄÓïÑÔÓÐÆäÓÅÊƺÍÁÓÊÆ£¬µ½µ×Ñ¡ÓúÎÖÖÓïÑÔ¿ª·¢£¬ Òª¸ù¾Ýʵ¼ÊµÄÇé¿öÀ´Ëµ£¬Í¨¹ý¶Ôʱ¼ä¡¢³É±¾¡¢ÖÊÁ¿µÄ×ÛºÏȨºâ£¬Ñ¡ÔñÓïÑÔ¡£ ûÓÐÒ»ÖÖÓïÑÔÄܹ»Í³Ò»ÊÀ½ç£¬Ö»ÓÐÖ÷Á÷Óë·ÇÖ÷Á÷ ¡£ ´ËÖ ¾´Àñ ³½Ý> Date: Wed, 4 Jul 2007 15:00:56 +0800> From: python_lzj在163.com> To: python-chinese在lists.python.cn> Subject: Re: [python-chinese] ´ó¼ÒÀ´ËµËµ×Ô¼ºÔÚʵ¼Ê¹¤×÷ÖÐÓ¦ÓÃPythonµÄ°¸Àý°É> > ÈÌÎÞ¿ÉÈÌ£¬ ÎÞÐëÔÙÈÌ£¡Êܲ»ÁËÁË£¬ ³öÀ´Í¸öÅÝ¡£> ¡°µ«C++µÄÖ´ÐÐЧÂÊÊDz»¸ßµÄ£¬ÖÁÉÙ±ÈCÒªÀ´µÃÂý¡£Èç¹ûûÓÐʹÓÃרҵ±àÒëÆ÷ÓÅ»¯·½Ê½£¬ºÜÄÑÂú×ã¸ßÐÔÄÜ»·¾³µÄ¼ÆËãÒªÇ󡣡±> ±§Ç¸ÎÒºÜÄÑÃ÷°×Äú˵µÄËùνµÄ¸ßÐÔÄÜ»·¾³ÊÇָʲô¶«Î÷£¬ Èç¹ûC++¶¼²»ÄÜʤÈÎÄÇôpython¾Í¸üÏ붼²»ÒªÏëÁË¡£> ÎÒÊÇC++³ÌÐòÔ±£¬ ËäÈ»ÎÒÏÖÔÚÒ²ÔÚ¹Ø×¢python£¬ ʹÓÃpython¡£ µ«ÊÇÕâ¸öthread¶ÔC++µÄ³¬¼¶ÎÞÖªºÍ¶ÔpythonµÄ¹ý> ·Ö´µÅõÎÒ¿´²»ÏÂÈ¥ÁË¡£> > > > On Wed, 4 Jul 2007 14:48:56 +0800> "ÑîÎÄ" <wyang在chinaclear.com.cn> ׫дÓÚ:> > > PythonµÄÖ´ÐÐЧÂÊÓжà¸ß£¬Õâ¸öÎÒûÓÐʲôÌå»á£¨Ö÷ÒªÊÇPython»¹Ã»ÓÐÈëÃÅ£©> > > > µ«C++µÄÖ´ÐÐЧÂÊÊDz»¸ßµÄ£¬ÖÁÉÙ±ÈCÒªÀ´µÃÂý¡£Èç¹ûûÓÐʹÓÃרҵ±àÒëÆ÷ÓÅ»¯·½Ê½£¬ºÜÄÑÂú×ã¸ßÐÔÄÜ»·¾³µÄ¼ÆËãÒªÇó¡£> > > > C++µÄÓÅÊÆÔÚÓÚ´úÂëµÄÔÙά»¤ÐÔÉÏ£¬Ê¹ÓÃÁËOO˼Ïëºó¡£È·ÊµÊ¹µÃ´úÂëµÄ¿É¶ÁÐÔ¸üÇ¿> > > > > > ----- Original Message ----- > > From: ÂíºêÁÁ > > To: python-chinese在lists.python.cn > > Sent: Wednesday, July 04, 2007 2:37 PM> > Subject: Re: [python-chinese]´ó¼ÒÀ´ËµËµ×Ô¼ºÔÚʵ¼Ê¹¤×÷ÖÐÓ¦ÓÃPythonµÄ°¸Àý°É> > > > > > ²»Ì«Ã÷°×£¬PythonµÄÖ´ÐÐЧÂʱÈC++¸ß£¿> > > > > > 2007/7/4, ÉòáË <wileishn在gmail.com>:> > OK, »ù±¾ÉÏÄúºÜëyµÃµ½ÄúËùÐèÒªµÄ´ð°¸¡£þÎÒËùÕJ×RµÄ Python ºÚ¿ÍºÍÂI Python ³ÌÐòT¶¼ÊÇOé ¡¡ OéµÍÕ{µÄ,> > ²»ß^¿ÉÒÔÀí½â, ¹«é_ËûµÄ°¸Àý§íµÄÂé©ßhßhÒª±ÈË®¶àµÃ¶à¡£ÎÒß@ÑYÖ»ºÎµØÕfÒ»ÏÂÎÒµÄëHªÓÃ:> > > > ® Yacc/Lex £²»òÓõÄrºò, Ö»ºÃÓà Python ¾ÁËÒ»·NÉÌI³ÌÐòÕZÑÔ¡£ß@·NÕZÑÔÒѽÀÛÓÉú®aÁË×Ê®ÈfÐдú´a¡£> > > > ¾ÁËÒ»·N²»ÄÇ÷áСº¿ÆµÄ IDE¡£¸ßÙ|Á¿µÄ Python ´ú´aºÜÈÝÒ׶®, Òò´Ë vi Òѽ̫òÓÃÁË, ï@È»ÎÒ¾µÄ IDE Êǽo»¯ÍâÈËÊ¿Óõġ£ > > > > Ò»ÈÕÌÀí½üǧÈfÈËîî}µÄ×ÔÈ»ÕZÑÔÈ˹¤ÖÇÄÜ¡£ºÜï@Ȼֱ½ÓÕÕ°á C µÄÉñ½¾W½jËã·¨µ½ Python ß²»ÈçÖ±½ÓÓà C, µ«ÊÇ Python> > ÓÐÔS¶àÓÐЧµÃ³öÆæµÄÌصÄÓÐËã·¨¡£> > > > ·åֵÿÃë 2000 ´ÎÕÇóÒÔÉϵÄÓB CGI Õ¾üc¡£Í¨³£ FastCGI ÔÚͬµÈÇérÏÂÒѽ°c¯, ¶ø Python ÊÇéÿÃëÉÏÈf´ÎµÄ Web> > ÕÇó¶øÔO (®È»ÎÒ²»ÊÇÖ¸ Django »òÕß Twisted ß@·N¹Åµä¿ò¼Ü), Ò»Çж¼¾b¾bÓÐðN¡£ > > > > ×Ì×Äú]ÓРÕfß^µÄ Python Web ¿ò¼Ü, ÒÔ¼°Ê¹ÓÃß@Щ¿ò¼Ü¾µÄÄú²»ÖªµÀµÄÆæ¹ÖÕ¾üc¡£> > > > »ùÓÚ Tkinter »òÕß PyQt µÄ·þÕÆ÷DÐλ¯¹ÜÀí½çÃæ¡£³£ÒµÄ CRM¡¢CMS ÒÔ¼° OA ϵ½y¡£ß@Щ¶¼ÊǺܺÃÍæµÄ|Î÷, ÄãºÜëyÖªµÀÓжàÉÙÈË·ÖÔÅc´Ë¡£> > > > Õ×¢Òâ, ÉÏÃæµÄËùÓЪÓö¼ÊǼ Python ¾µÄ¡£ÔÚÈκεط½Ç¶Èë C++ ¶¼þ½µµÍϵ½yµÄÌÐÐЧÂʺͷ¶¨ÐÔ, µÃ²»Ê§¡£> > > > ºÜï@È», Èç¹ûÄú²»ÒÔ Google »òÕß NASA ß@Щ¹«Ë¾éßxñµÄÔ, Python ¹ÀÓ]ʲ÷áÓÃÌ¡£¦ÔS¶àÕ¼Õ¼×ԵõÄС¹«Ë¾¶øÑÔ, > > Ëû²¢²»ÐèÒª Python µÄ¸ßÌÐÐЧÂÊ, ¦ËûíÕf C++ µÄÌÐÐЧÂÊÒѽòÓÃÁË¡£Ëûí¶àÓà Python ×÷һЩСÄ_±¾, ¶ø¼> > Python ªÓÃͨ³£²¢²»ÐèÒªß@÷áÂé©¡£¶øÇÒС¹«Ë¾ºÜëyþÓд󵽱ØíʹÓà Python µÄªÓá£> > > > µÚ¶þ, ʹÓà Python µÄ¹«Ë¾Í¨³£¶¼ºÜµÍÕ{, ͬrËûͨ³£²»þÌ«êPÐÄÄúÊÇ·ñþÍæ Python, ²»ÊìϤ Unix> > ¾³Ì¼¼ËµÄ³ÌÐòTÊÇo·¨°l] Python µÄÍþÁ¦µÄ¡£ËùÒÔÎÒºÜÉÙþ¿´µ½ÓÐÌ·QʹÓà Python ¼¼ÐgµÄ¹«Ë¾¡£Í¬r, ½^´ó¶àµ Python > > ³ÌÐòT¶¼²»ÊÇÒòé Python ¶øÕÒµ½¹¤×÷ÂλµÄ¡£> > > > Ï£Íûß@ЩÄܦÄúÓÐËùÍÖú¡£> > > > ÔÚ 07-7-3£¬Li Qingfeng<liqfemail在gmail.com> дµÀ£º> > > ʵ¼ÊÉÏÎÒ¸ü¶àµÄÊÇÏëÎÊÔÚ¹úÄÚµÄÓ¦Ó㬱Ͼ¹¿ìҪȥÕÒ¹¤×÷ÁË¡£> > > GoogleºÍNASAËƺõ²»ÄܸøÎÒÏëÒªµÄ´ð°¸¡£> > >> > >> > > ÔÚ07-7-3£¬ÂóÌïÊØÍûÕß <qcxhome在gmail.com> дµÀ£º> > > > On 7/3/07, Li Qingfeng <liqfemail在gmail.com> wrote:> > > > > > > > ×÷ΪһÃûÐÅϢרҵµÄÔÚУÑо¿Éú£¬½Ó´¥pythonÓаëÄêÁË£¬·¢ÏÖƽʱÓÃËüÀ´Íê³ÉһЩСµÄ±à³ÌÈÎÎñµÄÈ·ºÜ·½±ã£¬¶ÔËü·Ç³£Ï²°®¡£> > > > > Ö»ÊÇÔø¾ÓÃpythonʵÏÖµÄBPÉñ¾ÍøÂç¼ÆËãËٶȺܲ»ÀíÏ룬ӦÓÃnumpyÒ²ÎÞ¼ÃÓÚÊ£¬×îºóÓÃC++½â¾öÁËÎÊÌâ¡£> > > > > »¹ÓÐÒ»Äê¾ÍÒª±ÏÒµÁË£¬ºÜÏ£ÍûÌýÌý¸÷λµÄ½éÉÜ£¬pythonÔÚ´ó¼ÒµÄʵ¼Ê¹¤×÷ÖÐÓ¦Óù㷺Âð£¿ÓÐÄÄЩ°¸ÀýÄØ£¿> > > > > ÔÚÕâÀïÏÈ˵ÉùллÁË¡£ > > > >> > > > È¥ÎÊÎÊGoogleºÍNASA°É ;-)> > > >> > > > --> > > > GoogleTalk: qcxhome在gmail.com> > > > MSN: qcxhome在hotmail.com > > > > My Space: tkdchen.spaces.live.com> > > > BOINC: boinc.berkeley.edu> > > > Öйú·Ö²¼Ê½¼ÆËã×ÜÕ¾: www.equn.com> > > > _______________________________________________> > > > python-chinese> > > > Post: send python-chinese在lists.python.cn> > > > Subscribe: send subscribe to > > > python-chinese-request在lists.python.cn> > > > Unsubscribe: send unsubscribe to> > > python-chinese-request在lists.python.cn > > > > Detail Info:> > > http://python.cn/mailman/listinfo/python-chinese> > >> > >> > > _______________________________________________ > > > python-chinese> > > Post: send python-chinese在lists.python.cn> > > Subscribe: send subscribe to> > > python-chinese-request在lists.python.cn> > > Unsubscribe: send unsubscribe to> > > python-chinese-request在lists.python.cn> > > Detail Info:> > > http://python.cn/mailman/listinfo/python-chinese> > >> > > > ---> > ÉòáË (ŬÁ¦WÁ Python ÖÐ ...)> > http://blog.163.com> > _______________________________________________> > python-chinese > > Post: send python-chinese在lists.python.cn> > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn> > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > -- > > ÂíºêÁÁ > > > > > > ------------------------------------------------------------------------------> > > > > > _______________________________________________> > python-chinese> > Post: send python-chinese在lists.python.cn> > Subscribe: send subscribe to python-chinese-request在lists.python.cn> > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn> > Detail Info: http://python.cn/mailman/listinfo/python-chinese> > -- > EffectCrash <lzj_mailist在163.com>> > _________________________________________________________________ ʹÓÃÏÂÒ»´úµÄ MSN Messenger¡£ http://imagine-msn.com/messenger/launch80/default.aspx?locale=zh-cn&source;=wlmailtagline -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070704/9b044158/attachment-0001.htm
2007年07月04日 星期三 15:34
PyInstaller¿ÉÒÔ°ìµ½£¬¸úpy2exe²î²»¶àµÄ¶«Î÷¡£ ÔÚ07-7-4£¬python.py <python.py在163.com> дµÀ£º > > ÇëÎÊÈçºÎÓÃpy2exeÉú³ÉÒ»¸öµ¥¶ÀµÄÎļþ£¿ÎÒÏÖÔÚÉú³ÉÊÇÒ»¸ödistÎļþ¼Ð£¬ÀïºÜ¶à¶«Î÷¡£ > > ÊÇ·ñÄÜÉú³ÉÒ»¸öµ¥¶ÀµÄexeÎļþ£¿ > > > > ------------------------------ > 150 Íò ÈË Í¬ ʱ ÔÚ Íæ µÄ Íø ÓΣ¬Äã ²» ÊÔ ÊÔ Â𠣿 <http://event.mail.163.com/chanel/xyq.htm?from=163_NO1> > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070704/c0deb248/attachment.html
2007年07月04日 星期三 18:34
options = { "bundle_files": 3, # create singlefile exe setup.pyÖмÓÉÏÕâ¸ö On 7/4/07, Li Qingfeng <liqfemail在gmail.com> wrote: > > PyInstaller¿ÉÒÔ°ìµ½£¬¸úpy2exe²î²»¶àµÄ¶«Î÷¡£ > > ÔÚ07-7-4£¬python.py <python.py在163.com> дµÀ£º > > > > ÇëÎÊÈçºÎÓÃpy2exeÉú³ÉÒ»¸öµ¥¶ÀµÄÎļþ£¿ÎÒÏÖÔÚÉú³ÉÊÇÒ»¸ödistÎļþ¼Ð£¬ÀïºÜ¶à¶«Î÷¡£ > > > > ÊÇ·ñÄÜÉú³ÉÒ»¸öµ¥¶ÀµÄexeÎļþ£¿ > > > > > > > > ------------------------------ > > 150 Íò ÈË Í¬ ʱ ÔÚ Íæ µÄ Íø ÓΣ¬Äã ²» ÊÔ ÊÔ Â𠣿 <http://event.mail.163.com/chanel/xyq.htm?from=163_NO1> > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- python c# and opensource blog:http://www.chyni.cn -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070704/5934d7f1/attachment.html
2007年07月04日 星期三 21:15
On 7/4/07, python.py <python.py at 163.com> wrote: > > 请问如何用py2exe生成一个单独的文件?我现在生成是一个dist文件夹,里很多东西。 > > 是否能生成一个单独的exe文件? > 可以在这里下载到PyInstaller: http://pyinstaller.hpcf.upr.edu/source/1.3/pyinstaller_1.3.zip 简单介绍一下使用步骤: your python file path: c:\myapp\main.py pyinstaller path: c:\pyinstaller_1.3\ 执行以下两个命令: python c:\pyinstaller_1.3\makespec.py --onefile c:\myapp\main.py python c:\pyinstaller_1.3\build.py c:\myapp\main.spec 你就可以看到main.exe了 -- Regards, Huang You Gong -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070704/11c0b053/attachment.htm
Zeuux © 2025
京ICP备05028076号