Index
2011-08-13 10:23 – Jeff Johnson : [dabo-users] Shellexecute
2011-08-13 10:48 – Roger Gammans : Re: [dabo-users] Shellexecute
2011-08-13 11:33 – Paul McNett : Re: [dabo-users] Shellexecute
2011-08-13 11:41 – Jeff Johnson : Re: [dabo-users] Shellexecute
2011-08-13 11:57 – Paul McNett : Re: [dabo-users] Shellexecute
2011-08-13 12:07 – Jeff Johnson : Re: [dabo-users] Shellexecute
2011-08-13 12:22 – José Ignacio : Re: [dabo-users] Shellexecute
2011-08-13 14:14 – Jeff Johnson : Re: [dabo-users] Shellexecute
Back to top
[dabo-users] Shellexecute

Author: Jeff Johnson

Posted: 2011-08-13 10:23:24   Link

I have a VFP application that will open up a document in its native

application by using shellexecute in the button click. I would like to

add that same ability on Mac & Linux. Most of them are PDF or XLS and

occasionally DOC. Is that possible?

TIA

--

Jeff

-------------------

Jeff Johnson

jeff@dcsoftware.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/4E4688DC.9040605@dcsoftware.com

©2011 Jeff Johnson
Back to top
Re: [dabo-users] Shellexecute

Author: Roger Gammans

Posted: 2011-08-13 10:48:13   Link

On Sat, 2011-08-13 at 07:23 -0700, Jeff Johnson wrote:

> I have a VFP application that will open up a document in its native

> application by using shellexecute in the button click. I would like to

> add that same ability on Mac & Linux. Most of them are PDF or XLS and

> occasionally DOC. Is that possible?

Probably. On linux there is a mailcap file which sort of contains the

same sort of information as the shellexecute registry keys do in windows

man run-mailcap

for more information.

It may be installed on the Mac as well but I don't rightly know.

--

Roger Gammans <roger@computer-surgery.co.uk>

--- StripMime Report -- processed MIME parts ---

multipart/signed

text/plain (text body -- kept)

application/pgp-signature

---

_______________________________________________

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/1313246893.5966.4.camel@localhost

©2011 Roger Gammans
Back to top
Re: [dabo-users] Shellexecute

Author: Paul McNett

Posted: 2011-08-13 11:33:22   Link

On 8/13/11 7:23 AM, Jeff Johnson wrote:

> I have a VFP application that will open up a document in its native

> application by using shellexecute in the button click. I would like to

> add that same ability on Mac& Linux. Most of them are PDF or XLS and

> occasionally DOC. Is that possible?

Easy on Mac:

os.system("open %s" % document)

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/4E469942.2060500@ulmcnett.com

©2011 Paul McNett
Back to top
Re: [dabo-users] Shellexecute

Author: Jeff Johnson

Posted: 2011-08-13 11:41:54   Link

On 08/13/2011 08:33 AM, Paul McNett wrote:

> On 8/13/11 7:23 AM, Jeff Johnson wrote:

>> I have a VFP application that will open up a document in its native

>> application by using shellexecute in the button click. I would like to

>> add that same ability on Mac& Linux. Most of them are PDF or XLS and

>> occasionally DOC. Is that possible?

> Easy on Mac:

>

> 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.

Thanks,

Jeff

-------------------

Jeff Johnson

jeff@dcsoftware.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/4E469B42.8080607@dcsoftware.com

©2011 Jeff Johnson
Back to top
Re: [dabo-users] Shellexecute

Author: Paul McNett

Posted: 2011-08-13 11:57:08   Link

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.

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

©2011 Paul McNett
Back to top
Re: [dabo-users] Shellexecute

Author: Jeff Johnson

Posted: 2011-08-13 12:07:59   Link

On 08/13/2011 08:57 AM, Paul McNett 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.

>

> The better python code would use subprocess(), but os.system is so much easier to

> remember.

>

> Paul

>

>

>

>

Thanks Paul!

Jeff

>

> -------------------

>

> Jeff Johnson

> jeff@dcsoftware.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/4E46A15F.1000201@san-dc.com

©2011 Jeff Johnson
Back to top
Re: [dabo-users] Shellexecute

Author: José Ignacio

Posted: 2011-08-13 12:22:01   Link

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

©2011 José Ignacio
Back to top
Re: [dabo-users] Shellexecute

Author: Jeff Johnson

Posted: 2011-08-13 14:14:05   Link

On 08/13/2011 09:22 AM, José Ignacio wrote:

> 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.

>

Awesome!! Couldn't be more simple! Thank you!

Jeff

-------------------

Jeff Johnson

jeff@dcsoftware.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/4E46BEED.3070609@dcsoftware.com

©2011 Jeff Johnson