خرید بک لینک

Vote count: 0

I am doing something need to use curl xxx | bash to run something. I created a python script with sys.stdin.readline() to test like this:

[python3] test.py


import sys
def read_input():
    input = sys.stdin.readline().rstrip()
    print(input)
read_input()

It works directly run by python3 test.py

test
test

But if I use echo 'python3 test.py' | bash, it will not stop to let me input something.

Any tips?

asked 13 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 19 فروردين 1396 ساعت: 16:35

صفحه بندی