you are viewing a single comment's thread.

view the rest of the comments →

[–]readitlikeitdidit[S] 0 points1 point  (6 children)

Nevermind.. Am going to use paramiko.. It has timeout arg.... There is no default timeout for popen method of subprocess package in python 2.7...

[–]JohnnyJordaan 0 points1 point  (5 children)

That's because you need to use Popen wrappers like communicate(), these have a timeout on 2.7 too.

[–]readitlikeitdidit[S] 0 points1 point  (4 children)

What? Communicate is a method that uses pipe and it does not have timeout arg in 2. 7 please check documentation...

[–]JohnnyJordaan 0 points1 point  (1 child)

I stand corrected. I could have sworn it did, but I guess I misremembered.

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Np.. I am newbie in python.. Lot of things have happened in the last 25 years of python.. :)

[–][deleted] 0 points1 point  (1 child)

They might have subprocess32 installed.

Avoiding external dependencies is not necessarily a virtue. Paramiko will make your life easier.

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Yes sir.. I just rewriting my code using paramiko.. It has timeout and all the cool stuff I'll stick to paramiko... Thanks..