Navigation Menu

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

python when python3 is the default system #148

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 1 comment
Open

python when python3 is the default system #148

GoogleCodeExporter opened this issue Apr 18, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. On some Linux systems (for example Archlinux), python3 is the default
2. A call to python will start the python 3 interpreter, while python 2 is 
called with "python2".

What is the expected output? What do you see instead?
When running txt2tags with python 3 we get some errors ("SyntaxError: invalid 
syntax")

Please use labels and text to provide additional information.

Python 3 was released at the end of 2008 and is considered the default by 
python.org: "At the time of writing (July 4, 2010), the final 2.7 release is 
out, with a statement of extended support for this end-of-life release. The 2.x 
branch will see no new major releases after that. 3.x is under active 
development and has already seen stable releases, such as the recent 3.2. This 
means that all recent standard library improvements, for example, are only 
available in Python 3.x."
http://wiki.python.org/moin/Python2orPython3

On archlinux, the packager changed 
#!/usr/bin/env python

to 
#!/usr/bin/env python2

but for windows users, for example, they don't have a clue why it's not working.

Would it be possible to test (maybe not each time, but in case of error) if a 
"python2" binary is available, or if only python 3 is available, and adapt 
txt2tags behavior according to this.

For example, in my makefile, I've added this code:

ifeq ($(wildcard /usr/bin/python2),)
 PYTHONVER = python 
else 
 PYTHONVER = python2
endif

TXT2TAGS = $(PYTHONVER) $(PATHTOTXT2TAGS)/txt2tags


Original issue reported on code.google.com by eforg...@gmail.com on 29 May 2012 at 7:56

@GoogleCodeExporter
Copy link
Author

This may be of interest here: 
http://pymolurus.blogspot.de/2012/07/python-launcher-brings-shebang-line.html

Original comment by jendriks...@gmail.com on 26 Jul 2012 at 10:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant