OK just found a 'helloworld.exe.log' file containing the following text.
Seems that *data* files are missing -- which is what you were saying.
Will look into copying those off my C:\GTK directory.

Cheers
JP

> dist\helloworld.exe:10: PangoWarning: No builtin or dynamically loaded
> modules
> were found. Pango will not work correctly. This probably means
> there was an error in the creation of:
>   'G:\pygtkexample\dist\etc\pango\pango.modules'
> You may be able to recreate this file by running pango-querymodules.
> dist\helloworld.exe:10: PangoWarning: _pango_engine_shape_shape:
> assertion `PANGO_IS_FONT (font)' failed
> dist\helloworld.exe:10: PangoWarning: No builtin or dynamically loaded
> modules
> were found. Pango will not work correctly. This probably means
> there was an error in the creation of:
>   'G:\pygtkexample\dist\etc\pango\pango.modules'
> You may be able to recreate this file by running pango-querymodules.
> dist\helloworld.exe:10: PangoWarning: _pango_engine_shape_shape:
> assertion `PANGO_IS_FONT (font)' failed
> helloworld.exe:10: PangoWarning: No builtin or dynamically loaded modules
> were found. Pango will not work correctly. This probably means
> there was an error in the creation of:
>   'G:\pygtkexample\dist\etc\pango\pango.modules'
> You may be able to recreate this file by running pango-querymodules.
> helloworld.exe:10: PangoWarning: _pango_engine_shape_shape: assertion
> `PANGO_IS_FONT (font)' failed
> helloworld.exe:10: PangoWarning: No builtin or dynamically loaded modules
> were found. Pango will not work correctly. This probably means
> there was an error in the creation of:
>   'G:\pygtkexample\dist\etc\pango\pango.modules'
> You may be able to recreate this file by running pango-querymodules.
> helloworld.exe:10: PangoWarning: _pango_engine_shape_shape: assertion
> `PANGO_IS_FONT (font)' failed


