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
Re: IDL_IDLBridge, spawn, and sftp, oh my! [message #87479 is a reply to message #87478] Wed, 05 February 2014 23:27 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, February 6, 2014 5:46:05 AM UTC+1, Gianguido Cianci wrote:
> 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

Hi Guido,
just a guess: it might be that idl_idlbridge is looking for @dummy.pro in the wrong directory. Try to check that (maybe with pwd).

Regards,
Helder
[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 17:39:57 PDT 2025

Total time taken to generate the page: 0.39807 seconds