You are not logged in.

#1 2010-11-26 17:16:04

rae
Member
Registered: 2010-11-09
Posts: 9

python is now python2

Well, i can't do anything with python3 yet. So i removed python3, but some of my programs calls python instead of python2 (e.g. emacs, and others). So, i created a file called python with the code:

 exec python2 "$@" 

in a bin directory of mine. So, python is now python2 for me. Is there a problem of doing such a thing if i don't mean to install python3 ?

Offline

#2 2010-11-26 19:24:24

denisfalqueto
Member
From: ES, Brazil
Registered: 2006-03-24
Posts: 197

Re: python is now python2

You would be better with a symlink.


Satisfied users don't rant, so you'll never know how many of us there are.

Offline

#3 2010-11-26 23:20:59

rae
Member
Registered: 2010-11-09
Posts: 9

Re: python is now python2

I've tried that, but it seems that the symlink takes a little bit to load the program. I don't know which option is more efficient.

Offline

#4 2010-11-27 02:58:26

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: python is now python2

A symlink is much more efficient (it operates on the filesystem level). Your method calls bash which then calls python2.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#5 2010-11-27 07:34:21

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: python is now python2

A lot of programs have been recompiled for python3 on arch. Wouldn't it create problems, if you just removed python3.

Offline

#6 2010-11-27 14:38:08

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: python is now python2

The best solution is to actually fix the apps you are running instead of making ugly workarounds. It should be rather trivial to make emacs call python2 instead of python.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2010-11-27 15:06:39

rae
Member
Registered: 2010-11-09
Posts: 9

Re: python is now python2

Stebalien wrote:

A symlink is much more efficient (it operates on the filesystem level). Your method calls bash which then calls python2.

Thanks, I'll go with the symlink...

x33a wrote:

A lot of programs have been recompiled for python3 on arch. Wouldn't it create problems, if you just removed python3.

Actually I manually installed python3 and it had no dependencies when I removed. Maybe if I install some program in the future that needs python3 then I'll have problems.

Mr.Elendig wrote:

The best solution is to actually fix the apps you are running instead of making ugly workarounds. It should be rather trivial to make emacs call python2 instead of python.

Ok, but I have plenty of scripts and other programs who call python and is written in python2. I'll fix that, but only when I'm ready to change for python3.

Offline

#8 2010-11-27 16:47:31

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: python is now python2

rae wrote:

Ok, but I have plenty of scripts and other programs who call python and is written in python2. I'll fix that, but only when I'm ready to change for python3.

sed(1) will take care of those.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB