From owner-freebsd-gnome@FreeBSD.ORG Sun Sep 14 04:13:51 2003 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C36F216A4C0 for ; Sun, 14 Sep 2003 04:13:51 -0700 (PDT) Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8704543FE0 for ; Sun, 14 Sep 2003 04:13:50 -0700 (PDT) (envelope-from Alexander@Leidinger.net) Received: from fwd00.aul.t-online.de by mailout05.sul.t-online.com with smtp id 19yUpA-0000xN-02; Sun, 14 Sep 2003 13:13:48 +0200 Received: from Andro-Beta.Leidinger.net (Gh4qV8ZFge0xiquxoiNfdbit-2YuifpLmuw0gJxII7XZh7JsPeQewZ@[217.229.213.254]) by fmrl00.sul.t-online.com with esmtp id 19yUp6-1qM91k0; Sun, 14 Sep 2003 13:13:44 +0200 Received: from Magelan.Leidinger.net (Magelan [192.168.1.1]) h8EBEm3t000925; Sun, 14 Sep 2003 13:14:49 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magelan.Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.12.9/8.12.9) with SMTP id h8EBFlns001156; Sun, 14 Sep 2003 13:15:47 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sun, 14 Sep 2003 13:15:47 +0200 From: Alexander Leidinger To: Jeremy Messenger Message-Id: <20030914131547.7dd0ff6d.Alexander@Leidinger.net> In-Reply-To: References: <20030913161106.30288fe4.Alexander@Leidinger.net> X-Mailer: Sylpheed version 0.9.5claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: Gh4qV8ZFge0xiquxoiNfdbit-2YuifpLmuw0gJxII7XZh7JsPeQewZ@t-dialin.net cc: freebsd-gnome@freebsd.org Subject: Re: Need the help on hack gDesklets to kill the 'Linuxish' in Python. X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2003 11:13:51 -0000 On Sat, 13 Sep 2003 16:14:32 -0500 Jeremy Messenger 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