PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

python was: transputers again was: The dissolution of Commodore 2910


Your Ad Here

Your Ad Here

My tool of first resort tends to be less uniform the more I use other tools. The habitual tool of first use may often be inappropriate.

python was: transputers again was: The dissolution of Commodore 2912
Yes, and that shows that even in one program (grep) there's the brain damage of two different regexp parsers. My point is that everyone implements them slightly differently with different bugs and features, so...

e.g. I've recently had to try to get netcat operating sanely from within a large business application environment that knows little more about the world than its database, files and (*nix) pipes. The application was required to write directly to a known port number at an IP address. ("print" server)

I spent a couple of hours trying to get netcat to terminate by using a shell wrapper... which it'd do perfectly no matter how hard I hammered it from an interactive shell environment. But it consistently wedged inside the application environment.

Time was up! I stepped back and regained perspective. Thought hard about what had to be done and wrote a short Python hack:

#!-usr-bin-python import socket, sys

python was: transputers again was: The dissolution of Commodore 2911
Ah. But these aren't regexps, and are far easier to use, since regexps never quite do what I want, and everything...

s = socket.socket(socket.AFINET,socket.SOCKSTREAM) s.connect((sys.argv1,int(sys.argv2))) s.sendall(sys.stdin.read())

Which works fairly well and is less obtuse than the shell program. The production version of course does some error handling and is more readable.

It helps to keep all your tools well-oiled. -- "Bernd Felsche - Innovative Reckoning, Perth, Western Australia ASCII ribbon campaign "Laws do not persuade just because X against HTML mail they threaten." and postings Lucius Annaeus Seneca, c. 4BC - 65AD.



Your Ad Here

List | Previous | Next

python was: transputers again was: The dissolution of Commodore 2911

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

python was: transputers again was: The dissolution of Commodore 2909