Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Older LaserJets' PJL requires Backslash '\' Path Separator, not Forward Slash '/' #80

Open
HughHood opened this issue Jun 8, 2023 · 0 comments

Comments

@HughHood
Copy link

HughHood commented Jun 8, 2023

After testing PRET with two different LaserJet 4050N's and receiving errors on simple things like 'ls' commands, I put it in Debug mode and saw why.

PRET was issuing forward slashes '/' as path separators when sending commands to the printer. The LaserJet 4050's (and perhaps others) choke on this.

The fix is found in the helper.py file at line 510:

class const(): # define constants
SEP = '/' # use posixoid path separator

By changing it to:

SEP = '\' # use backslash path separator (LJ 4050N, others)

PRET worked fine. Note, the backslash must be escaped by prefacing it with a backslash.

I might suggest putting a comment to this effect in the helper.py file, and also in the main Readme file.

I suppose you could put some logic in the scripts to change SEP based on the printer model, but at least a comment would direct users how to fix this themselves if they have a printer that requires Backslashes in file paths.

Thanks. I'm enjoying getting to know PRET, although I have yet to be able to access the main LynxOS directories on the 4050's by using the \...\...\...\ technique.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant