mathialo / bython

Python with braces. Because python is awesome, but whitespace is awful.
MIT License
2.13k stars 54 forks source link

Add -r that works like python -c, for one-liners #33

Open d33tah opened 4 years ago

d33tah commented 4 years ago

Thanks for bython, I like it! Could you add -r that reads the code from argv as opposed to the filename, so that I could use it in one-liners?

martindorey commented 8 months ago

I was so excited but, yeah, this was the closest I got to getting it to work - no error message, which seems surprising too:

martind@stormy:~$ echo 'for i in range(10) { print("please"); }' | ~/.local/bin/bython /dev/stdin
martind@stormy:~$