imcs ee ha scritto:

> do u really need read something even when you run the scripts2.py directly?
> why not just change script2.py to
>  #script2.py
> if __name__ == "__main__":
>     x=sys.stdin.read()
>     print 'passed'
> else:
>     print 'passed from else branch'
>
> is it what  you want? or anything i misunderstand.

it won't do. clever btw.
Script2 is not a module, it's a program that _could_ receive input via
pipe.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to