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
-B
for pythonlogsource
as input parameter (sys.argv[1]
)
I'm using Python 3 if it matters.