plugins using cvs/distutils?
Hi. I have an open-source application development environment that I would like to enable an automated package download system for (like downloadable plugins), using sourceforge as its repository. My software will have a menu-based popup window, that will list the packages (Applications) available through the project distribution page. If a user selects a package from this window, it should be automatically retrieved and installed by the development environment. My software already has a system for automatically recognizing and deploying new packages, so I'm only asking for help with distribution logistics, I think. I'm thinking that I will use the built-in ftplib to list and retrieve the files (but I'm not sure yet where to look), and then the distutils should probably be used in a standardized manner to actually install the packages, right? I've established a CVS, but I'm not aware of any built-in-python tools for managing the CVS, and I would rather not add any new user-has-to-download-dependencies for this. Is there an easier or alternative advisable approach? I have a linux box, should I be using it to build all of the platform versions? Any advice would be much appreciated, this is my first distribution project (sourceforge.net/projects/spade). Thanks a bunch, Deacon -- http://mail.python.org/mailman/listinfo/python-list
Resizing widgets in text windows
Hi, I've been searching for a .resize()-like function to overload much like can be done for the delete window protocol as follows: toplevel.protocol("WM_DELETE_WINDOW", callback) I realize that the pack manager usually handles all of the resize stuff, but I've found an arrangement that the pack manager fails for. That is, if one embeds a canvas into a window created inside a text widget, then resize the text widget (via its container), the canvas and its container windows do not resize. So I need to resize the window that the canvas is embedded in. The most obvious way of doing this would be as above, but there does not seem to be an equivalent to the "WM_DELETE_WINDOW" protocol for resizing. Any help would be greatly appreciated. Deacon Sweeney -- http://mail.python.org/mailman/listinfo/python-list
Re: Resizing widgets in text windows
On Jan 26, 10:52 pm, James Stroud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, I've been searching for a .resize()-like function to overload much > > like can be done for the delete window protocol as follows: > > > toplevel.protocol("WM_DELETE_WINDOW", callback) > > > I realize that the pack manager usually handles all of the resize > > stuff, but I've found an arrangement that the pack manager fails for. > > That is, if one embeds a canvas into a window created inside a text > > widget, > > Your meaning here is unclear. How is it possible to have "a window > created inside a text widget"? using the create_window function, as below. > > > then resize the text widget (via its container), the canvas and > > its container windows do not resize. So I need to resize the window > > that the canvas is embedded in. > > Try the Toplevel.wm_geometry() function. > > > The most obvious way of doing this > > would be as above, but there does not seem to be an equivalent to the > > "WM_DELETE_WINDOW" protocol for resizing. > > Do you want to detect when a window is resized or do you want to resize > a window programatically. > > If the former, bind the Toplevel to ''. > > E.g. > > from Tkinter import * > > def config(t): >def _r(e, t=t): > geom = e.widget.wm_geometry() > geom = geom.split('+')[0] > t.wm_geometry(geom) > print 'resized %s to %s' % (t, geom) >return _r > > tk = Tk() > tk.title('resize me') > t2 = Toplevel(tk) > t2.title('I get resized') > tk.bind('', config(t2)) > > Is that cool or what? > Yes, this is exactly what I was looking for. Thanks. > James > > > Any help would be greatly appreciated. > > >DeaconSweeney -- http://mail.python.org/mailman/listinfo/python-list
Re: Resizing widgets in text windows
On Jan 29, 3:33 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Fri, 26 Jan 2007 22:35:20 +0100, <[EMAIL PROTECTED]> wrote: > > Hi, I've been searching for a .resize()-like function to overload much > > like can be done for the delete window protocol as follows: > > > toplevel.protocol("WM_DELETE_WINDOW", callback) > > > I realize that the pack manager usually handles all of the resize > > stuff, but I've found an arrangement that the pack manager fails for. > > That is, if one embeds a canvas into a window created inside a text > > widget, then resize the text widget (via its container), the canvas and > > its container windows do not resize. > > Supposing you call "embedding" inserting a widget in the text via the > window_create method, why should they? Embedding a window in a Text is > used to put some arbitrary widget in the middle of the text it contains. > So the embedded widget has no reason to grow or shrink with the parent > Text widget: it just moves with the text. > > > So I need to resize the window > > that the canvas is embedded in. The most obvious way of doing this > > would be as above, but there does not seem to be an equivalent to the > > "WM_DELETE_WINDOW" protocol for resizing. > > As James said, the event is your friend. But I'm not sure I > understand your use case... > > HTH > -- > python -c "print ''.join([chr(154 - ord(c)) for c in > 'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])" I'm using a text widget to hold a set of plots, one plot per line, such that the scrolling capability of the text widget can be taken advantage of to display only a subset of the plots at any given time. In the analyses my program automates, there are at least several plots are typically loaded into the text widget. This works out splendidly, but the width of the plots has thus far been a static thing. Now, I'll be able to adjust the plots widths so that when the owner window is resized, the width of each plot in the text widget is adjusted and the plot continues to occupy the entire text widget but no more, making for a much more professional looking product. I didn't mean to imply that create_window widgets should automatically resize with the toplevel... I just couldn't find any way to force it. Muchas gracias. Deacon -- http://mail.python.org/mailman/listinfo/python-list