On Sat, 2003-07-12 at 01:58, Chris Schumann wrote:
> > From: Bob Tanner <tanner at real-time.com>
> 
> > If you are going to be wire-mangling you need to use /dev/parport0
> 
> > Here is code snippet for writing to /dev/parport0 in EPP mode.
> 
> Thanks for this Bob. I'll keep it in mind when I really want
> to do some serious interface stuff.
> 
> But for my current project, which is to toggle a TTL output,
> this is INSANE. If I have to write a program, it will be
> about three lines: 1) toggle bit, 2) wait, 3) toggle bit back.
> 
> Using any library is just too much work at this point.
> 
> Maybe you missed my original post, but I'd like to do this
> from inside a scripted language, and if it takes custom
> hardware, that's what it takes.

Looks like it could be done in python, but unfortunately needs
help from glue done in c.  Thought I would google to check out
the possibility of using python, and found this scary link:

http://bigasterisk.com/toilet/PythonToilet2.html

At least the toilet runs Slackware.

Also this post sounded like it could be useful:

-----
From: Jeff Epler (jepler at inetnebr.com)
Subject: Re: How can I use printer port in python?...
 
 View this article only
 Newsgroups: comp.lang.python
 Date: 2000-12-11 11:30:02 PST

 On Sun, 10 Dec 2000 20:02:24 +0900, skidrow at nownuri.net
  <skidrow at nownuri.net> wrote:
  >As the title says, I was wondering if there's anyway I can
  >
  >use printer port in python...
  >
  >

  In Unix, if your printer is named /dev/lp1, just use
   f = open("/dev/lp1", mode)
   and then look at the contents of the fcntl and FCNTL modules
   for ways to perform low-level manipulation of the printer.

   If you want to just write output to the printer, use
    f = os.popen("lpr", "w")
    and write to f.  You may need to get arguments to lpr, such as
    "-p<printer name>".

    There is bound to be a way to do it on Windows, but I don't have a clue how.

    There is probably no cross-platform way.

    Jeff

-----

I have not tried writing to a port in python this way, but hey if you are using
Linux or Unix, I would suppose you could treat the device as a file anyway.

Just a thought,
Kelly Black
KB0GBJ



_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list