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

Home » Public Forums » archive » IDL_IDLBridge, spawn, and sftp, oh my!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL_IDLBridge, spawn, and sftp, oh my! [message #87478] Wed, 05 February 2014 20:46 Go to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
Hi all,

I am trying use IDL_IDLBridge to run a batch file containing spawn command that uses sftp to retrieve a file. If there is a more direct way, I would love to know. I'm on MacOSX and the sftp server is linux. and I'm using ssh public keys so i don't have to enter the password every time.

The issue is that while the file is sftp'ing, I'd like to do other things...
so an idl_idlBridge object->Execute with a /nowait seems like a good idea. Here is the code:


;;;;;;;;;;;begin code
file='myfile' ;<-generated on the fly actually
oBridge = OBJ_NEW('IDL_IDLBridge')
cmd2 = "scp server.internet.com:"+file+" ."
openw,lun, 'dummy.pro', /get_lun
printf,lun,'spawn, "'+cmd2+'"'
close, lun
obridge->execute, "@dummy.pro", /nowait


COMMAND1
COMMAND2
COMMAND3

while oBridge->status() ne 0 do wait, 0.1 ;check that oBridge is done every .1s

;now that oBridge (and the three COMMAND lines) are done, proceed...
;;;;;;;;;;;end code

so the file dummy.pro is created and contains:

spawn, "scp server.internet.com:file ."


I can run it with @ at the IDL> prompt, but the IDL_IDLBridge won't run it.

any ideas on how to make this work? or even better on how to do this better?

Many thanks,
G
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: subseting a 3D array based on values from a 2D array
Next Topic: Keywords and properties (in function graphics)

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

Current Time: Fri Oct 10 06:42:50 PDT 2025

Total time taken to generate the page: 0.80135 seconds