Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac 21874 using bytes everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Nov 16, 2016
1 parent 169eb21 commit 07d262a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage_setup/autogen/pari/parser.py
Expand Up @@ -46,12 +46,12 @@ def pari_share():
sage: from sage_setup.autogen.pari.parser import pari_share
sage: pari_share()
u'.../share/pari'
'.../share/pari'
"""
from subprocess import Popen, PIPE
gp = Popen(["gp", "-f", "-q"], stdin=PIPE, stdout=PIPE)
out = gp.communicate(b"print(default(datadir))")[0]
datadir = out.strip().decode()
datadir = out.strip()
if not os.path.isdir(datadir):
raise EnvironmentError("PARI data directory {!r} does not exist".format(datadir))
return datadir
Expand Down Expand Up @@ -81,7 +81,7 @@ def read_pari_desc():
'prototype': 'Gp',
'section': 'transcendental'}
"""
with open(os.path.join(pari_share(), 'pari.desc')) as f:
with open(os.path.join(pari_share(), b'pari.desc')) as f:
lines = f.readlines()

n = 0
Expand Down

0 comments on commit 07d262a

Please sign in to comment.