From owner-freebsd-python@FreeBSD.ORG Thu Aug 19 02:19:08 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 7A08D16A4CE for ; Thu, 19 Aug 2004 02:19:08 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2566C43D41 for ; Thu, 19 Aug 2004 02:19:08 +0000 (GMT) (envelope-from hyeshik@gmail.com) Received: by mproxy.gmail.com with SMTP id 80so211455rnk for ; Wed, 18 Aug 2004 19:19:07 -0700 (PDT) Received: by 10.38.206.39 with SMTP id d39mr1617916rng; Wed, 18 Aug 2004 19:19:05 -0700 (PDT) Message-ID: <4f0b69dc0408181919172d239d@mail.gmail.com> Date: Thu, 19 Aug 2004 11:19:05 +0900 From: Hye-Shik Chang To: Max Russell In-Reply-To: <20040818100943.44985.qmail@web25405.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040818100943.44985.qmail@web25405.mail.ukl.yahoo.com> cc: freebsd-python@freebsd.org Subject: Re: startfile() equivalent X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Hye-Shik Chang List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2004 02:19:08 -0000 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