You are not logged in.
https://wiki.archlinux.org/index.php/Python
I have read the wiki. But, my understanding on how this works is confusing me. Where would I make this change if I have a program that needs this version of python. Anyone care to elaborate on the "shebang"? Thanks!!!!
Last edited by chessmaster (2012-02-01 17:51:57)
When you see a good move, wait — look for a better one.
Offline
It's the first line of the script, open it in a text editor.
[karol@black scripts]$ head bigpac
#!/usr/bin/env python
#
# bigpkg : find packages that require a lot of space on your system
# v0.3.0 (2011-06-21)
#
# Copyright (c) 2009-2011 by Allan McRae <allan@archlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or'shebang' is the '#!', that's how you pronounce it.
Last edited by karol (2012-02-01 16:57:26)
Offline
At the very beginning of your python file. That's where the shebang goes.
#!/usr/bin/env python for python 3
#!/usr/bin/env python2 for python 2.X
Offline
It's the first line of the script, open it in a text editor.
[karol@black scripts]$ head bigpac #!/usr/bin/env python # # bigpkg : find packages that require a lot of space on your system # v0.3.0 (2011-06-21) # # Copyright (c) 2009-2011 by Allan McRae <allan@archlinux.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or'shebang' is the '#!', that's how you pronounce it.
Okay thanks!!! I understand now. So when ever I see this at the begining I can just change it to python2.
When you see a good move, wait — look for a better one.
Offline