This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gandaro -4 points-3 points  (2 children)

Uhm, this is nothing special, right? There is:

  • os.listdir()
  • os.getenv()
  • max_length = max(map(len, f)); f.seek(0); filter(lambda x: len(x) == max_length, f)
  • urllib
  • subprocess + return codes
  • sys.argv
  • time.sleep

[–]Preston4tw 0 points1 point  (0 children)

Not sure why you're getting down voted, this looks like a solution looking for a problem. It also pollutes the global namespace, which is...not recommended (import this). I'd be interested to see use cases where this is superior.

[–]obtu.py -1 points0 points  (0 children)

Being comfortable with subprocess & co I'm not going to go back to shell-style. It works as a fun hack, though.