On Sun, May 6, 2012 at 3:45 PM, Michel Donais <donais@telupton.com> wrote:
> First trial from root
>
> [root@serveur ~]# python
> Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import libuser
>
> "no error there; so it found it's way to libuser"
>
>>>> print (sys.path)
> Traceback (most recent call last):
> *File "<stdin>", line 1, in ?
> NameError: name 'sys' is not defined
>
> "here it seem that there is no path defined
You need to import sys
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Second trial (non-root) /usr/michel
>
> [michel@serveur ~]$ python
> Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> inport libuser
import not inport
> *File "<stdin>", line 1
> * *inport libuser
> * * * * * * * * ^
> SyntaxError: invalid syntax
>>>>
>>>>
>>>> print(sys.path)
> Traceback (most recent call last):
> *File "<stdin>", line 1, in ?
> NameError: name 'sys' is not defined
>>>>
>
>
> I think we are near a solution
>
> ---
> Michel Donais
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
05-06-2012, 09:51 PM
Ljubomir Ljubojevic
loosing applications
On 05/06/2012 11:45 PM, Michel Donais wrote:
> inport libuser
its: import libuser, M instead of N
--
Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe
Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
05-06-2012, 11:18 PM
"Michel Donais"
loosing applications
>From root
[root@serveur ~]# python
Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libuser
>>> print (sys.path)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'sys' is not defined
>>> import sys
>>> print (sys.path)
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>>> import libuser
>>>
Larry Martell seem's to have the right way.
sys is not defined.
Where should I pout it to get it permanent aund use pirut under X
[root@serveur ~]# su michel
[michel@serveur root]$ python
Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libuser
>>> print (sys.path)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'sys' is not defined
>>> import sys
>>> print (sys.path)
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>>>
>>>
[michel@serveur root]$ >>> import sys
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>> print (sys.path)
bash: syntax error near unexpected token `>'
[michel@serveur root]$
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
[michel@serveur root]$ >>> import libuser
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>>
bash: syntax error near unexpected token `>'
[michel@serveur root]$ [root@serveur ~]# su michel
[michel@serveur root]$ [michel@serveur root]$ python
bash: [michel@serveur: command not found
[michel@serveur root]$ Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
bash: syntax error near unexpected token `('
[michel@serveur root]$ [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
bash: syntax error near unexpected token `('
[michel@serveur root]$ Type "help", "copyright", "credits" or "license" for
more information.
[michel@serveur root]$ >>> import libuser
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>> print (sys.path)
bash: syntax error near unexpected token `>'
[michel@serveur root]$ Traceback (most recent call last):
bash: syntax error near unexpected token `most'
[michel@serveur root]$ File "<stdin>", line 1, in ?
bash: File: command not found
[michel@serveur root]$ NameError: name 'sys' is not defined
bash: NameError:: command not found
[michel@serveur root]$ >>> import sys
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>> print (sys.path)
bash: syntax error near unexpected token `>'
[michel@serveur root]$
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
--
Michel Donais
Donais & Fils Inc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
05-07-2012, 07:47 AM
Jesus del Valle
loosing applications
>
> Larry Martell seem's to have the right way.
> sys is not defined.
>
> Where should I pout it to get it permanent aund use pirut under X
>
Hi Michel. This is only to print a sys variable; you don't need to do
anything there. So your default python finds the libuser library, the error
you saw before with import libuser is not coming from this python, at least
as root. Does it make sense to remove pirut and re-install it? I don't use
it, I have absolutely no idea which consequences it may have removing and
reinstalling pirut for software that was already installed under pirut.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
05-08-2012, 12:35 AM
"Michel Donais"
loosing applications
> Hi Michel. This is only to print a sys variable; you don't need to do
> anything there. So your default python finds the libuser library, the
> error
> you saw before with import libuser is not coming from this python, at
> least
> as root. Does it make sense to remove pirut and re-install it? I don't use
> it, I have absolutely no idea which consequences it may have removing and
> reinstalling pirut for software that was already installed under pirut.
It's already been done, uninstall and re-install pirut without success. The
version removed end the re-installed one were at the same level
For Centos-5.8 I've a test machine both are at the same level of update.
If I do >>>print (sys.path) on the production machine, I get