>>> j = win32pipe.popen('c:\\disk\\plink jnitin@10.94.101.178 -pw mat123 df -g','r')
>>> for i in j:
print i
>>>
As you can see the file object 'j' does not have anything in it...
But if I type 'c:\disk\plink jnitin@10.94.101.178 -pw ibm123 df -g' in the DOS prompt, it works fine and gives me the required result...
So I gave a simple command via python like this...
>>> j = win32pipe.popen('dir','r')
>>> for i in j:
print i
Volume in drive C is DRIVE-C
Volume Serial Number is 5C8D-1DAC
win32pipes are broken by definition, unfortunately. They won't work in all cases. I'd post a question to comp.lang.python (http://groups.google.com/group/comp.lang.python) where someone else should have experience working with/around plink specifically.
Maybe using the famous Microsoft kludge for handling spaces in filenames will do the trick. This wraps a pair of single quotes and double quote around the string. Try:
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.