Re: Printing from euphoria on OSX box

new topic     » goto parent     » topic index » view thread      » older message » newer message
dukester said...

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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu