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

SyntaxWarning: invalid escape sequence '\.' #6

Open
nerun opened this issue Aug 11, 2024 · 0 comments
Open

SyntaxWarning: invalid escape sequence '\.' #6

nerun opened this issue Aug 11, 2024 · 0 comments

Comments

@nerun
Copy link

nerun commented Aug 11, 2024

Both po2dsk and dsk2po has invalid escape sequences:

$ ./po2dsk.py test.po 
/home/nerun/Downloads/./po2dsk.py:34: SyntaxWarning: invalid escape sequence '\.'
  dskfilename = re.sub('\.po$', '', filenameIn, flags=re.IGNORECASE) + ".dsk"
/home/nerun/Downloads/dsk2po.py:31: SyntaxWarning: invalid escape sequence '\.'
  pofilename = re.sub('\.dsk$', '', dskfilename, flags=re.IGNORECASE) + ".po"
po2dsk - convert po files to dsk files
Writing dsk image to test.dsk

Easy to fix:

  • po2dsk, line 34: change \.po$ to \\.po$
  • dsk2po, line 31: change \.dsk$ to \\.dsk$

I am running Python version 3.12.4.

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