python 2.4

32 views
Skip to first unread message

Fab

unread,
Dec 28, 2009, 4:43:38 AM12/28/09
to xyzcmd
Hi,

I am not sure, how hard it is, but is there a chance that the
commander works with an old python 2.4 version as well? I would like
to use the commander on a remote cluster, which has still the old
version of python (actually I think like a lot of clusters). As xyzcmd
is especially useful for such remote usage, this would be quite nice.

Best Regards!
Fab

Max E. Kuznecov

unread,
Dec 28, 2009, 5:33:32 AM12/28/09
to xyz...@googlegroups.com
Hello!

Sure, I've already thought about this. In fact there are only two
2.5-specific features in use: inline if-else form and some 'with'
statements.
I'll make it for 0.0.3.

2009/12/28 Fab <f.braen...@gmx.de>:

--
~syhpoon

Fab

unread,
Dec 28, 2009, 7:55:15 AM12/28/09
to xyzcmd
Hi Max,

great! I am excited about 0.0.3 :-)

Best Regards!
Fab

On Dec 28, 11:33 am, "Max E. Kuznecov" <syhp...@syhpoon.name> wrote:
> Hello!
>
> Sure, I've already thought about this. In fact there are only two
> 2.5-specific features in use: inline if-else form and some 'with'
> statements.
> I'll make it for 0.0.3.
>

> 2009/12/28 Fab <f.braennstr...@gmx.de>:

Max E. Kuznecov

unread,
Dec 29, 2009, 5:46:58 PM12/29/09
to xyz...@googlegroups.com
Ok. I've commited python2.4 support to trunk.
I haven't tested it in great detail, but looks like it works.

P.S. The code appears much more uglier with those old 2.4 constructs :)
For example 2.5 code:

return (self.active if active else self.inactive).get_selected()

was replace with:

if active:
obj = self.active
else:
obj = self.inactive

return obj.get_selected()


But nevertheless, it was worth it ;)

2009/12/28 Fab <f.braen...@gmx.de>:


> Hi Max,
>
> great! I am excited about 0.0.3 :-)
>

--
~syhpoon

Fab

unread,
Dec 30, 2009, 3:07:30 AM12/30/09
to xyzcmd
Hi Max,

thanks!
Unfortunately, I a have some problems with the installation (testing
it on a current kubuntu/karmic). I am not sure, what I did before, but
right now I get this
error:

ceplx049~$ xyzcmd

Traceback (most recent call last):
File "/usr/local/bin/xyzcmd", line 25, in <module>
Launcher().run()
File "/home/gcae504/HOME/Software/xyz/lib/python2.6/site-packages/
libxyz/launcher.py", line 97, in run
self.xyz.screen.run_wrapper(self._run)
File "/home/gcae504/Desktop/urwid-0.9.9/urwid/raw_display.py", line
234, in run_wrapper
return fn()
File "/home/gcae504/HOME/Software/xyz/lib/python2.6/site-packages/
libxyz/launcher.py", line 115, in _run
panel = uilib.Panel(self.xyz)
File "/home/gcae504/HOME/Software/xyz/lib/python2.6/site-packages/
libxyz/ui/panel.py", line 46, in __init__
self.conf = self.xyz.conf[u"plugins"][u":sys:panel"]

I used the build.sh script, unpacked the bzip file and run python
setup.py install.
A second try with adding:

/usr/local/lib/python2.6/dist-packages/

to the pythonpath gives:

ceplx049~$ xyzcmd
Traceback (most recent call last):
File "/usr/local/bin/xyzcmd", line 23, in <module>
from libxyz import Launcher
File "/usr/local/lib/python2.6/dist-packages/libxyz/__init__.py",
line 29, in <module>

File "/usr/local/lib/python2.6/dist-packages/libxyz/core/
__init__.py", line 31, in <module>

ImportError: No module named odict


