In command line, i run my script as follows:
cat sample.log | python -B main.py logsource
How do i debug the main.py and provide:
- sample.log as
sys.stdin -Bfor pythonlogsourceas input parameter (sys.argv[1])
I'm using Python 3 if it matters.
Piping a file to stdin isn't supported when launching a debug process from Wing. You can, however:
Another option is to add 'import wingdbstub' to main.py as described in http://wingware.com/doc/debug/debugging-externally-launched-code to start debug. Then you can just type the command line as above and don't need to set anything in Project Properties or File Properties.