Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2004 08:56:41 +0100 (BST)
From:      =?iso-8859-1?q?Max=20Russell?= <max_russell2000@yahoo.co.uk>
To:        Hye-Shik Chang <hyeshik@gmail.com>
Cc:        freebsd-python@freebsd.org
Subject:   Re: startfile() equivalent
Message-ID:  <20040819075641.97538.qmail@web25407.mail.ukl.yahoo.com>
In-Reply-To: <4f0b69dc0408181919172d239d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <hyeshik@gmail.com> wrote: 
> On Wed, 18 Aug 2004 11:09:43 +0100 (BST), Max
> Russell
> <max_russell2000@yahoo.co.uk> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040819075641.97538.qmail>