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

Escape backslashes to avoid "invalid escape sequence '\s'" syntax warnings #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pythontex/pythontex3.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,15 +546,15 @@ def do_upgrade_compatibility(data, old_data, temp_data):
data['settings']['outputdir'] != '.'):
data['compatibility'] = c
data['settings']['workingdir'] = data['settings']['outputdir']
msg = '''
msg = r'''
**** PythonTeX upgrade message ****
Beginning with v0.14, the default working directory is the document
directory rather than the output directory. PythonTeX has detected
that you have been using the output directory as the working directory.
It will continue to use the output directory for now. To keep your
current settings long-term and avoid seeing this message in the future,
add the following command to the preamble of your document, right after
the "\\usepackage{pythontex}": "\setpythontexworkingdir{<outputdir>}".
the "\usepackage{pythontex}": "\setpythontexworkingdir{<outputdir>}".
If you wish to continue with the new settings instead, simply delete
the file with extension .pkl in the output directory, and run PythonTeX.
**** End PythonTeX upgrade message ****
Expand Down Expand Up @@ -1807,7 +1807,7 @@ def run_code(encoding, outputdir, workingdir,
# Get the gobbleation. This is used to determine if
# other lines containing the basename are a continuation,
# or separate messages.
errgobble = match('(\s*)', line).groups()[0]
errgobble = match(r'(\s*)', line).groups()[0]
if start_errgobble is None:
start_errgobble = errgobble
# Only issue a message and track down the line numer if
Expand Down Expand Up @@ -2072,7 +2072,7 @@ def run_code(encoding, outputdir, workingdir,
# Get the gobbleation. This is used to determine if
# other lines containing the basename are a continuation,
# or separate messages.
errgobble = match('(\s*)', line).groups()[0]
errgobble = match(r'(\s*)', line).groups()[0]
if start_errgobble is None:
start_errgobble = errgobble
# Only issue a message and track down the line numer if
Expand Down