Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-27 Thread Patrick Murphy
Thank you Ben, people who follow up on an issue they have found a solution for are good people. On Aug 23, 2012 1:35 PM, "Ben Booth" wrote: > Ben Booth wrote: > > > In case anyone's still interested in this, I found a pacman.conf option > > called NoExtract, which lets you tell pacman not to over

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-23 Thread Ben Booth
Ben Booth wrote: > In case anyone's still interested in this, I found a pacman.conf option > called NoExtract, which lets you tell pacman not to overwrite certain > files and directories in the filesystem. So you could add the following > line to /etc/pacman.conf: > > NoExtract = /usr/bin/python

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-23 Thread Ben Booth
In case anyone's still interested in this, I found a pacman.conf option called NoExtract, which lets you tell pacman not to overwrite certain files and directories in the filesystem. So you could add the following line to /etc/pacman.conf: NoExtract = /usr/bin/python which would prevent pacman

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-19 Thread Rémy Oudompheng
On 2012/8/17 Ben Booth wrote: > Lots of python scripts still use #!/usr/bin/python instead of explicitly > stating which version of python to use. Here's quick trick to make running > various python version 2 or 3 scripts easier: > > remove the /usr/bin/python symlink and replace with this shell s

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-18 Thread Ben Booth
Matthew Monaco wrote: > On 08/17/2012 04:14 PM, Ben Booth wrote: > > Don't know if you did this by accident -- and not a huge deal -- but you > shouldn't have included the vote action in the link. > Oops, my mistake. In any case, the request was rejected. :(

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Anthony ''Ishpeck'' Tedjamulia
On Fri, Aug 17, 2012 at 11:09:06AM -0700, Ben Booth wrote: > remove the /usr/bin/python symlink and replace with this shell script: > > #!/usr/bin/env bash > exec /usr/bin/"${PYTHON:-python3}" "$@" Bravo! I approve. This solution is 0.99 times as good as the option to just not have Python 3

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Matthew Monaco
On 08/17/2012 04:14 PM, Ben Booth wrote: > Ben Booth wrote: > >> >> Maybe I'll submit a feature request to the python package maintainer to >> see if they think it's a good idea. > > I submitted a feature request in case anyone's interested: > > https://bugs.archlinux.org/index.php?do=details&ac

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Ben Booth
Ben Booth wrote: > > Maybe I'll submit a feature request to the python package maintainer to > see if they think it's a good idea. I submitted a feature request in case anyone's interested: https://bugs.archlinux.org/index.php?do=details&action=details.addvote&task_id=31179

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Ben Booth
Ben Booth wrote: > Damjan wrote: > >>> The only problem with >>> this approach is that /usr/bin/python is owned by the python package, so >>> if you upgrade the python package it might create problems. Any one know >>> of some way to work around this problem? >> >> Just put your script in /usr/l

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Ben Booth
Damjan wrote: >> The only problem with >> this approach is that /usr/bin/python is owned by the python package, so >> if you upgrade the python package it might create problems. Any one know >> of some way to work around this problem? > > Just put your script in /usr/local/bin But then some scri

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Δημήτρης Ζέρβας
well, you're right... :P so, no cronjobs XD -- (\_ /) copy the bunny to your profile (0.o ) to help him achieve world domination. (> <) come join the dark side. /_|_\ (we have cookies.) On Sat, Aug 18, 2012 at 1:36 AM, Damjan wrote: > but which of is going to be executed? >> /usr/bin or /usr/

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Damjan
but which of is going to be executed? /usr/bin or /usr/local/bin? /usr/local/bin is before /usr/bin in your PATH environment variable, so the shell will first look there for programs. Check "echo $PATH" to see what your path is. -- дамјан

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Δημήτρης Ζέρβας
but which of is going to be executed? /usr/bin or /usr/local/bin? -- (\_ /) copy the bunny to your profile (0.o ) to help him achieve world domination. (> <) come join the dark side. /_|_\ (we have cookies.) On Fri, Aug 17, 2012 at 9:09 PM, Ben Booth wrote: > Lots of python scripts still use #

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Δημήτρης Ζέρβας
genius! :) maybe a cronjob? (every 24 hours overwrite the script) (silly one) maybe a startup overwrite? or an aur package? (with interactive question if PYTHON is not set!) -- (\_ /) copy the bunny to your profile (0.o ) to help him achieve world domination. (> <) come join the dark side. /_|_\

Re: [arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Damjan
The only problem with this approach is that /usr/bin/python is owned by the python package, so if you upgrade the python package it might create problems. Any one know of some way to work around this problem? Just put your script in /usr/local/bin -- -- дамјан

[arch-general] simple trick to make dealing with python 2/3 scripts easier

2012-08-17 Thread Ben Booth
Lots of python scripts still use #!/usr/bin/python instead of explicitly stating which version of python to use. Here's quick trick to make running various python version 2 or 3 scripts easier: remove the /usr/bin/python symlink and replace with this shell script: #!/usr/bin/env bash exec /usr/