{"id":6,"date":"2006-07-12T13:34:00","date_gmt":"2006-07-12T19:34:00","guid":{"rendered":"http:\/\/70.47.30.137\/~blockos\/blog\/?p=13"},"modified":"2006-07-12T13:34:00","modified_gmt":"2006-07-12T19:34:00","slug":"attack-of-the-giant-snake","status":"publish","type":"post","link":"https:\/\/blog.blockos.org\/?p=6","title":{"rendered":"Attack of the giant snake!"},"content":{"rendered":"<p><a href=\"http:\/\/blog.blockos.org\/wp-content\/uploads\/2006\/11\/snake_big.png\"><img decoding=\"async\" align=\"left\" alt=\"Giant evil snake\" id=\"image15\" title=\"Giant evil snake\" src=\"http:\/\/blog.blockos.org\/wp-content\/uploads\/2006\/11\/snake_big.thumbnail.png\" \/><\/a> I&#8217;m currently playing with <a title=\"python and gtk\" href=\"http:\/\/www.pygtk.org\">python and gtk<\/a>. I&#8217;m trying to do a homemade package creator. The interface was made with <a title=\"glade\" href=\"http:\/\/glade.gnome.org\/\">glade<\/a>, the gtk\/gnome interface builder. It&#8217;s pretty easy to use. I managed to make a decent interface in about 5 minutes and here&#8217;s the result :<\/p>\n<div style=\"text-align: center\"><img decoding=\"async\" title=\"Pak interface\" id=\"image16\" alt=\"Pak interface\" src=\"http:\/\/blog.blockos.org\/wp-content\/uploads\/2006\/11\/capture-pak.png\" \/><\/div>\n<p>Unfortunately, glade can only generate C\/C++ code. I searched the web for some way to create python code from glade files and i found something called <a title=\"kefir\" href=\"http:\/\/kefir.sourceforge.net\/\">Kefir<\/a>.<br \/>\nAll i had to do was to call :<\/p>\n<p><code>python kefir.py myfile.glade<\/code><\/p>\n<p>And all the interface code was generated. I now &#8220;only&#8221; need to code the core of the application. If you want to create pygtk applications under windows, you&#8217;ll need to install :<\/p>\n<ul>\n<li><a title=\"glade and gtk\" href=\"http:\/\/gladewin32.sourceforge.net\/\">Glade and gtk<\/a> (Gaim users please take care before installing gtk 2.8.x. You won&#8217;t be able to connect)<\/li>\n<li><a title=\"PyGtk\" href=\"http:\/\/www.mapr.ucl.ac.be\/~gustin\/win32_ports\/\">PyGtk<\/a><\/li>\n<li>Python \ud83d\ude42<\/li>\n<\/ul>\n<p>I tried <a title=\"Py2exe\" href=\"http:\/\/www.py2exe.org\/\">Py2exe<\/a> in order to create an executable out of the python source. I created some basic setup file (mostly ripped from <a title=\"Py2exe PyGtk documentation\" href=\"http:\/\/starship.python.net\/crew\/theller\/moin.cgi\/Py2exeAndPyGTK\">Py2exe documentation<\/a> and <a title=\"PyGtk Py2exe tutorial\" href=\"http:\/\/www.pygtk.org\/articles\/bitpodder\/BitPodder.htm\">this tutorial<\/a>). Then i typed :<\/p>\n<p><code>python setup.py py2exe<\/code><\/p>\n<p>Shazam! A directory containing all the required dlls and files was created.<\/p>\n<p>Next step : <strong>start coding<\/strong> !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m currently playing with python and gtk. I&#8217;m trying to do a homemade package creator. The interface was made with glade, the gtk\/gnome interface builder. It&#8217;s pretty easy to use. I managed to make a decent interface in about 5 minutes and here&#8217;s the result : Unfortunately, glade can only\u2026 <a class=\"continue-reading-link\" href=\"https:\/\/blog.blockos.org\/?p=6\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[27,14],"_links":{"self":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/posts\/6"}],"collection":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":0,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.blockos.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}