This is way easier, but only works on Unix (including Cygwin).
import commands
print commands.getstatusoutput('wc -l file')
it returns a tuple with the (return_value, output)
| 5 | added 52 characters in body | ||
|
This is way easier, but only works on Unix (including Cygwin).
it returns a tuple with the (return_value, output) This is way easier, but only works on Unix (including Cygwin).
This is way easier, but only works on Unix (including Cygwin).
it returns a tuple with the (return_value, output) |
|||
| 4 | (including Cygwin) | ||
|
This is way easier, but only works on Unix (including Cygwin).
This is way easier, but only works on Unix.
This is way easier, but only works on Unix (including Cygwin).
|
|||
| 3 | added 23 characters in body | ||
|
This is way easier., but only works on Unix.
This is way easier..
This is way easier, but only works on Unix.
|
|||
| 2 | Fixed two syntax errors. Removed a stray semicolon and an extra ) from the end | ||
| 1 | |||