Virtual COM port on Linux

Dave Smith dave at thesmithfam.org
Mon Mar 15 11:57:33 MDT 2010


Andrew McNabb wrote:
> Write that to myscript.py and your one-liner is "myscript.py". :) Python
> really isn't about one-liners.  Fortunately, modern Linux distributions
> come with filesystems, so creating files is easy. :)

Well, that's what I did, and it looks like this, which is nice:

   # cat reboot-comcast-cable-modem
   #!/bin/bash
   relay-off
   sleep 10
   relay-on

Totally cool. By the way, to do the equivalent on Windows, I had to 
write 20 lines of C++ code and remember what LPVOID and GetLastError() 
mean. Plus, I had to manually setup the baud rate and other settings. 
Why does Microsoft hate us?

Since this worked so seamlessly, I think I might buy the bigger version 
and start working on my Linux-based sprinkler control project... Hmmm...

--Dave


More information about the PLUG mailing list