Re: IDL Spawn on Windows OS [message #81511] |
Sat, 29 September 2012 06:14  |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
Le samedi 29 septembre 2012 04:10:29 UTC+2, wlandsman a écrit :
> I have a FITS file reader that can work with gzip compressed files. It can work much more efficiently if it can know how many bytes would be in the uncompressed file (without actually having to uncompress it.) For Unix/Mac systems I can parse the output of "gzip -l" captured with Spawn
>
>
>
> IDL> spawn,'gzip -l 1904-66_HPX.fits.gz',output
>
>
>
> and the 'output' variable will contain something like
>
> ' compressed uncompressed ratio uncompressed_name'
>
> ' 105515 161280 34.6% 1904-66_HPX.fits'
>
>
>
> I am told that this will not work under Windows OS (with gzip installed), presumably because it does not know about a gzip command. Can anyone suggest a way to make this code Windows friendly? (I do not have access to IDL on a Windows machine). Thanks, --Wayne
The "gzip -l" command should work on Windows (with, of course, gzip properly installed). Be carefull to specify the *absolute* path of the file in the spawned command.
alx.
|
|
|
Re: IDL Spawn on Windows OS [message #81584 is a reply to message #81511] |
Tue, 02 October 2012 14:45  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Saturday, September 29, 2012 9:14:18 AM UTC-4, alx wrote:
> The "gzip -l" command should work on Windows (with, of course, gzip properly installed). Be carefull to specify the *absolute* path of the file in the spawned command.
Thanks for responding. It turns out that gzip was not properly installed on the Windows machine, and my FITS reader will now check for that possibility. --Wayne
|
|
|