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