I am probably doing something stupid... do you have a hint!?
Thanks!
Fab

On Dec 29, 11:46 pm, "Max E. Kuznecov" <syhp...@syhpoon.name> wrote:
> Ok. I've commited python2.4 support to trunk.
> I haven't tested it in great detail, but looks like it works.
>
> P.S. The code appears much more uglier with those old 2.4 constructs :)
> For example 2.5 code:
>
> return (self.active if active else self.inactive).get_selected()
>
> was replace with:
>
> if active:
>     obj = self.active
> else:
>     obj = self.inactive
>
>  return obj.get_selected()
>
> But nevertheless, it was worth it ;)
>

> 2009/12/28 Fab <f.braennstr...@gmx.de>:

Max E. Kuznecov

unread,
Dec 30, 2009, 6:03:12 AM12/30/09
to xyz...@googlegroups.com
You are using python2.6 and urwid-0.9.9, right?
I'll try to reproduce this problem today.

2009/12/30 Fab <f.braen...@gmx.de>:

> --
>
> You received this message because you are subscribed to the Google Groups "xyzcmd" group.
> To post to this group, send email to xyz...@googlegroups.com.
> To unsubscribe from this group, send email to xyzcmd+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xyzcmd?hl=en.
>
>
>

--
~syhpoon

Fabian Braennstroem

unread,
Dec 30, 2009, 6:14:14 AM12/30/09
to xyz...@googlegroups.com
Yes, thanks!
Fabian

Max E. Kuznecov

unread,
Dec 30, 2009, 6:06:04 PM12/30/09
to xyz...@googlegroups.com
2009/12/30 Fab <f.braen...@gmx.de>:

Ok. I think I found it. The error occurs due to wrong system directory location.
xyzcmd thinks it is sys.prefix + share/xyzcmd, on ubuntu 9.10 (or with
python-2.6) the installer mistakenly installs system files to
/usr/local whereis python sys.prefix points to /usr.
I'll correct installer soon but in the meantime you can make symlinks
from /usr/local/share/xyzcmd to /usr/share/xyzcmd and from
/usr/local/lib/python2.6/dist-packages/libxyz to
/usr/lib/python2.6/dist-packages/libxyz or wherever your python
sys.prefix points to.

--
~syhpoon

Max E. Kuznecov

unread,
Jan 1, 2010, 7:58:29 PM1/1/10
to xyz...@googlegroups.com
After googling a bit more, I've found that this is an ubuntu python
(distutils) issue
(https://lists.ubuntu.com/archives/ubuntu-devel/2009-February/027439.html)
and instead of manually creating symlinks you can just install xyzcmd
with:
setup.py install --install-layout=deb

I think it is time for creating distro-specific packages ;)

2009/12/31 Max E. Kuznecov <syh...@syhpoon.name>:


> 2009/12/30 Fab <f.braen...@gmx.de>:
>> Hi Max,
>>

--
~syhpoon

Fabian Braennstroem

unread,
Jan 2, 2010, 1:40:29 PM1/2/10
to xyz...@googlegroups.com
Hi Max,

thanks for your help! It works now.. on the cluster as well :-)
Is there an option to change the installation path? I know, the --prefix
one, but this does not change the SYSTEM_DIR in config.py. I set it now
by hand.

Regards!
Fab

Max E. Kuznecov

unread,
Jan 2, 2010, 2:31:17 PM1/2/10
to xyz...@googlegroups.com
Yup, currently it's kinda mess with installation prefix, I'm creating
a ticket to resolve the problem once and for all.

2010/1/2 Fabian Braennstroem <f.braen...@gmx.de>:


> Hi Max,
>
> thanks for your help! It works now.. on the cluster as well :-)
> Is there an option to change the installation path? I know, the --prefix
> one, but this does not change the SYSTEM_DIR in config.py. I set it now
> by hand.
>


--
~syhpoon

Reply all
Reply to author
Forward
0 new messages