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

Add to lines at the top to make it workable in python 2.7. #1

Open
TobiasWegener opened this issue Jan 29, 2018 · 2 comments
Open

Add to lines at the top to make it workable in python 2.7. #1

TobiasWegener opened this issue Jan 29, 2018 · 2 comments

Comments

@TobiasWegener
Copy link

TobiasWegener commented Jan 29, 2018

Hallo,
you could may add only two lines at the top to make it work for Python 2.7:

 from __future__ import division
 from __future__ import unicode_literals

At least that works for me. Are you interested in more input?
Because I think it is very useful tool, and worth some tinkering.

@ltegg
Copy link
Owner

ltegg commented Feb 4, 2019

Hi Tobias,

I have included the lines at the start of the file. I don't have a Python 2.7 installation handy to check if they've worked. Let me know if more changes need to be made.

@TobiasWegener
Copy link
Author

Hi Itegg,
I did try to run it in the terminal and this was the result:
:~/ipython/Elingham_diagram/Test27$ python ellingham.py File "ellingham.py", line 548 a1.plot([float(row[0]), float(row[1])],[float(row[2]), float(row[3])], **linedict, color='r', ls='-', alpha=1,) ^ SyntaxError: invalid syntax
I think the main problem here is **linedict because the script for python 3.5 did work with the additions of the two lines above.

This version which is running fine in on my pc (with python 2.7.) is this ():
# Add in the line segments from the oxide data for row in oxss: a1.plot(row[0:2],row[2:4], color='r', ls='-', alpha=1)
But I am not sure, if it is worth putting much effort into it.

In general, if u need some help to put your program in some modules or the data in separate files, I may, could help.
Thanks for trying, if u have something else to test just let me know.;)
Best regards
Tobias

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