Re: Conditionals in Python cli with -m oneliner

2016-04-09 Thread Peter Otten
gvim wrote: > Given that this work in a Python 3 repl: > import re txt = "Some random text" if re.search(r"\b\w{4}\b", txt): txt 'Some random text' > > and this works on the command line, printing all lines in logs.txt: > > $ python3 -m oneliner -ne 'line' logs.txt >

Conditionals in Python cli with -m oneliner

2016-04-09 Thread gvim
Given that this work in a Python 3 repl: import re txt = "Some random text" if re.search(r"\b\w{4}\b", txt): txt 'Some random text' and this works on the command line, printing all lines in logs.txt: $ python3 -m oneliner -ne 'line' logs.txt . why does this fail: $ python3 -m