comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: spawn on IDL virtual machine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: spawn on IDL virtual machine [message #50570] Mon, 09 October 2006 16:11
Luke is currently offline  Luke
Messages: 4
Registered: October 2006
Junior Member
Something like...

if STRLOWCASE(!VERSION.OS_FAMILY) EQ 'windows' then $
spawn, 'DIR C:\TEMP' $
else $
spawn, 'ls /tmp'
Re: spawn on IDL virtual machine [message #50592 is a reply to message #50570] Mon, 09 October 2006 08:21 Go to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Sverre,

In UNIX, both spawn and call_external work with no problems inside the
VM. To the best of my knowledge there has be no attempt to disable them
like the way execute is disabled so I'd imagine there is no real problem
using them on windows either.

However, it's unlikely that code originally written for UNIX will work
with windows where spawn is concerned. Chances are there were some
assumptions about paths etc. or, worse still, the IDL was spawning a
UNIX command like 'ls' or 'rm'.

Thanks,

Allan

Sverre Solberg wrote:
> Is there a way to run code that contains the "spawn" command by the IDL
> virtual machine? I presume not :-( but would like to ask anyway. This
> is a code originally made for Unix, so it crashes when running the VM
> (with spawn) on Windows, which is not so surprising. But perhaps there
> is a way to test for platform inside the program and modify the call to
> "spawn" accordingly??
>
> Sverre
>
Re: spawn on IDL virtual machine [message #50593 is a reply to message #50592] Mon, 09 October 2006 08:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sverre Solberg writes:

> Is there a way to run code that contains the "spawn" command by the IDL
> virtual machine? I presume not :-( but would like to ask anyway. This
> is a code originally made for Unix, so it crashes when running the VM
> (with spawn) on Windows, which is not so surprising. But perhaps there
> is a way to test for platform inside the program and modify the call to
> "spawn" accordingly??

The various fields of the !VERSION system variable will
tell you almost everything you need to know about what
version of IDL you are running. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Listing of Internal IDL Routines
Next Topic: Low pass filter - Problem with kernel

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:37:01 PDT 2025

Total time taken to generate the page: 0.00428 seconds