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

Porting to python 3 #4

Open
sulheim opened this issue Dec 5, 2016 · 1 comment
Open

Porting to python 3 #4

sulheim opened this issue Dec 5, 2016 · 1 comment

Comments

@sulheim
Copy link

sulheim commented Dec 5, 2016

Is there any plans of porting metdraw to python 3?

@dsurujon
Copy link

dsurujon commented Jul 7, 2017

I made the following quick changes to get it to work with Python 3:

  • Fix all print statements in metdraw.py, model.py, sbml.py to have parentheses
  • There's no need to convert unicode to str in Py3. So in util.py line 18, you should have unicode_to_str=False
  • In sbml.py line 78 the variable notes can be None. Handle this with an if/else statement
	if notes == None: notetext = ""
	else: notetext=ET.tostring(notes)
  • In gpr.py line 33, open the file with wb instead of w
  • In layout.py replace all occurences of rids.next() with next(rids)

You can find it in my forked repo here. Hope it helps!

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

2 participants