Date: Sun, 14 Sep 2003 13:15:47 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: Jeremy Messenger <mezz7@cox.net> Cc: freebsd-gnome@freebsd.org Subject: Re: Need the help on hack gDesklets to kill the 'Linuxish' in Python. Message-ID: <20030914131547.7dd0ff6d.Alexander@Leidinger.net> In-Reply-To: <oprvgimioo8ckrg5@smtp.central.cox.net> References: <oprvfg73we8ckrg5@smtp.central.cox.net> <20030913161106.30288fe4.Alexander@Leidinger.net> <oprvgimioo8ckrg5@smtp.central.cox.net>
index | next in thread | previous in thread | raw e-mail
On Sat, 13 Sep 2003 16:14:32 -0500
Jeremy Messenger <mezz7@cox.net> wrote:
> Ok, I have tested them and they don't patch correct, so here's attaches of
> cleaned patches.. I cleaned very few mistyped too. :-) I have tried to run
> it with the SysInfo and I keep get this..
>
> ==============================
> Traceback (most recent call last):
> File "/usr/X11R6/share/gnome/gdesklets/factory/SensorFactory.py", line
> 55, in create_sensor
> module = __import__(name)
> File "./SysInfo/__init__.py", line 5, in ?
> import libdesklets as lib
> File "/usr/X11R6/share/gnome/gdesklets/libdesklets/__init__.py", line
> 56, in ? cpu = CPU()
> File "/usr/X11R6/share/gnome/gdesklets/libdesklets/CPU.py", line 25, in
> __init__
> os = lib.sys.get_os()
> AttributeError: 'module' object has no attribute 'sys'
> 'module' object has no attribute 'sys'
> ==============================
>
> I tried to add the 'import sys' and it still doesn't work.. I am not sure
> what to do with the 'lib.sys.get_os()', which I normal use 'sys.platform'
> for OS stuff.
"import sys" is wrong, libdesklets has a "sys"-part too. I haven't
tested it, but I think it would be enough to put the "sys = Sys()" line
in /usr/X11R6/share/gnome/gdesklets/libdesklets/__init__.py in front of
every other assignment (if sys doesn't use a function of those other
parts; if it does, we have to change the OS detection to use the python
way (sys.platform)).
I haven't send this to bugzilla yet, as it isn't tested. When it runs
flawlessly, I'm OK with submitting it.
Bye,
Alexander.
--
Yes, I've heard of "decaf." What's your point?
http://www.Leidinger.net Alexander @ Leidinger.net
GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030914131547.7dd0ff6d.Alexander>
