From owner-freebsd-python@FreeBSD.ORG Thu Aug 19 11:32:43 2004 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57B2016A4CE for ; Thu, 19 Aug 2004 11:32:43 +0000 (GMT) Received: from web25407.mail.ukl.yahoo.com (web25407.mail.ukl.yahoo.com [217.12.10.141]) by mx1.FreeBSD.org (Postfix) with SMTP id 8D85B43D58 for ; Thu, 19 Aug 2004 11:32:42 +0000 (GMT) (envelope-from max_russell2000@yahoo.co.uk) Message-ID: <20040819075641.97538.qmail@web25407.mail.ukl.yahoo.com> Received: from [194.247.82.75] by web25407.mail.ukl.yahoo.com via HTTP; Thu, 19 Aug 2004 08:56:41 BST Date: Thu, 19 Aug 2004 08:56:41 +0100 (BST) From: =?iso-8859-1?q?Max=20Russell?= To: Hye-Shik Chang In-Reply-To: <4f0b69dc0408181919172d239d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit cc: freebsd-python@freebsd.org Subject: Re: startfile() equivalent X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2004 11:32:43 -0000 Is this soley for opening URLs though? I am wanting to launch MAME with Python- could I substitute the URL with the path to the application? --- Hye-Shik Chang wrote: > On Wed, 18 Aug 2004 11:09:43 +0100 (BST), Max > Russell > wrote: > > Hello- > > > > I'm scripting a little thing to pick a random MAME > > file and launch it (save me the hassle of choosing > > one). > > > > > Does startfile work on BSD/Linux? > > os.startfile() is only available in Windows. > > > How can I do the equivalent to the python win32 > > startfile()? > > > > If I cannot use this, how can I say execute this > command? > > > > It depends what your desktop environment is. If you > run GNOME, > you can write it like this: > > import os > def startfile(url): > os.system("gnome-open " + url) # quote if you > can't trust user. > > > Hye-Shik > _______________________________________________ > freebsd-python@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-python > To unsubscribe, send any mail to > "freebsd-python-unsubscribe@freebsd.org" > ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com