Re: Printing from euphoria on OSX box
- Posted by dukester Nov 07, 2009
- 1018 views
Hey...
Back to try Euphoria for the second time... ;)
Working my way through the examples in:
"A Beginner's Guide to Euphoria"
The line:
file_id = open("LPT1","w")
in one of the examples, produces NO JOY...
LPT1 seems too Microsoft-centric. What are the equivalents for Linux, FreeBSD and OSX. I've searched the available docs with no luck. TIA.. dukester
For Linux and FreeBSD, you can replace "LPT1" with "/dev/lp" or "/dev/lp0" if you are using an old parallel port printer.
If you are using USB, it is tricker. You need to have a good understanding of the OS's device node naming conventions (devfs on FreeBSD and probably udev on Linux) to figure it out.
It is probably easier to print on Linux and FreeBSD by writing to a temporary file (e.g. "/tmp/temp.txt") and then running lpr (e.g. system("lpr /tmp/temp.txt", 2) ) than trying to open and write to the printer directly.
Thanks for the quick reply!
I'm using USB on an OSX Leopard box at the moment. I'll give "/dev/lp" or "/dev/lp0" a try, just for hellery. However, like you suggest, printing the file from the CLI might me way easier.
Be-that-as-it-may, IMHO, this is an issue that should be resolved at the developer(s) level ASAP.
Thanks again... dukester