ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> py2exe-users
py2exe-users
Re: [Py2exe-users] Starting 3 Programs from One Shell
by Leeuw van der other posts by this author
Jul 28 2006 12:19AM messages near this date
Re: [Py2exe-users] Starting 3 Programs from One Shell :: my solution | [Py2exe-users] Reducing 3 shells to one
Hi Mike,

 

Start your programs using the 'subprocess' module. It has a couple of
very easy to use convenience functions and should be easier to use than
either os.popen or os.system.

 

(I recently was faced with a similar problem, but my need to stop using
os.system was that the shell started by os.system cannot change to UNC
network paths, and the software I need to run - from my
py2exe-executable with wxPython GUI - is installed on a network volume)

 

Success,

 

--Tim

 

________________________________

From: py2exe-users-bounces@[...].net
[mailto:py2exe-users-bounces@[...].net] On Behalf Of Mike
Lemmer
Sent: dinsdag 25 juli 2006 23:51
To: py2exe-users@[...].net
Subject: [Py2exe-users] Starting 3 Programs from One Shell

 

I've created a wxPython launcher GUI, converted with py2exe, that starts
3 other programs. However, it also starts up three shell windows as
well. My boss wants me to reduce the number of shell windows to 0 or 1.

    Currently, my program starts them using:
os.system("start \B [program name & arguments")

    And I convert it to an exe using this setup.py script:
# setup.py
from distutils.core import setup
import py2exe
setup(windows=["launcher.py"], zipfile=None)

    I've tried changing windows to console; that works (it only opens up
one shell), but it also removes all graphics/text from the GUI. I'm
thinking of trying:
1. Setting it to console, but importing certain wxPython libraries, or
2. Upgrading to subsystem commands and tacking on the CREATE_NO_WINDOW
flag.
Option 2 looks like my best bet, but I'm unsure if the spawned programs
will still run if the launcher's killed. (They need to.)

Any suggestions on how I can reduce the number of shells?

  

________________________________

How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
rates.
<http://us.rd.yahoo.com/mail_us/taglines/postman8/*http:/us.rd.yahoo.com
/evt=39663/*http:/voice.yahoo.com>  
Thread:
Mike Lemmer
Bruno THOORENS
Bruno THOORENS
John Machin
Leeuw van der

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved