From sxanth at ceid.upatras.gr Sat Oct 16 22:55:54 2004 From: sxanth at ceid.upatras.gr (Stelios Xanthakis) Date: Sat, 16 Oct 2004 12:55:54 -0700 Subject: [Twilight GUI] Hi Message-ID: <41717CCA.7090008@ceid.upatras.gr> test From sxanth at ceid.upatras.gr Mon Oct 18 17:55:38 2004 From: sxanth at ceid.upatras.gr (Stelios Xanthakis) Date: Mon, 18 Oct 2004 17:55:38 +0300 (EET DST) Subject: [Twilight GUI] TWGui (fwd) Message-ID: ---------- Forwarded message ---------- Date: Mon, 18 Oct 2004 16:32:08 +0200 From: Tom Parker To: sxanth at ceid.upatras.gr Subject: TWGui I've written a little wrapper for Twilight GUI that implements a way to make it easier to select a gui. Instead of doing the whole try/except/ImportError code in every application, a program can import twgui and call twgui.get_gui() to find a GUI to use. get_gui() also takes an optional argument of an ordered list of GUIs to select from. Additionally, there's an internal function __get_guis() so that programs like run2.py can get a complete list of GUIs, not just one. Also, wrap_wxpython and wrap_tkinter wouldn't run on my machine because of some small bugs. Not sure whether this is a change in the api's between your version and mine or not. I'm running a Debian machine with the 2.4.2.6 wxPython package, and the 2.3.4-13 python tk package. I've attached a patch to fix these things. Tom -- palfrey at tevp.net - http://tevp.net Illegitimus non carborundum -------------- next part -------------- A non-text attachment was scrubbed... Name: twgui.py Type: application/x-python Size: 595 bytes Desc: URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: twgui-0.6.patch Type: text/x-patch Size: 1943 bytes Desc: URL: From sxanth at ceid.upatras.gr Tue Oct 19 04:31:24 2004 From: sxanth at ceid.upatras.gr (Stelios Xanthakis) Date: Mon, 18 Oct 2004 18:31:24 -0700 Subject: [Twilight GUI] TWGui (fwd) In-Reply-To: References: Message-ID: <41746E6C.7010907@ceid.upatras.gr> The patch: diff -ur twgui-0.6.old/wrap_tkinter.py twgui-0.6.new/wrap_tkinter.py --- twgui-0.6.old/wrap_tkinter.py 2004-10-15 09:04:18.000000000 +0200 +++ twgui-0.6.new/wrap_tkinter.py 2004-10-18 16:16:06.000000000 +0200 @@ -16,7 +16,9 @@ import string havePIL = True -try: import PIL +try: + import PIL + import Image,ImageTk except ImportError: havePIL = False # @@ -182,8 +184,8 @@ if not havePIL: self.img0 = Tkinter.PhotoImage (file=img) else: # untested... - im = PIL.Image.open (img) - self.img0 = PIL.ImageTk.PhotoImage (im) + im = Image.open (img) + self.img0 = ImageTk.PhotoImage (im) self.this ['image'] = self.img0 # diff -ur twgui-0.6.old/wrap_wxpython.py twgui-0.6.new/wrap_wxpython.py --- twgui-0.6.old/wrap_wxpython.py 2004-10-16 04:34:09.000000000 +0200 +++ twgui-0.6.new/wrap_wxpython.py 2004-10-18 16:12:17.000000000 +0200 @@ -200,13 +200,13 @@ font = font [:i] else: nm = self.this.GetFont ().GetPointSize () - self.this.SetFont (wx.Font (nm, wx.SWISS, wx.NORMAL, wx.NORMAL, face=font)) + self.this.SetFont (wx.Font (nm, wx.SWISS, wx.NORMAL, wx.NORMAL, faceName=font)) if dims [0] and dims [1]: if dims [0]: gx = self.this.GetCharWidth () * dims [0] else: gx = -1 if dims [1]: gy = self.this.GetCharHeight () * dims [1] else: gy = -1 - self.this.SetMinSize ((gx, gy)) + self.this.SetSizeHints (minW=gx, minH=gy) self.set_editable (editable) # available to code def get_text (self): @@ -544,7 +544,7 @@ class Window (___wxsheet___): def start_construction (self): - self.win = wx.Frame (None) + self.win = wx.Frame (None,-1,"") ___wxsheet___.start_construction (self) def end_construction (self): ___wxsheet___.end_construction (self) From info at clickocean.net Sat Nov 6 12:17:29 2004 From: info at clickocean.net (=?ISO-2022-JP?B?GyRCJS8laiVDJS8lKiE8JTclYyVzGyhC?=) Date: Sat, 6 Nov 2004 19:17:29 +0900 Subject: [Twilight GUI] ※未承諾広告 携帯サイトオーナー様へ Message-ID: <200411061118.iA6BIqiI028086@iceberg.hellug.gr> ????????????????????????? ??? ?????????????????????? ???????????????????????? ????????????????????????? ????????????????? ?????????????????????? ????????????????????????? ????????????????????????? ????????????????????????? ?????????????????????????????? ?????????????????????????? ?????????????????????????? ?????????? ????????????????????????? ????????????????????????? ????????????????????????? ????????????????????????? ?????????? ????????????????????????? ????????????????????????? ?????????????? ????????????????????????? ???????????????? ????????????????????????? ???????? ????????????? ?????????????????????????? ?????????????????? ?????????????????????????? ????????????? ?????????????????????????? ????????????????????? ?i-mode?vodafone?EZWEB????????? ????????????????? ???????????????????? ????????????? ???????????????????? ????????????????????????? ????????? ???????????????????(????????????) ???????????????? ??????????????????????????? ?????????????????????????? ?????????????URL??? http://www.clickocean.net/kari_form.html ?????????????????????????? ??????????????? ?http://www.clickocean.net/? ??????? ?????????????????????????????????? ??????????????????????? ?????????????????????????? ??????????????????????????? ?????????????????? ? ???????????????????????????????? ====================================================================== ????????? http://www.clickocean.net/ ???????: support at clickocean.net ======================================================================