Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
arm [SOLVED by changing python]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Mon Nov 10, 2014 7:47 pm    Post subject: arm [SOLVED by changing python] Reply with quote

i hope i am in right section, so i emerged net-misc/arm, but:

Code:
grom@kishta ~ $ arm
  File "/usr/share/arm/prereq.py", line 65
    print "TorCtl successfully installed"
                                        ^
SyntaxError: invalid syntax
grom@kishta ~ $ arm
  File "/usr/share/arm/prereq.py", line 65
    print "TorCtl successfully installed"
                                        ^
SyntaxError: invalid syntax
grom@kishta ~ $ arm --help
  File "/usr/share/arm/prereq.py", line 65
    print "TorCtl successfully installed"
                                        ^
SyntaxError: invalid syntax
grom@kishta ~ $

what is going on here?
_________________
Kind regards, Goran Mitic

alive
while true
kick ass


Last edited by while true on Tue Nov 11, 2014 12:28 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Nov 10, 2014 10:02 pm    Post subject: Reply with quote

At first glance it looks like you're trying to run a python2 script in python3. Try running it as "python2 `which arm`"
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Mon Nov 10, 2014 10:40 pm    Post subject: Reply with quote

hello Ant,
Code:
grom@kishta ~ $ python2 `which arm`
  File "/usr/bin/arm", line 2
    if [ "$0" = /usr/bin/arm ]; then
              ^
SyntaxError: invalid syntax
grom@kishta ~ $


Code:
grom@kishta ~ $ eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.3 *
  [3]   python3.4
grom@kishta ~ $


aha, should i change python?
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Mon Nov 10, 2014 11:29 pm    Post subject: Reply with quote

It looks like /usr/bin/arm is a shell script that runs the real arm for you. Yes, switching your system Python to Python2 should work. If it does, you should file a bug to have arm always use Python2 for that version, since it will require code patches before it can be run in Python3.
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Tue Nov 11, 2014 12:27 am    Post subject: Reply with quote

Code:
kishta grom # eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.3 *
  [3]   python3.4
kishta grom # eselect python set 1
kishta grom # eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.3
  [3]   python3.4
kishta grom # arm
Connection refused. Is the ControlPort enabled?
kishta grom #


I guess now it works, but i hit another problem, kheh, what is ControlPort, but i'll deal with that.

so, about this python change, this affects also other programs?
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Nov 11, 2014 12:44 am    Post subject: Reply with quote

It shouldn't have any negative effect, because most up-to-date python programs should call python2 or python3 explicitly. Leaving the system python as v2 is the safest option since all legacy code would be written expecting /usr/bin/python to be v2.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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