Sreeram Kandallu wrote:
> BitTorrent uses PyGTK and py2exe. IIRC, when building the distribution,
> they manually copy a whole bunch of GKT/Pango data files. Its probably
> required for bundling PyGTK apps.
> You might want to check out the BitTorrent source code to see what
> exactly it does.
> http://download.bittorrent.com/dl/BitTorrent-4.4.0.tar.gz
>
> Regards
> Sreeram
>
> John Pye wrote:
>   
>> Hi Michael
>>
>> That helped a bit but I still get a crash with the py2exe'd version. See
>> attached revised attempt. I get this error message:
>>
>>
>>
>> I don't get the error when I run directly with python, so it's something
>> that py2exe is doing...
>>
>> Files attached (remove .txt suffix to try them out)
>>
>> Cheers
>> JP
>>
>> Michael Urban wrote:
>>     
>>> Remove the pygtk.require('2.0') statement. Should fix the problem.
>>>   
>>>       
>> -- 
>> John Pye
>> School of Mechanical and Manufacturing Engineering
>> The University of New South Wales
>> Sydney  NSW 2052  Australia
>> t +61 2 9385 5127
>> f +61 2 9663 1222
>> mailto:john.pye_AT_student_DOT_unsw.edu.au
>> http://pye.dyndns.org/
>>
>>
>> ------------------------------------------------------------------------
>>
>> <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
>> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
>>
>> <glade-interface>
>>
>> <widget class="GtkWindow" id="mainwin">
>>   <property name="width_request">500</property>
>>   <property name="height_request">400</property>
>>   <property name="visible">True</property>
>>   <property name="title" translatable="yes">window1</property>
>>   <property name="type">GTK_WINDOW_TOPLEVEL</property>
>>   <property name="window_position">GTK_WIN_POS_NONE</property>
>>   <property name="modal">False</property>
>>   <property name="resizable">True</property>
>>   <property name="destroy_with_parent">False</property>
>>   <property name="decorated">True</property>
>>   <property name="skip_taskbar_hint">False</property>
>>   <property name="skip_pager_hint">False</property>
>>   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
>>   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
>>   <property name="focus_on_map">True</property>
>>   <property name="urgency_hint">False</property>
>>
>>   <child>
>>     <widget class="GtkVBox" id="vbox1">
>>       <property name="visible">True</property>
>>       <property name="homogeneous">False</property>
>>       <property name="spacing">0</property>
>>
>>       <child>
>>      <widget class="GtkToolbar" id="toolbar1">
>>        <property name="visible">True</property>
>>        <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
>>        <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
>>        <property name="tooltips">True</property>
>>        <property name="show_arrow">True</property>
>>
>>        <child>
>>          <widget class="GtkToolButton" id="quitbutton">
>>            <property name="visible">True</property>
>>            <property name="stock_id">gtk-quit</property>
>>            <property name="visible_horizontal">True</property>
>>            <property name="visible_vertical">True</property>
>>            <property name="is_important">False</property>
>>            <signal name="clicked" handler="on_quitbutton_clicked" 
>> last_modification_time="Thu, 06 Apr 2006 03:16:43 GMT"/>
>>          </widget>
>>          <packing>
>>            <property name="expand">False</property>
>>            <property name="homogeneous">True</property>
>>          </packing>
>>        </child>
>>      </widget>
>>      <packing>
>>        <property name="padding">0</property>
>>        <property name="expand">False</property>
>>        <property name="fill">False</property>
>>      </packing>
>>       </child>
>>
>>       <child>
>>      <widget class="GtkScrolledWindow" id="scrolledwindow1">
>>        <property name="visible">True</property>
>>        <property name="can_focus">True</property>
>>        <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
>>        <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
>>        <property name="shadow_type">GTK_SHADOW_IN</property>
>>        <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
>>
>>        <child>
>>          <widget class="GtkTextView" id="textview1">
>>            <property name="visible">True</property>
>>            <property name="can_focus">True</property>
>>            <property name="editable">True</property>
>>            <property name="overwrite">False</property>
>>            <property name="accepts_tab">True</property>
>>            <property name="justification">GTK_JUSTIFY_LEFT</property>
>>            <property name="wrap_mode">GTK_WRAP_NONE</property>
>>            <property name="cursor_visible">True</property>
>>            <property name="pixels_above_lines">0</property>
>>            <property name="pixels_below_lines">0</property>
>>            <property name="pixels_inside_wrap">0</property>
>>            <property name="left_margin">0</property>
>>            <property name="right_margin">0</property>
>>            <property name="indent">0</property>
>>            <property name="text" translatable="yes">
>> Hello world!</property>
>>          </widget>
>>        </child>
>>      </widget>
>>      <packing>
>>        <property name="padding">0</property>
>>        <property name="expand">True</property>
>>        <property name="fill">True</property>
>>      </packing>
>>       </child>
>>     </widget>
>>   </child>
>> </widget>
>>
>> </glade-interface>
>>
>>
>> ------------------------------------------------------------------------
>>
>> import sys 
>> import pygtk 
>> #if not sys.platform == 'win32': 
>> #    pygtk.require('2.0') 
>> import gtk
>> import gtk.glade
>>
>> class HelloWorld:
>>      def __init__(self):
>>              glade = gtk.glade.XML("helloworld.glade","mainwin")
>>              self.window = glade.get_widget("mainwin")
>>              glade.signal_autoconnect(self)
>>
>>      def on_quitbutton_clicked(self,*args):
>>              gtk.main_quit()
>>
>>      def run(self):
>>              self.window.show()
>>              gtk.main()
>>
>> if __name__ == "__main__":
>>      app = HelloWorld();
>>      app.run()
>>
>>
>> ------------------------------------------------------------------------
>>
>> from distutils.core import setup 
>> import py2exe 
>>  
>> setup( 
>>     name = 'helloworld', 
>>     description = 'Hello world', 
>>     version = '1.0', 
>>  
>>     windows = [ 
>>                   { 
>>                       'script': 'helloworld.py'
>>                   } 
>>               ], 
>>  
>>     options = { 
>>                   'py2exe': { 
>>                       'packages':'encodings', 
>>                       'includes': 'cairo, pango, pangocairo, atk, gobject', 
>>                   } 
>>               }, 
>>  
>>     data_files=[ 
>>                    'helloworld.glade'
>>                ] 
>> ) 
>>     
>
>
>   

-- 
John Pye
School of Mechanical and Manufacturing Engineering
The University of New South Wales
Sydney  NSW 2052  Australia
t +61 2 9385 5127
f +61 2 9663 1222
mailto:john.pye_AT_student_DOT_unsw.edu.au
http://pye.dyndns.org/

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to