Simulate socket with files or stdin/stdout
Josiah Carlson
jcarlson at uci.edu
Wed Mar 31 18:55:00 EST 2004
[
> Now my question is, if someone has done something similar and can give me
> some hints where to start, what to look for etc. Maybe someone even has
> another idea how to solve this problem.
>
> A skript that does something similar like "netcat" would be a good starting
> point, since I'm really new to python programming.
>
> The script should be usable on the MAC, PC and UNIX platform.
On OSX and *nix, you'll have no problems using stdin and stdout for
communication with Python (I don't know about Modula2). In Windows,
you're going to have a few issues with stdin and stdout, but there are
workarounds using pywin32.
On OSX and *nix, you'll have no problems using files for communicating
with Python. In Windows, files can't be used as pipes like they are in
*nix, so this isn't even an option.
I'd say try for stdin/stdout, and check out the documentation on doing
stdin and stdout with pywin32.
- Josiah
More information about the Python-list
mailing list