Author: José Ignacio
Posted: 2011-08-13 at 12:22:01
On Sat, Aug 13, 2011 at 12:57, Paul McNett <p@ulmcnett.com> wrote:
> On 8/13/11 8:41 AM, Jeff Johnson wrote:
>>> > os.system("open %s" % document)
>>> >
>>> > Paul
>>> >
>> Paul: Is that Python? Maybe it would work on Linux too? Ultimately I
>> want to run the application from a button click in Dabo just like I do
>> in VFP.
>
> The os.system() call is Python. The "open document" shell call is Mac. The equivalent
> on Windows is "startfile". I don't think there's anything to rely on for Linux.
>
On most modern linux distros you can use xdg-open
(http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html) it comes
preinstalled.
> The better python code would use subprocess(), but os.system is so much easier to
> remember.
>
> Paul
>
> _______________________________________________
> Post Messages to: Dabo-users@leafe.com
> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
> Searchable Archives: http://leafe.com/archives/search/dabo-users
> This message: http://leafe.com/archives/byMID/4E469ED4.3030205@ulmcnett.com
>
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/CAJyPtyiMUK67hsgOim8B6tb9N7y1OR9TVvmevKTwbp008_GnDA@mail.gmail.com