Running into problems with os.popen

Stephen Boulet stephen.boulet at motorola.com
Thu Mar 20 14:02:06 CET 2003


Jp Calderone wrote:
> On Wed, Mar 19, 2003 at 05:44:41PM -0600, Stephen Boulet wrote:
> 
>>I was using a structure like:
>>
>>[snip - usage of os.popen]
>>
>>but then my string is truncated. Anyone know what's going on?
>>
> 
> 
>   Not a clue.  Maybe it has to do with the particulars of what "command" is. 
> In the absense of any specific answer, here's a general one: try
> commands.getoutput()
> 
>   Jp

The command is:

pth = os.path.join(curDir,self.fileName)
command = 'hdp dumpsds -c "%s"' % pth

It dumps the contents of an hdf file into a big text file, so it just returns 
a lot of text.

-- Stephen





More information about the Python-list mailing list