From devon.meunier at gmail.com Thu Apr 14 21:59:14 2011 From: devon.meunier at gmail.com (Devon Meunier) Date: Thu, 14 Apr 2011 15:59:14 -0400 Subject: [Pygui] Distributing a PyGUI application on Windows. Message-ID: Hello all, I've written a simple application in PyGUI, and I'm wondering how best to distribute this to Windows users who do not have Python, Pywin32, or PyGUI installed. Normally, I would use cx_freeze to produce an .exe, but it appears to be unable to load PyGUI. Thoughts? Options? Thanks, Devon From vernondcole at gmail.com Thu Apr 14 23:59:49 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Thu, 14 Apr 2011 15:59:49 -0600 Subject: [Pygui] Distributing a PyGUI application on Windows. In-Reply-To: References: Message-ID: Try http://www.py2exe.org/ If that does not work, get back to us on this list. Vernon Cole On Thu, Apr 14, 2011 at 1:59 PM, Devon Meunier wrote: > Hello all, > > I've written a simple application in PyGUI, and I'm wondering how best > to distribute this to Windows users who do not have Python, Pywin32, > or PyGUI installed. Normally, I would use cx_freeze to produce an > .exe, but it appears to be unable to load PyGUI. Thoughts? Options? > > Thanks, > > Devon > _______________________________________________ > Pygui mailing list > Pygui at python.org > http://mail.python.org/mailman/listinfo/pygui > -------------- next part -------------- An HTML attachment was scrubbed... URL: From devon.meunier at gmail.com Fri Apr 15 00:46:21 2011 From: devon.meunier at gmail.com (Devon Meunier) Date: Thu, 14 Apr 2011 18:46:21 -0400 Subject: [Pygui] Distributing a PyGUI application on Windows. In-Reply-To: References: Message-ID: I have similar issues with py2exe. On Thu, Apr 14, 2011 at 5:59 PM, Vernon Cole wrote: > Try http://www.py2exe.org/ > If that does not work, get back to us on this list. > Vernon Cole > > On Thu, Apr 14, 2011 at 1:59 PM, Devon Meunier > wrote: >> >> Hello all, >> >> I've written a simple application in PyGUI, and I'm wondering how best >> to distribute this to Windows users who do not have Python, Pywin32, >> or PyGUI installed. Normally, I would use cx_freeze to produce an >> .exe, but it appears to be unable to load PyGUI. Thoughts? Options? >> >> Thanks, >> >> Devon >> _______________________________________________ >> Pygui mailing list >> Pygui at python.org >> http://mail.python.org/mailman/listinfo/pygui > > From mark.melvin at gmail.com Fri Apr 15 01:09:00 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Thu, 14 Apr 2011 19:09:00 -0400 Subject: [Pygui] Distributing a PyGUI application on Windows. In-Reply-To: References: Message-ID: I had issues as well. I found that this setup.py works for me. I also had to import the PyGUI modules specially in my main script as follows: from GUI.Buttons import Button from GUI.RadioGroups import RadioGroup from GUI.RadioButtons import RadioButton from GUI.Labels import Label from GUI.CheckBoxes import CheckBox from GUI.Frames import Frame from GUI.Applications import Application from GUI.Menus import Menu from GUI.MenuLists import MenuList from GUI.Windows import Window from GUI.Sliders import Slider from GUI.Colors import rgb from GUI.Resources import resource_path, find_resource from GUI.FileDialogs import request_old_file from GUI.Files import FileRef, FileType, DirRef Here are the contents of my setup.py file: # Build an executable for my_script. # import sys import os # Yet another *hack* to get py2exe to work. It can't seem to find # win32com.shell. # ModuleFinder can't handle runtime changes to __path__, but win32com uses them try: # py2exe 0.6.4 introduced a replacement modulefinder. # This means we have to add package paths there, not to the built-in # one. If this new modulefinder gets integrated into Python, then # we might be able to revert this some day. # if this doesn't work, try import modulefinder try: import py2exe.mf as modulefinder except ImportError: import modulefinder import win32com for p in win32com.__path__[1:]: modulefinder.AddPackagePath("win32com", p) for extra in ["win32com.shell"]: #,"win32com.mapi" __import__(extra) m = sys.modules[extra] for p in m.__path__[1:]: modulefinder.AddPackagePath(extra, p) except ImportError: # no build path setup, no worries. pass from distutils.core import setup import py2exe origIsSystemDLL = py2exe.build_exe.isSystemDLL def isSystemDLL(pathname): if os.path.basename(pathname).lower() in ("msvcp71.dll", "dwmapi.dll", "mfc71.dll"): return 0 return origIsSystemDLL(pathname) py2exe.build_exe.isSystemDLL = isSystemDLL ################################################################ # If run without args, build executables, in quiet mode. if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-q") class Target: def __init__(self, **kw): self.__dict__.update(kw) # for the versioninfo resources self.version = "1.0.0" self.company_name = "My Company" self.copyright = "Copyright 2011 Me. All rights reserved." self.name = "My Script" my_script = Target( # used for the versioninfo resource description = "A cool description", # what to build script = "my_script.py", dest_base = "my_script") setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 3, "packages" : ['GUI', 'encodings'], }}, zipfile = None, windows = [my_script] ) I hope this helps. Regards, Mark. On Thu, Apr 14, 2011 at 6:46 PM, Devon Meunier wrote: > I have similar issues with py2exe. > > On Thu, Apr 14, 2011 at 5:59 PM, Vernon Cole > wrote: > > Try http://www.py2exe.org/ > > If that does not work, get back to us on this list. > > Vernon Cole > > > > On Thu, Apr 14, 2011 at 1:59 PM, Devon Meunier > > wrote: > >> > >> Hello all, > >> > >> I've written a simple application in PyGUI, and I'm wondering how best > >> to distribute this to Windows users who do not have Python, Pywin32, > >> or PyGUI installed. Normally, I would use cx_freeze to produce an > >> .exe, but it appears to be unable to load PyGUI. Thoughts? Options? > >> > >> Thanks, > >> > >> Devon > >> _______________________________________________ > >> Pygui mailing list > >> Pygui at python.org > >> http://mail.python.org/mailman/listinfo/pygui > > > > > _______________________________________________ > Pygui mailing list > Pygui at python.org > http://mail.python.org/mailman/listinfo/pygui > -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.ewing at canterbury.ac.nz Fri Apr 15 03:21:46 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Fri, 15 Apr 2011 13:21:46 +1200 Subject: [Pygui] Distributing a PyGUI application on Windows. In-Reply-To: References: Message-ID: <4DA79DAA.4000706@canterbury.ac.nz> Devon Meunier wrote: > Normally, I would use cx_freeze to produce an > .exe, but it appears to be unable to load PyGUI. You should be able to use py2exe, but you will have to explicitly tell it to include all of the modules from PyGUI that it needs, since py2exe can't follow the dynamic loading system that PyGUI currently uses. [1] I'm not familiar with cx_freeze, but something similar ought to be possible. [1] Yes, I know this is a nuisance, and I'm thinking about ways to improve the situation. -- Greg From greg.ewing at canterbury.ac.nz Fri Apr 22 02:50:52 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Fri, 22 Apr 2011 12:50:52 +1200 Subject: [Pygui] [Pyobjc-dev] mac os x 10.6 installation error In-Reply-To: References: Message-ID: <4DB0D0EC.7060902@canterbury.ac.nz> David Cortesi wrote: > So I repeated my attempts to install 2.3. First I installed the latest > version of XCode (3.2.6) (4.1 gig download, sheesh). Then ran > > sudo easy_install pyobjc > > ... > > and then it hits pyobjc-framework-ScreenSaver > there are a lot of C warnings and a couple of errors, then: > > lipo: can't open input file: /var/tmp//ccWUi61Z.out (No such file or directory) > error: Setup script exited with error: command 'gcc-4.2' failed with > exit status 1 PyGUI doesn't actually need all of the sub-packages of PyObjC, all it needs is 'pyobjc_core' and 'pyobjc_framework_Cocoa'. PyPI doesn't make it easy, but you can get to the sub-packages individually this way: http://pypi.python.org/pypi?%3Aaction=search&term=pyobjc&submit=search I didn't even attempt to use easy_install (I don't like setuptools and will try to avoid touching it if at all possible). If I remember correctly, I downloaded the .egg files, unzipped them and manually moved their contents into site-packages. I don't think you should need to have Xcode installed to do any of this. To the PyObjC developers, I would make the following requests: 1) Please DON'T require setuptools or easy-install. Make it available either as a standard MacOSX installer package or an ordinary Python package that can be installed using 'python setup.py install'. 2) Make the individual packages easily findable, downloadable and installable separately for those that don't need the whole thing. -- Greg From davecortesi at gmail.com Mon Apr 25 02:54:47 2011 From: davecortesi at gmail.com (David Cortesi) Date: Sun, 24 Apr 2011 17:54:47 -0700 Subject: [Pygui] Listbox? Scrollbars? Text Widget? Message-ID: Although in comparison to tkinter, pygui is conceptually cleaner and more maintainable, it still has some functional lacks, and I'm curious as to where the following rank on the to-do list. 1. The listbox (a/o combobox), a scrollable stack of text items that can be selected, singly or in multiples (e.g with shift-click, ctl-/cmd-click). 2. The textedit class appears to be quite basic in comparison to the tk/tkinter text widget which has, e.g., multiple fonts, format tags, marked locations, undo-redo stacks, search, support for embedded graphics and widgets. 3. Menu-bar menus are supported, but what about contextual ('pop-up') menus? 4. Looking at the tkinter implementation of scrolling, it makes horizontal and vertical scrollbars separate widgets with semi-automatic callback between the scrolled item and the bar. The advantage is the programmer can customize the bar; disadvantage: complexity, platform inconsistency. In PyGui scrollbars appear to be implicit and managed entirely by the scrolled item (which is currently only the scrollable view, yes?) The advantage is simplicity and consistent use of OS platform widgetry. But -- what happens when other scrollable widgets are added, e.g. the listbox? (Or, would every scrollable item be a child of scrollable view...?) Thanks for your efforts, Dave Cortesi From berhoyt+pygui at gmail.com Thu Apr 28 08:31:17 2011 From: berhoyt+pygui at gmail.com (Berwyn Hoyt) Date: Thu, 28 Apr 2011 18:31:17 +1200 Subject: [Pygui] Progress bar widget In-Reply-To: References: Message-ID: Hello, Has anybody out there implemented a progress bar widget for pygui? Thanks, Berwyn -- Check out our *winning design* in this Bronchoscope Simulatorfor AirwaySkills ( TVNZ coverageor radio). Berwyn Hoyt, *Electronic Solutions & Business* -- Brush Technology *Ph:* +64 3 741 1204 *Mobile:* +64 21 045 7830 *Web:* brush.co.nz -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.ewing at canterbury.ac.nz Fri Apr 29 05:27:16 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Fri, 29 Apr 2011 15:27:16 +1200 Subject: [Pygui] Listbox? Scrollbars? Text Widget? In-Reply-To: References: Message-ID: <4DBA3014.6060800@canterbury.ac.nz> David Cortesi wrote: > 1. The listbox (a/o combobox) > 3. contextual ('pop-up') menus? These are on the list, no particular priority. > 2. The textedit class appears to be quite basic in comparison to the > tk/tkinter text widget which has, e.g., multiple fonts, format tags, > marked locations, undo-redo stacks, search, support for embedded > graphics and widgets. I hope to provide something richer at some point, but as yet I have no clear idea of what the API should be like. The facilities provided by the three platforms in this area differ considerably. A particular stumbling block is that the Windows rich edit control only allows one view of each text buffer, which doesn't fit well into PyGUI's model-view paradigm. This is one of the limitations I'm hoping to be able to escape by making use of .NET libraries. > 4. Looking at the tkinter implementation of scrolling, it makes > horizontal and vertical scrollbars separate widgets > > In PyGui scrollbars appear to be implicit and managed entirely by the > scrolled item I've deliberately tried to keep the API for scrolling very abstract and high-level, because the details differ quite a lot between platforms. On Windows, for example, the most straightforward way to implement scrolling does not result in the scroll bars being exposed as distinct objects. > But -- what happens when other scrollable widgets are added, e.g. the > listbox? (Or, would every scrollable item be a child of scrollable > view...?) Not ScrollableView itself -- that's for user-defined views -- but they will provide their own scroll bars and have a similar API. (Probably I'll factor out the scrolling-related parts of ScrollableView's interface into another abstract class.) -- Greg