Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python per User Settings
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
forrestfunk81
Guru
Guru


Joined: 07 Feb 2006
Posts: 565
Location: münchen.de

PostPosted: Thu Mar 27, 2014 7:12 pm    Post subject: Python per User Settings Reply with quote

Hallo zusammen,

ist es möglich die Python Version per User zu setzen? Bei Java geht das mit java-config. Bei Python kenn ich aber nur "eselect python set xxx" und das ist ja systemweit.

Hintergrund:
Mein System baue ich mit Python 3.3 und möchte das auch beibehalten. Aber ich baue auch Cyanogenmod auf dem Rechner und das Tool zum syncen der Repositories (repo) kann nur mit Python 2.7 umgehen.
_________________
# cd /pub/
# more beer
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5161

PostPosted: Thu Mar 27, 2014 7:44 pm    Post subject: Reply with quote

die python binaries werden versions bezogen installiert. im grunde müsstest du den aufruf des sync python scriptes so abändern, dass statt /usr/bin/python /usr/bin/python2.7 verwendet wird
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2537
Location: Konradsreuth (Germany)

PostPosted: Thu Mar 27, 2014 10:58 pm    Post subject: Reply with quote

Es reicht ja auch schon ein
Code:
#!/usr/bin/python2

oder
Code:
#!/usr/bin/python3

am Anfang der jeweiligen Dateien. Die genaue Version muss man gar nicht angeben.
Back to top
View user's profile Send private message
forrestfunk81
Guru
Guru


Joined: 07 Feb 2006
Posts: 565
Location: münchen.de

PostPosted: Sun Apr 06, 2014 11:10 am    Post subject: Reply with quote

Danke. Das Skript selbst ändern hat natürlich auch funktioniert :-)
_________________
# cd /pub/
# more beer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum