On Thu, Sep 10, 2009 at 9:32 AM, Chris Withers <[email protected]> wrote:
> Adrian Buehlmann wrote:
>>> python
>> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
>> on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>
> Hmm, why not 2.5.4?
2.5.2 and 2.5.4 are equivalent AFAIK. 2.5.4 backs off a bad fix (only
change) in 2.5.3.
>>>>> import gtk
>>>>> gtk.ver
>> (2, 14, 2)
>
> Why do you use gtk here rather than pygtk?
pygtk is what you want.
>> This is probably my PyGtk Version (the Python language binding for
>> Gtk)
>>
>> In my C:\GTK\manifest directory I see a file
>>
>> gtk+-bundle_2.14.7-20090119_win32.mft
>>
>> TortoiseHg requires Gtk+ 2.10 minimum (as I have learned recently)
>> and PyGtk 2.10 minimum.
>
> import pygtk
> pygtk.require('2.0')
> import gtk
>
> Then what is the 2.0 here?
that used to be standard operating procedure for PyGtk back when they
did the transition from GTK+ 1.N to GTK+ 2.N. It hasn't been required
in a long time, but you find references to it in a lot of example
code.
> C:\Program Files\TortoiseHg\gtk contains for me:
>
> libgtk-win32-2.0-0.dll
>
>> IIRC, the thg binary installer bundles PyGtk 2.12 and Gtk+ 2.16.
>
> Sadly, library.zip only includes the .pyo's, so I can't check this...
>
> Or maybe I can...
>
> Well no, but I can reproduce a bit more..
You can also do this:
hgtk --debugger log
It drops you in the debugger almost immediately.
> C:\LocalHG\thg>\Python25\python.exe
> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> sys.path[:]=["C:\\Program Files\\TortoiseHg\\library.zip"]
> >>> sys.path
> ['C:\\Program Files\\TortoiseHg\\library.zip']
> >>> import pygtk
> >>> pygtk.require('2.0')
> >>> sys.path
> ['C:\\Program Files\\TortoiseHg\\library.zip\\gtk-2.0', 'C:\\Program
> Files\\TortoiseHg\\library.zip']
> Hmm, okay, the above seems a bit bogus...
It's messy, but harmless.
> >>> import gtk
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "gtk\__init__.pyo", line 38, in <module>
> File "gobject\__init__.pyo", line 30, in <module>
> File "gobject\constants.pyo", line 22, in <module>
> ImportError: No module named _gobject
>
> However, I see \gobject\_gobject.pyd in library.zip, so this is a little
> confusing...
Yes, one other person reported this problem on IRC, and he also had
the full plethora of Python and GTK+ on his machine. We never did
figure this problem out, and that person decided to use THG from
source.
I suspect this is a DLL issue. My suggestion is to copy that
_gobject.pyd out of the library.zip and then run the dependency walker
on it and see if you are missing DLLs for it.
>> If you have Gtk+ and PyGtk innstalled, you probably might even
>> be able to run from source:
>
> Do I really want to tempt fate?
>
> Okay, installed gtk+ bundle 2.16.5-20090731_win32.zip and
> pygtk-2.12.1-3.win32-py2.5.exe...
>
>> hg clone http://bitbucket.org/tortoisehg/stable/ thg-stable
>> cd thg-stable
>> hg up stable
>
> I'm a hg newbie, why on earth do I have to do this having just cloned?!
When you clone, hg checks out the 'default' branch. Unless you like
living on our cutting edge, it's best to switch to the stable branch.
>> python hgtk
>
> C:\>\Python25\python.exe hgtk
> Traceback (most recent call last):
> File "hgtk", line 25, in <module>
> import pygtk
> ImportError: No module named pygtk
>
> Huh?
>
>
> C:\LocalHG\thg-stable>\Python25\python.exe
> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pygtk
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: No module named pygtk
> >>> import gtk
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "C:\Python25\lib\site-packages\gtk-2.0\gtk\__init__.py", line
> 38, in <mod
> ule>
> import gobject as _gobject
> ImportError: No module named gobject
>
> Interesting...
>
> Any ideas what on earth is going on?
ugh. This looks like the same error TortoiseHg is experiencing, only
THG is reporting it differently.
--
Steve Borho
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss