You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(116) |
Sep
(146) |
Oct
(78) |
Nov
(69) |
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(188) |
Feb
(142) |
Mar
(143) |
Apr
(131) |
May
(97) |
Jun
(221) |
Jul
(127) |
Aug
(89) |
Sep
(83) |
Oct
(66) |
Nov
(47) |
Dec
(70) |
2003 |
Jan
(77) |
Feb
(91) |
Mar
(103) |
Apr
(98) |
May
(134) |
Jun
(47) |
Jul
(74) |
Aug
(71) |
Sep
(48) |
Oct
(23) |
Nov
(37) |
Dec
(13) |
2004 |
Jan
(24) |
Feb
(15) |
Mar
(52) |
Apr
(119) |
May
(49) |
Jun
(41) |
Jul
(34) |
Aug
(91) |
Sep
(169) |
Oct
(38) |
Nov
(32) |
Dec
(47) |
2005 |
Jan
(61) |
Feb
(47) |
Mar
(101) |
Apr
(130) |
May
(51) |
Jun
(65) |
Jul
(71) |
Aug
(96) |
Sep
(28) |
Oct
(20) |
Nov
(39) |
Dec
(62) |
2006 |
Jan
(13) |
Feb
(19) |
Mar
(18) |
Apr
(34) |
May
(39) |
Jun
(50) |
Jul
(63) |
Aug
(18) |
Sep
(37) |
Oct
(14) |
Nov
(56) |
Dec
(32) |
2007 |
Jan
(30) |
Feb
(13) |
Mar
(25) |
Apr
(3) |
May
(15) |
Jun
(42) |
Jul
(5) |
Aug
(17) |
Sep
(6) |
Oct
(25) |
Nov
(49) |
Dec
(10) |
2008 |
Jan
(12) |
Feb
|
Mar
(17) |
Apr
(18) |
May
(12) |
Jun
(2) |
Jul
(2) |
Aug
(6) |
Sep
(4) |
Oct
(15) |
Nov
(45) |
Dec
(9) |
2009 |
Jan
(1) |
Feb
(3) |
Mar
(18) |
Apr
(8) |
May
(3) |
Jun
|
Jul
(13) |
Aug
(2) |
Sep
(1) |
Oct
(9) |
Nov
(13) |
Dec
|
2010 |
Jan
(2) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(44) |
May
(9) |
Jun
(22) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(3) |
Aug
(8) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kevin A. <al...@se...> - 2001-08-28 01:34:59
|
> The duplicate widget works as expected but if we are going to place the > new widget in the same location as the original (instead of, say, offset > by a few pixels) then can we have the new widget on top please? > > My expectation (from using similar techniques in other products) is to > be able to duplicate a widget and then drag the new one to the location > I want it to be in. This may be beyond us at the moment, if so I will > add it to SF as a feature request so we don't forget. I agree. The reason you currently get the new widget underneath the original is because wxPython orders controls (widgets) like that; the first widget created is in front of widget 2, widget 2 is in front of widget 3... What I have to do is save the state of every widget, destroy every widget, then recreate them all with the new widget being created first. As you can see, quite a pain and messy to look at, but it is doable. A side effect of doing this is that the new widget will end up as the first item instead of the last one, which is what you would expect. An alternative would be to simply let the duplicated item remain behind all the other widgets, but offset it from the original. This is much easier to do and will work except when the offset still leaves it behind other widgets. So, choose your poison. I think I like the second solution the best. I'll still have to do the first solution when you want to reorder the widgets as far as I can tell. Any other suggestions I haven't thought of? Robin? > Not from me. I'd love to be able to save resource files but I can I > suggest the default behaviour is to not override an existing file? Not > sure how we can do this with the wx file dialog but I can live in hope > (or read the documentation). I'll probably just have a Save As... which is easy enough. Initially, whatever stack, background, menus are defined will just be output the way they were originally except for the stack size and position. I also need to save the state of the toolTips or just stop setting the toolTip, which doesn't work very well anyway. ka |
From: Andy T. <an...@cr...> - 2001-08-27 23:20:57
|
Kevin Altis wrote: >>Anyway, I'm trying to set the application focus in response to an event. >>In particular, when the user presses a button in my application I would >>like to lead them by the hand and place the cursor in another widget. >> > > Robin just showed me how stupid I was and after recovering from some > dizziness due to banging my head against the desk I added a setFocus method > to Widget. So, for any widget, you can do something like: > > self.components.field1.setFocus() > > If you want to remove the focus, then use: > > self.components.field1.setFocus(0) > > The change is checked into cvs. > > ka > Ta muchly, hope the pain subsides quickly. I'll include it in the next version of dbBrowser to show a working example. Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |
From: Andy T. <an...@cr...> - 2001-08-27 23:17:56
|
I've been playing with this over the last couple of days and its looking good to me. Kevin Altis wrote: > I added a Duplicate Widget menu item and command. I also cleaned up the > mouseDown selection code. The duplicate widget works as expected but if we are going to place the new widget in the same location as the original (instead of, say, offset by a few pixels) then can we have the new widget on top please? My expectation (from using similar techniques in other products) is to be able to duplicate a widget and then drag the new one to the location I want it to be in. This may be beyond us at the moment, if so I will add it to SF as a feature request so we don't forget. > > Overall, it seems to be working pretty well, so I'm tempted to have it start > saving files. Nobody has said whether the selection and resizing is working > correctly on *nix. Any bugs to report on any platform? Not from me. I'd love to be able to save resource files but I can I suggest the default behaviour is to not override an existing file? Not sure how we can do this with the wx file dialog but I can live in hope (or read the documentation). > > Any other feedback? I realize that there are all sorts of things it doesn't > do like Undo/Redo, Cut, Copy, Paste, multiple selections, etc. but it seems > quicker and easier than hand coding all the component descriptions. I need > to set the stack and background attributes, which is going to be clunky > until we have more elaborate dialogs up and running, so I lean towards still > editing those by hand in the .rsrc.py file, I would simply save some generic > values for new .rsrc.py file. That would seem the sensible approach. Of course, in PythonCard 1.0 we will provide a wizard to guide you through this and then have an application property sheet when these values can be changed. > > One issue that I don't have a ready solution for is that I won't be able to > preserve the original formatting of a .rsrc.py file when I do a save. Does > this matter to anyone? I'm leaning towards an output format where each > attribute of the stack, background, and components are on a separate line > which will avoid problems with wrapping when people paste portions of a > .rsrc.py in email, etc. I think we would have to assume that if people are saving a resource description from the editor they would want a working file output. An alternative would be to provide a preview option showing the resource file to be output before it is saved. Then the hard core developer could just cut and paste the bits they want from the previewer to their own resource file. > > I have some code that I wrote a while ago that imports Outlook contacts that > I could turn into an Addresses sample. Other people could add import code > for other formats. Perhaps I'll create that sample using the resourceEditor > as a test later this week. > > ka > Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |
From: Kevin A. <al...@se...> - 2001-08-27 22:29:22
|
> Anyway, I'm trying to set the application focus in response to an event. > In particular, when the user presses a button in my application I would > like to lead them by the hand and place the cursor in another widget. Robin just showed me how stupid I was and after recovering from some dizziness due to banging my head against the desk I added a setFocus method to Widget. So, for any widget, you can do something like: self.components.field1.setFocus() If you want to remove the focus, then use: self.components.field1.setFocus(0) The change is checked into cvs. ka |
From: Kevin A. <al...@se...> - 2001-08-27 20:50:40
|
http://www.htmlhelp.com/reference/css/ If somebody knows of a better one online, let me know, the one above seems adequate for our purposes. The w3.org stuff is impenetrable as usual, but they have a lot of links. BTW, I am not going to write the parser to handle CSS descriptions for the prototype. Somebody else is going to have to tackle that. If that means that we are stuck with a variation of my initial font description solution for a while, then so be it. I am going to go ahead and tweak the defaults and add some kind of named set of default fonts, probably in a dictionary that you can add to during runtime. The developers on wx-dev handling the wxHtmlWindow would be very interested in a CSS parser, so if you're interested you should probably check in over there first. ka |
From: Kevin A. <al...@se...> - 2001-08-27 15:57:38
|
Since we might follow the CSS syntax for fonts, I thought it would be a good time to look at wxHtmlWindow in wxPython. It might even be time to wrap the wxHtmlWindow as another widget for PythonCard. Anyway, if you want to play with it, you can just open up the minimal sample and then work from the shell. C:\python\PythonCardPrototype>samples\minimal\minimal.py -s >>> bg = pcapp.getCurrentBackground() >>> comp = bg.components >>> from wxPython.wx import * >>> from wxPython.html import * >>> import wxPython.lib.wxpTag >>> p = bg.panel._getDelegate() >>> h = wxHtmlWindow(p, -1, (0, 30), (800, 500)) >>> h.LoadPage("../../docs/html/index.html") Resize the minimal window in order to fit the HTML; you can also change the size (800, 500) to fit your display resolution. You'll notice that the home page doesn't actually display correctly, this is a limitation of wxHtmlWindow. According to Robin: "Currently wxHTML is a simple subset of just HTML 4." Of course, after I started this test, I found out the control doesn't currently support CSS, which is part of the reason our home page and samples don't display correctly. Also, it doesn't automatically handle URL downloading when you click on links, except for local file references. Read the wxHtmlWindow section of the wxWindows documenation. Look at the wxHtmlWindow example in demo.py (wxPython) "Non-managed Windows" section. And finally, you might want to search for "html" or "wxHtmlWindow" issues in the wxpython-users mailing list: http://aspn.activestate.com/ASPN/search?query=html&type=Archive_wxPython-use rs If someone would like to investigate wxHtmlWindow and summarize the limitations, features we should add, etc. then that would be great. Someone could also make an html sample as an experiment. Note you are not going to be able to make a full-featured browser using this control. Since PythonCard is built on top of wxPython, you can use wxPython directly whenever you want, which many of the samples do. Eventually, those wxPython elements will be wrapped by the PythonCard framework, but you can see how easy it is to experiment and see which parts of wxPython we want to add. ka |
From: Neil H. <ne...@sc...> - 2001-08-27 09:44:53
|
[Kevin] > > I'll add encoding, though I'm sure we'll have to change whatever I add. [Roman Suzi] > I think Unicode/UTF-8 will be fine. Does wxPython support Unicode? > (Though, non-Windows Russian developers will be wanting to > choose koi8-r, cp1251, or whatever.) It looks to me like wxWindows only supports Unicode fully where the underlying platform supports it which means, for now, on Windows NT and derivatives. GTK+ 1.x (and hence wxGTK) does not support Unicode and GTK+ 2.0 which will support Unicode is not ready yet. When GTK+ 2.0 is ready then there may still be a delay in wrapping this within wxWindows. Neil |
From: Roman S. <rn...@on...> - 2001-08-27 09:29:53
|
On Sun, 26 Aug 2001, Kevin Altis wrote: > > Russian or Hungarian developers (or from somewhere around there) will turn > > up and use it to hook up the right things so that they can work with > > PythonCard. Trust me on this one :-) And avoid sunscreen - it > > contains lots > > of very nasty chemicals :-( > > I'll add encoding, though I'm sure we'll have to change whatever I add. I think Unicode/UTF-8 will be fine. Does wxPython support Unicode? (Though, non-Windows Russian developers will be wanting to choose koi8-r, cp1251, or whatever.) I think that letting Unicode will eliminate problems which arise with porting software from one system to another. To prevent this hell (+ allow for special characters like math notation, astrology, chemistry, etc, signs) I think that there must be ONLY Unicode. Sincerely yours, Roman A.Suzi -- - Petrozavodsk - Karelia - Russia - mailto:rn...@on... - |
From: Kevin A. <al...@se...> - 2001-08-27 05:44:08
|
> Neil Hodgson > > I'll look at this from a CSS point of view as CSS is a "real standard" > which works fairly well. These are not heavily held opinions and I don't > mind if the font model is more wx specific. Since wxWindows uses "wxSWISS" > style constants for settings rather than string forms, I'd aim for string > forms that look much like CSS. I agree. CSS would be better, I think the question is how far we take it. > > I chose to combine and hide some of the wxPython font settings. > A Font is > > described by its optional attributes: > > family: 'serif', 'sansSerif', 'monospace', 'default' > > faceName: an actual font name from the system (Arial, Courier New...) > > CSS combines these as font-family with the particular names 'serif', > 'sans-serif', 'cursive', 'fantasy', and 'monospace' being mapped > by the user > agent to available real fonts. We need a list of face names to default to for each of these types for different platforms. Is there a standard CSS font list? The last time I did web pages for a living, CSS didn't exist, so I'm in the dark here :) > > size: a number representing point size (8, 9, 10, etc.) > > style: 'regular', 'bold', 'italic', 'boldItalic' > > Combining these makes no sense to me. I know the Microsoft font dialog > does this but why have bold and italic combined and underline > separate? (the > reason the dialog does it is that the normal, bold, italics, and > bolditalics > are separate fonts often in separate files and you'll occasionally see > demibold and oblique in that list). A richer weight parameter is more > general and maps to CSS as does style being for italic or oblique. Ultimately, we have to map to wxPython right now, so having a richer list is fine as long as it is going to translate. I specifically mimicked the font dialog since I thought that would be more intuitive. I will make underline another style if it works on *nix and not just Windows. > There should be an encoding or character set as well. Don't worry about > what it means or how to use it. After everything else is working > one or more > Russian or Hungarian developers (or from somewhere around there) will turn > up and use it to hook up the right things so that they can work with > PythonCard. Trust me on this one :-) And avoid sunscreen - it > contains lots > of very nasty chemicals :-( I'll add encoding, though I'm sure we'll have to change whatever I add. > > I need to work on some mechanism, so that a list of alternative > fonts can > be > > searched for in order such as ["Garamond, Times New Roman, Times"] in > order > > to make a match. > > CSS syntax compatibility may be worthwhile here - family is a space > delimited string with multiword family names quoted. Again, CSS is fine with me. It is mostly a matter of how far we take it and how complex the parsing will be. Will the CSS syntax translate over to wxSTC as well when we start setting font characteristics for individual characters in a field? ka |
From: Neil H. <ne...@sc...> - 2001-08-27 04:58:20
|
Kevin Altis: I'll look at this from a CSS point of view as CSS is a "real standard" which works fairly well. These are not heavily held opinions and I don't mind if the font model is more wx specific. Since wxWindows uses "wxSWISS" style constants for settings rather than string forms, I'd aim for string forms that look much like CSS. > I chose to combine and hide some of the wxPython font settings. A Font is > described by its optional attributes: > family: 'serif', 'sansSerif', 'monospace', 'default' > faceName: an actual font name from the system (Arial, Courier New...) CSS combines these as font-family with the particular names 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace' being mapped by the user agent to available real fonts. > size: a number representing point size (8, 9, 10, etc.) > style: 'regular', 'bold', 'italic', 'boldItalic' Combining these makes no sense to me. I know the Microsoft font dialog does this but why have bold and italic combined and underline separate? (the reason the dialog does it is that the normal, bold, italics, and bolditalics are separate fonts often in separate files and you'll occasionally see demibold and oblique in that list). A richer weight parameter is more general and maps to CSS as does style being for italic or oblique. > underline is currently turned off There should be an encoding or character set as well. Don't worry about what it means or how to use it. After everything else is working one or more Russian or Hungarian developers (or from somewhere around there) will turn up and use it to hook up the right things so that they can work with PythonCard. Trust me on this one :-) And avoid sunscreen - it contains lots of very nasty chemicals :-( > I need to work on some mechanism, so that a list of alternative fonts can be > searched for in order such as ["Garamond, Times New Roman, Times"] in order > to make a match. CSS syntax compatibility may be worthwhile here - family is a space delimited string with multiword family names quoted. Neil |
From: Kevin A. <al...@se...> - 2001-08-27 04:34:50
|
One other thing that you may be tempted to try, but which won't work is dot dot set notation. For example: self.components.field1.text.size = 12 # can't change the font size This won't work. You can do a get just fine: print self.components.field1.text.size I don't think there is a workaround for the set + set problem, but one of the Python wizards may have a solution. If you need to set a font property for a widget, just get a reference to the font, change the attribute you are interested in, then change the font for the widget. Also, because the Font class doesn't actually keep a reference to a real wxPython wxFont, you can just create a Font class that you want to use for a group of widgets, then iterate through the widgets to make them all use the same font characteristics. More on this kind of stuff as the fonts mature. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Kevin > Altis > Sent: Sunday, August 26, 2001 6:11 PM > To: pythoncard-Users > Subject: [Pythoncard-users] fonts - day three > > > dialog.py, test_dialogs.py, and widget.py have been updated in cvs to use > the new Font class. This is highly experimental, but doesn't > appear to break > any existing samples. > > I chose to combine and hide some of the wxPython font settings. A Font is > described by its optional attributes: > family: 'serif', 'sansSerif', 'monospace', 'default' > faceName: an actual font name from the system (Arial, Courier New...) > size: a number representing point size (8, 9, 10, etc.) > style: 'regular', 'bold', 'italic', 'boldItalic' > underline is currently turned off > > If None is passed in to initialize the Font class then you currently get a > Font with an empty faceName, a default family, 8 point, and > 'regular' style. > If a faceName is present, it overrides the family attribute. If > you specify > a faceName then you risk that font not being available on a different > system. You should only use 'faceName' right now for cross-platform > compatibility. > > You can provide a 'font' attribute in the .rsrc.py files for a widget such > as: > > 'font':{'family':'monospace', 'size':12} > 'font':{'faceName':'Garamond', 'size':10, 'style':'boldItalic'} > > or you can set the font while the program is running. > > f = PythonCardPrototype.widget.Font({'family':'monospace', 'size':12}) > self.field1.font = f > > I need to work on some mechanism, so that a list of alternative > fonts can be > searched for in order such as ["Garamond, Times New Roman, > Times"] in order > to make a match. I also need to provide a set of named fonts. Finally, I > need to change the Font class initialization, so that the defaults aren't > hard-coded, by using GetFont() on the background panel (Panel class) prior > to initializing any of the widgets. > > ka > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Kevin A. <al...@se...> - 2001-08-27 04:25:24
|
>David LeBlanc > > I installed PyCard under my Python21 directory and all the samples i've > tried do work more or less (get to that in a minute) except that > I don't see > how to get the turtle example to run any of it's scrpts. (.txt files). > running (for example) "python wxturtlechaos.py" causes nothing to happen - > no errors, nothing at all. (Later: AH! python test_turtle.py!! I ran this > before but I guess I was focused on the shell and not the app window - got > the scripts running - wow!) Sounds like you figured it out. The turtle uses other modules which are in the same directory, so I don't know how to get around the problem of knowing which file to run other than to put it in the readme.txt. Suggestions anyone? > The only real glitches i've noted so far is that buttons and text > tend to be > scrunched, especially noticable on the DbBrowser sample. (Speaking of the > DbBrowser sample, it works at times and at other times does not. It also > does not deal well with mysql not running when it's started - croaks.) Can you provide a JPEG screenshot? If you simply mean that the default font, which on NT should be 8 point, then that is the default and normal and yes it will look small depending on the size of your monitor and the resolution you run at. > All the samples report memory leaks, but that's probably not news in a > prototype running samples. Here is a sample from running test_turtle.py: > > 20:33:20: There were memory leaks. > 20:33:20: ----- Memory dump ----- > 20:33:20: wxFont at $1321AC8, size 12 > 20:33:20: wxClientDC at $13685B8, size 280 > 20:33:20: wxPen at $136BBC8, size 12 > 20:33:20: wxPen at $136DB28, size 12 > 20:33:20: > 20:33:20: > 20:33:20: ----- Memory statistics ----- > 20:33:20: 2 objects of class wxPen, total size 24 > 20:33:20: 1 objects of class wxClientDC, total size 280 > 20:33:20: 1 objects of class wxFont, total size 12 > 20:33:20: > 20:33:20: Number of object items: 4 > 20:33:20: Number of non-object items: 0 > 20:33:20: Total allocated size: 316 Yes, the one time I ran with the debug wxPython I noticed that. Actually until a few weeks ago PythonCard wouldn't even run with the debug wxPython, but sadly I had to find that out by myself late at night after doing a release ;-) I have no clue whether these memory leaks are real leaks that need to be fixed (nor do I know where to start looking) or something to expect with code like wxPython which is wrapping C++ classes. Robin, Neil, somebody? ka |
From: David L. <wh...@oz...> - 2001-08-27 03:41:21
|
Hi Ken; Yes, it was me. I got some sort of mail from the sourceforge bug tracker with my bug in it and I did use my email address to submit the bug so I don't know why you didn't see it. First things first: Python 2.1 PyCard 0.43 NT 4.0 sp6 Workstation My primary problem is not understanding exactly how to set up PyCard (sorry, but that's easier then "PythonCard") so that I can run all the samples. I installed PyCard under my Python21 directory and all the samples i've tried do work more or less (get to that in a minute) except that I don't see how to get the turtle example to run any of it's scrpts. (.txt files). running (for example) "python wxturtlechaos.py" causes nothing to happen - no errors, nothing at all. (Later: AH! python test_turtle.py!! I ran this before but I guess I was focused on the shell and not the app window - got the scripts running - wow!) The only real glitches i've noted so far is that buttons and text tend to be scrunched, especially noticable on the DbBrowser sample. (Speaking of the DbBrowser sample, it works at times and at other times does not. It also does not deal well with mysql not running when it's started - croaks.) All the samples report memory leaks, but that's probably not news in a prototype running samples. Here is a sample from running test_turtle.py: 20:33:20: There were memory leaks. 20:33:20: ----- Memory dump ----- 20:33:20: wxFont at $1321AC8, size 12 20:33:20: wxClientDC at $13685B8, size 280 20:33:20: wxPen at $136BBC8, size 12 20:33:20: wxPen at $136DB28, size 12 20:33:20: 20:33:20: 20:33:20: ----- Memory statistics ----- 20:33:20: 2 objects of class wxPen, total size 24 20:33:20: 1 objects of class wxClientDC, total size 280 20:33:20: 1 objects of class wxFont, total size 12 20:33:20: 20:33:20: Number of object items: 4 20:33:20: Number of non-object items: 0 20:33:20: Total allocated size: 316 I don't know how much time i'll have to spend on this, but I have been a hypercard afficiando for a long time and have some documents from back then, including an old HC 1.0 user's manual, some of the Danny Goodman HC 2.1 books, a book for a PC clone called Supercard, as well as my prize: "The Hypercard Book" (or something like that) from Apple that describes the event hierarchy and other internal tidbits about HC. Dave LeBlanc > -----Original Message----- > From: Kevin Altis [mailto:al...@se...] > Sent: Saturday, August 25, 2001 4:15 PM > To: wh...@oz... > Subject: more details on PythonCard question > > > Hi, > I'm hoping you're the same Dave LeBlanc that posted this bug report at SF: > http://sourceforge.net/tracker/index.php?func=detail&aid=455220&gr > oup_id=190 > 15&atid=119015 > > I looked on comp.lang.python since there wasn't an email address > associated > with the post. > > Anyway, I would like to answer your questions. If you could join > the mailing > list and post there that would be great. I need a little more detail about > what problems you were having in order to answer your question. > > The mailing list is at: > http://lists.sourceforge.net/lists/listinfo/pythoncard-users > Please make sure you have the latest release, 0.4.3 > > Thanks, > > ka > --- > Kevin Altis > al...@se... > |
From: Kevin A. <al...@se...> - 2001-08-27 01:14:03
|
> a faceName then you risk that font not being available on a different > system. You should only use 'faceName' right now for cross-platform > compatibility. That should be 'family' for cross-platform compatibility. ka |
From: Kevin A. <al...@se...> - 2001-08-27 01:09:47
|
dialog.py, test_dialogs.py, and widget.py have been updated in cvs to use the new Font class. This is highly experimental, but doesn't appear to break any existing samples. I chose to combine and hide some of the wxPython font settings. A Font is described by its optional attributes: family: 'serif', 'sansSerif', 'monospace', 'default' faceName: an actual font name from the system (Arial, Courier New...) size: a number representing point size (8, 9, 10, etc.) style: 'regular', 'bold', 'italic', 'boldItalic' underline is currently turned off If None is passed in to initialize the Font class then you currently get a Font with an empty faceName, a default family, 8 point, and 'regular' style. If a faceName is present, it overrides the family attribute. If you specify a faceName then you risk that font not being available on a different system. You should only use 'faceName' right now for cross-platform compatibility. You can provide a 'font' attribute in the .rsrc.py files for a widget such as: 'font':{'family':'monospace', 'size':12} 'font':{'faceName':'Garamond', 'size':10, 'style':'boldItalic'} or you can set the font while the program is running. f = PythonCardPrototype.widget.Font({'family':'monospace', 'size':12}) self.field1.font = f I need to work on some mechanism, so that a list of alternative fonts can be searched for in order such as ["Garamond, Times New Roman, Times"] in order to make a match. I also need to provide a set of named fonts. Finally, I need to change the Font class initialization, so that the defaults aren't hard-coded, by using GetFont() on the background panel (Panel class) prior to initializing any of the widgets. ka |
From: Kevin A. <al...@se...> - 2001-08-26 17:36:53
|
After a painful day of exploring fonts in wxWindows, this is what I've learned and still have questions about. I meant to post this yesterday, but ran out of time, so don't be surprised when you see a "fonts - day three" message later today. Courier, Helvetica and Times Roman on Windows are called New Courier, Arial and Times New Roman. These fonts serve as the base monospace, sans-serif and serif typefaces used for the wxWindows/wxPython font families. Are Courier, Helvetica and Times Roman the typeface names on Linux and Solaris? The foregroundColor for most widgets *is* the text color. You can see this by changing the foregroundColor with the widgets sample (test_widgets.py). The color range you can select from in the font dialog - which isn't even available on Linux and Solaris (need to confirm) - has a very limited color palette. If we support an explicit fontColor attribute for fonts as opposed to using foregroundColor separately, then the UI for selecting colors specific to fonts might be awkward. Apparently wxWindows/wxPython only supports underline on Windows right now?! Please confirm. Strikeout is not supported at all. It also appears that the full range of Windows fonts is not supported by wxWindows. Due to a bug in how fonts are handled for widgets (controls) in wxWindows/wxPython you have to make a copy of a font and replace the existing font for a widget rather than setting a font attribute directly. There appears to be a bug when setting the weight, so that you have to change another font attribute in addition to the weight for the change to be registered with a widget. This may be a bug of my own, but I think it is wxPython. I did a PythonCard app that accesses wxPython font methods directly to experiment with the various options. This is just a test and will not become a sample, so I'm attaching it here instead. ka |
From: Kevin A. <al...@se...> - 2001-08-26 14:28:06
|
> From: Andy Todd > > Anyway, I'm trying to set the application focus in response to an event. > In particular, when the user presses a button in my application I would > like to lead them by the hand and place the cursor in another widget. > > For future use I'm thinking we would want to be able to change the > application focus between different windows, regions, etc. This came up last week for me when I was trying to do a Find for one of the samples. Essentially, what you need to be able to do is post an event, specifically a wxPython SetFocus event. Now that you've reminded me, I'll go back and look at it, but we may have to wait until Rowland has some time to look at the event framework before this will get fixed. > Whilst I'm at it, we may want another attribute for each widget that > indicates its tab order. It is sometimes useful to vary the navigation > path between fields depending on various rules. Also, it may be > necessary to specify widgets in a certain order in the resource file but > have the default tab order through them to be different. There is a SF tracker issue for this: http://sourceforge.net/tracker/index.php?func=detail&aid=442241&group_id=190 15&atid=369015 > I know this is all irrelevant if you use the mouse to navigate to a > specific widget, but in the kind of applications which I sometimes write > (data entry for databases) where speed of input is optimum the default > user behaviour is to use the tab key to navigate between elements so > that you don't have to take your hand away from the keyboard at any time. I added an 'order' list to components yesterday to keep track of the order the widgets in the components dictionary were created. The creation order determines the tab order in the panel as well as how the widgets overlap right now. The first item in the .rsrc.py component list will be the first item tabbed to and will overlap any other widgets defined after it. The addition of the order list allowed me to fix the resourceEditor and Property Editor so that the output of the View Attributes and Property Editor components list now displays the widgets in the correct order. ka |
From: Andy T. <an...@cr...> - 2001-08-26 11:25:52
|
I can't seem to find a reference to this anywhere, but am willing to have my ignorance admonished. Anyway, I'm trying to set the application focus in response to an event. In particular, when the user presses a button in my application I would like to lead them by the hand and place the cursor in another widget. For future use I'm thinking we would want to be able to change the application focus between different windows, regions, etc. If this is easy to do then feel free to send me a one line reply, alternatively I can raise this as a project issue at SF. I just thought I would share my question with the list before taking that step. Whilst I'm at it, we may want another attribute for each widget that indicates its tab order. It is sometimes useful to vary the navigation path between fields depending on various rules. Also, it may be necessary to specify widgets in a certain order in the resource file but have the default tab order through them to be different. I know this is all irrelevant if you use the mouse to navigate to a specific widget, but in the kind of applications which I sometimes write (data entry for databases) where speed of input is optimum the default user behaviour is to use the tab key to navigate between elements so that you don't have to take your hand away from the keyboard at any time. Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |
From: Kevin A. <al...@se...> - 2001-08-25 19:16:04
|
Which release are you using? You can check by selecting 'About PythonCard...' from the 'Debug' menu if you've enabled the Message Watcher, Property Editor, or Shell when you started a sample. It will display a list of version numbers such as: PythonCard version: 0.4.3 wxPython version: 2.3.1 PyCrust version: 0.5.3 Python version: 2.1 (#15, Jun 15 2001, 14:13:47) [MSC 32 bit (Intel)] Platform: win32 Hopefully, you're using release 0.4.3. If so, have you tried the resourceEditor sample? You can open up any of the sample .rsrc.py sample files or just start creating your own layout. Use the Attributes menu item under the View menu to see the descriptions of the widgets on the current layout. I've posted a few messages about the resourceEditor and there is a readme.txt in the directory that is displayed if you select 'About resourceEditor...' from the 'Help' menu. Anyway, the other things you are asking for will eventually show up in some form. Remember that this is a prototype and alpha quality code at that (at least it is alpha-quality to me). The main purpose of the samples is to stress the framework and identify the features that need to be added or fixed. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Ronald > D Stephens > Sent: Saturday, August 25, 2001 11:58 AM > To: pyt...@li... > Subject: [Pythoncard-users] PythonCard Visual Card Creator > > > Unfortunately, just as I am making progress studying the samples > code, I am forced to make an unexpected trip overseas again, I will > be out of commission for a week and a half. So, at the risk of > being embarassed by my obvious ignorance and naivete, I am going to > summarize some thoughts I am having. > > What I most hope for is for someone to code a sort of visual card > creator for PythonCard. In other words, a visual card creator > might show a visual palette or window or card, with a group of > icons at the top representing the various widgets that Kevin has > already created for PythonCard. It is not necessary nor even > desirable to show an infinite number of widgets; rather, only a small > but representative sample of the widgets, one of each generic > kind, sort of a mini sampling of the functionality of PythonCard, to > allow beginnners or neophytes to begin coding real, usable > mini-PythonCard gui's right away, from the beginining of their > experience. > > I really believe in the concept of "hooking" potential users > right up front, allowing them to then evolve or grow into the coding > environment naturally, by trial and error, a little at a time. > > In any intellectual creation task, such as creating a program, > the hardest thing of all, by far, is the first step. Most people > never get started, because the first step is just too daunting > and scary. But when and if a person completes a first step, no matter > how small, and gets a psychic reward of success, they are hooked, > and they may never turn back. > > So, a sample card or window, offering a small set of widgets, > that can be pointed at and clicked on, and then dragged to the > appropriate spot on the window, offers an inviting introduction > to PythonCard. After placing the widget, a right click could bring > up a properties window, or a menu offering the selection of all > of the various PythonCard program modules, such as resource files, > resource editors, or the master PythonCard programming environment. > > Some of this code to do this may be "borrowable" from elsewhere. > What about Boa Constructor? With all of the open source programs > like Boa, to do some sort of visual gui creation, aren't they > available for code borrowing? Therr is nothing wrong with code > borrwoing, as I understand it is an honor to have one's code > stolen??? Of course, let me hasten to add, that what I have in moind > here must be far simpler than anything Boa offers or does, or > else it will miss sthe purpose. > > Now it would be nice if someone or some group would step up to > the plate and help out on doing this piece of the programming. Kevin > can't do it all by himself;-))))))) > > While we're at it, what about a visual metaphor for manipulating > the cards in Pythoncard? Couldn't we create a visual "stack" of > Pythoncards, sort of like the old Windows 3.1 Cardfile.exe > program, does anyone remember that, that showed a rolodex type stack of > cards for storing addresses, phone numbers and other contact > information? A visual stack of Pythoncards could be manipulated easily > and effectively. > > > I hope someone will step up to the plate and help Kevn on this. > I know that what I am so crudely and clumsily trying to describe > must represent a tremendously difficult and arduous programming > task, and so I am very presumptuous to even mention the topic. But > think what a boon to programmers this could be? > > I am overwhelmingly impressed and overjoyed with what Kevin and > you all have already created. I am humbled by my attempts to learn > by studying the source code for the samples. I believe the > programming model already being implented will represent a huge step > forward for Python gui creation. > > But a visual metaphor for doing the simplest gui ceation, only, > the introductory card creation, would be the coup de grace that > would provide the introductory enticement to lure the multitudes > of people, making PythonCard unstoppable, make it what some many of > us have dreamed of. I hope I am not out of line to dream publicly > on this list. > > Ron Stephens > > p.s. I must leave for the airport right now, so I apologize for > the sketchy description of what I have in mind. I will be unable to > add to it or answer questions for a week and a half. But maybe > that's good. Those of you so much more knowledgeable and capable than > I can probably create something much better than what I am > imagining anyway. Suffice it to say, a visual, easy to use > mini-introduction to creating pythoncards would be useful, and > would help, even a this early stage in the development of Pythoncard, > to attract users and maybe even contributors. It doesn't need to > be fancy, not powerful, nor in any way complete; just an easy way > to get started for users in creating the simplest PythonCard > event driven gui applets, if you will. > > ...sorry for not being able to contribute, but admiring and > grateful to all of those who do contribute, Ron Stephens > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Ronald D S. <rd...@ea...> - 2001-08-25 18:51:20
|
Unfortunately, just as I am making progress studying the samples code, I am forced to make an unexpected trip overseas again, I will be out of commission for a week and a half. So, at the risk of being embarassed by my obvious ignorance and naivete, I am going to summarize some thoughts I am having. What I most hope for is for someone to code a sort of visual card creator for PythonCard. In other words, a visual card creator might show a visual palette or window or card, with a group of icons at the top representing the various widgets that Kevin has already created for PythonCard. It is not necessary nor even desirable to show an infinite number of widgets; rather, only a small but representative sample of the widgets, one of each generic kind, sort of a mini sampling of the functionality of PythonCard, to allow beginnners or neophytes to begin coding real, usable mini-PythonCard gui's right away, from the beginining of their experience. I really believe in the concept of "hooking" potential users right up front, allowing them to then evolve or grow into the coding environment naturally, by trial and error, a little at a time. In any intellectual creation task, such as creating a program, the hardest thing of all, by far, is the first step. Most people never get started, because the first step is just too daunting and scary. But when and if a person completes a first step, no matter how small, and gets a psychic reward of success, they are hooked, and they may never turn back. So, a sample card or window, offering a small set of widgets, that can be pointed at and clicked on, and then dragged to the appropriate spot on the window, offers an inviting introduction to PythonCard. After placing the widget, a right click could bring up a properties window, or a menu offering the selection of all of the various PythonCard program modules, such as resource files, resource editors, or the master PythonCard programming environment. Some of this code to do this may be "borrowable" from elsewhere. What about Boa Constructor? With all of the open source programs like Boa, to do some sort of visual gui creation, aren't they available for code borrowing? Therr is nothing wrong with code borrwoing, as I understand it is an honor to have one's code stolen??? Of course, let me hasten to add, that what I have in moind here must be far simpler than anything Boa offers or does, or else it will miss sthe purpose. Now it would be nice if someone or some group would step up to the plate and help out on doing this piece of the programming. Kevin can't do it all by himself;-))))))) While we're at it, what about a visual metaphor for manipulating the cards in Pythoncard? Couldn't we create a visual "stack" of Pythoncards, sort of like the old Windows 3.1 Cardfile.exe program, does anyone remember that, that showed a rolodex type stack of cards for storing addresses, phone numbers and other contact information? A visual stack of Pythoncards could be manipulated easily and effectively. I hope someone will step up to the plate and help Kevn on this. I know that what I am so crudely and clumsily trying to describe must represent a tremendously difficult and arduous programming task, and so I am very presumptuous to even mention the topic. But think what a boon to programmers this could be? I am overwhelmingly impressed and overjoyed with what Kevin and you all have already created. I am humbled by my attempts to learn by studying the source code for the samples. I believe the programming model already being implented will represent a huge step forward for Python gui creation. But a visual metaphor for doing the simplest gui ceation, only, the introductory card creation, would be the coup de grace that would provide the introductory enticement to lure the multitudes of people, making PythonCard unstoppable, make it what some many of us have dreamed of. I hope I am not out of line to dream publicly on this list. Ron Stephens p.s. I must leave for the airport right now, so I apologize for the sketchy description of what I have in mind. I will be unable to add to it or answer questions for a week and a half. But maybe that's good. Those of you so much more knowledgeable and capable than I can probably create something much better than what I am imagining anyway. Suffice it to say, a visual, easy to use mini-introduction to creating pythoncards would be useful, and would help, even a this early stage in the development of Pythoncard, to attract users and maybe even contributors. It doesn't need to be fancy, not powerful, nor in any way complete; just an easy way to get started for users in creating the simplest PythonCard event driven gui applets, if you will. ...sorry for not being able to contribute, but admiring and grateful to all of those who do contribute, Ron Stephens |
From: Kevin A. <al...@se...> - 2001-08-24 16:36:47
|
If you know anything about fonts, programming issues around fonts, cross-platform font issues, wxPython font issues, cascading style sheets (CSS), etc. or just have some opinions on what you want in terms of font support, please contribute to this thread on the list. Fonts are not a speciality of mine, so if I end up doing this one alone we're gonna have to refactor many times ;-) The time has come to add font support to all the widgets in PythonCard. Since the prototype is based on wxPython, we're going to be limited by what can be done with the wxWindows/wxPython library and we're going to be further limited by what is going to work across platforms. Rowland and I avoided adding MS Windows-specific features to any of the existing widgets, and fonts should be handled the same way. This is also the time to start looking at wrapping wxSTC (Scintilla) for styled text support, though I'm still unclear on how the wxTE_RICH style for wxTextCtrl relates to wxSTC if at all. I encourage everyone to at least read the wxFont overview in the wxWindows/wxPython documentation, but I'm going to include it at the end of this message in case you don't know where to look. Other relevant sections include: Font encoding overview, Unicode support in wxWindows, wxFont class, wxFontDialog, and just about any other topic in the wxWindows docs with 'Font' in the name. I don't want to use the wxWindows constants directly for font families, but will probably use some equivelant mapping initially. I definitely want to support basic style sheets, so that an app can define a fontStyleSheet and then set the font for a widget simply by referring to the named fontStyleSheet. This isn't going to be a full web CSS-like capability, but we can borrow some of the ideas from CSS. platform-specific features In the future, we will probably have a some kind of setting so that if you wanted to write a PythonCard app that uses platform-specific features the framework will let you do so, but then make appropriate warnings when the app is being written and run. So, if there is some feature that is platform-specific that you want, you can still bring it up and it will get posted into the feature requests. ka --- wxFont overview Class: wxFont A font is an object which determines the appearance of text, primarily when drawing text to a window or device context. A font is determined by the following parameters (not all of them have to be specified, of course): Point size This is the standard way of referring to text size. Family Supported families are: wxDEFAULT, wxDECORATIVE, wxROMAN, wxSCRIPT, wxSWISS, wxMODERN. wxMODERN is a fixed pitch font; the others are either fixed or variable pitch. Style The value can be wxNORMAL, wxSLANT or wxITALIC. Weight The value can be wxNORMAL, wxLIGHT or wxBOLD. Underlining The value can be TRUE or FALSE. Face name An optional string specifying the actual typeface to be used. If NULL, a default typeface will chosen based on the family. Encoding The font encoding (see wxFONTENCODING_XXX constants and the font overview for more details) Specifying a family, rather than a specific typeface name, ensures a degree of portability across platforms because a suitable font will be chosen for the given font family. Under Windows, the face name can be one of the installed fonts on the user's system. Since the choice of fonts differs from system to system, either choose standard Windows fonts, or if allowing the user to specify a face name, store the family id with any file that might be transported to a different Windows machine or other platform. ---------------------------------------------------------------------------- ---- Note: There is currently a difference between the appearance of fonts on the two platforms, if the mapping mode is anything other than wxMM_TEXT. Under X, font size is always specified in points. Under MS Windows, the unit for text is points but the text is scaled according to the current mapping mode. However, user scaling on a device context will also scale fonts under both environments. |
From: Andy T. <an...@cr...> - 2001-08-24 09:52:26
|
Evening all, I was idly perusing the sample code (I do that on Friday nights, you know) and I discovered that none of the samples uses the logging module that is included in the prototype. Determined to remedy this oversight I set about changing one of the samples and ten minutes later (beat that Kevin!), worldclock has been changed. The code in CVS has been updated and should be included in the next release. If you are running it without a console window you will not notice any difference. If you have a console window the regular messages that used to be output are no longer. To get output you need to enable logging with the -l switch on the command line. Switch it on and all of the messages will be written to a file called pythoncard.log in the same directory as worlclock.py. Note that this file is overwritten each time you run the application, you have been warned! Luckily the changes to the code were quite simple, just import the log class; """ from PythonCardPrototype.log import Log """ Then add a couple of lines to the __init__ method of your application class; """ self.log = Log.getInstance() self.log.enableLevels( [ Log.ERROR, Log.WARNING, Log.DEBUG, Log.INFO ] ) """ Then, when you want to output a message just use; self.log.info( < whatever you need to output > ) or self.log.debug( ... ) self.log.error( ... ) self.log.warning( ... ) When calling any of these methods you can (I'm told) include any number and combination of items (well, OK - objects), their 'repr' methods will be called to render them into a format suitable for writing to a file. Note that I've enabled all of the log levels in the code, so running the sample application with -l you will see all of the messages that are output. As a general rule of thumb it is better to only enable ERROR and WARNING and to disable DEBUG and INFO. When you are actively changing or developing a module turn these on but don't forget to turn them back off when you ship. Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |
From: Kevin A. <al...@se...> - 2001-08-24 01:22:31
|
PythonCard is a software construction kit (in the spirit of Apple's HyperCard) written in Python. You can download the latest release at: http://sourceforge.net/project/showfiles.php?group_id=19015 Samples included in the latest release: addresses, conversions, dbBrowser, dialogs, findfiles, minimal, proof, resourceEditor, searchexplorer, sounds, SourceForgeTracker, textIndexer, tictactoe, turtle, widgets, worldclock To see screenshots of some of the samples, visit: http://pythoncard.sourceforge.net/samples.html A description of each sample is included in the docs directory. PythonCard home page http://pythoncard.sourceforge.net/ SourceForge summary page http://sourceforge.net/projects/pythoncard/ Mailing list http://lists.sourceforge.net/lists/listinfo/pythoncard-users PythonCard requires Python 2.1.x or later and wxPython 2.3.x. wxPython is available at http://www.wxpython.org/ PythonCard relies on wxPython, it will support the Macintosh once wxPython has been ported to the Mac. PyCrust 0.5.3 PyCrust by Patrick K. O'Brien is included as part of the PythonCardPrototype releases. If you would like to find our more about PyCrust or get a separate distribution, please visit the home page at http://sourceforge.net/projects/pycrust/ ---------------------------- Changes since release 0.4.1 (2001-08-16): Release 0.4.3 2001-08-23 Andy Todd converted worldclock so that it no longer requires an external JavaScript program to run added samples.txt file to the docs directory to document the purpose of each sample application fixed numerous display bugs in the Property Editor including the selection bug which was causing a KeyError when using the resourceEditor resourceEditor changes added a Help menu, About resourceEditor... menu item View attributes display is now more complete Property Editor is shown by default the Shell is now shown by default for the turtle sample added addresses sample, which shows the conversion of an existing HyperCard stack background layout and data to PythonCard. addresses does transparent saves of data and can import contacts from Outlook as well. disabled helpText attribute Release 0.4.2.1 2001-08-21 Property Editor is now a listener of the WidgetDict class so the component list is automatically updated as widgets are added and deleted resourceEditor sample changes added Duplicate Widget menu item fixed the selection code Property Editor now updates correctly script added to dbBrowser sample to populate a mySQL test database Release 0.4.2 2001-08-20 the PythonCard mailing list has moved to http://lists.sourceforge.net/lists/listinfo/pythoncard-users the home page has been redesigned and the other HTML pages have been validated to make sure they conform to the HTML spec. the HTML pages in the docs\html directory can now be used locally, they will fetch the large JPEG images from the web. the Property Editor can now edit widget attributes added getPosition/setPosition and getSize/setSize to Background added basic mouse events to StaticText, StaticLine, and Image widgets converted Dan Winkler's original PythonCard demo app to the PythonCardPrototype framework, renamed it textIndexer and made it a sample. It currently requires ZODB to run You can use standalone ZODB or ZODB from Zope, see the readme.txt in the textIndexer directory for more info Andy Todd added his dbBrowser sample which is able to browse mySQL databases. readme.txt in the dbBrowser directory for more info added a resourceEditor sample, which is the beginnings of a GUI resource (.rsrc.py files) editor. see the readme.txt in the resourceEditor directory for more info |
From: Kevin A. <al...@se...> - 2001-08-23 22:49:26
|
I sent this reply to Rob Andrews of the Useless Python site today. Useless Python is at http://www.lowerstandard.com/python/ Rather than make a separate post to the list asking people to post questions about PythonCard, you should just read the message below and then start asking questions :) ka -----Original Message----- From: Kevin Altis [mailto:al...@se...] Sent: Thursday, August 23, 2001 3:46 PM To: Rob Andrews Subject: RE: opinions on PythonCard? > I've bookmarked your homepage and downloaded your last release. Can you > point to any documentation (however sketchy) available at this point? > I'm happy to help out any way I can. The samples are the best source of how-to. I posted a a samples description before I went to lunch that is also in cvs and will be part of the next release. http://www.geocrawler.com/lists/3/SourceForge/14884/0/6467674/ Last week I asked people on the list to start submitting even the most basic questions, so that I can start putting together docs from a newbie point of view rather than my warped framework point of view, but we got little on the list, probably partly because we switched list locations immediately after that post. Anyway, I'm gonna ask again, then put out my own notes in the meantime. There is a brief tutorial.txt in the docs directory, and numerous helpful bits in the list archives, which I'll try and bring forward for easier consumption. spec.py in the package directory documents the available widgets, events, and attributes. You have to look at widget.py to see all the methods. The easiest way to play around is to start the shell when you launch a sample. For example, typing: minimal -s Other command line options are -p (Property Editor), -m (Message Watcher) and -l (log). If you have the shell open, then you can use command-completion to see attributes and methods of any object. I hope that gets you started. The biggest help to the project at this point is probably asking mundane questions to solicit answers, which can then become the basis for documentation. ka |
From: Kevin A. <al...@se...> - 2001-08-23 20:04:43
|
> The problem I have is a generic Python problem that I need an answer to in > order to finish the method. I'm adding string attributes like so: > dStr += " '%s':'%s', \n" % (key, value) > This doesn't escape the string, so if you have a single quote, > newline, tab, > etc. in the string then the output isn't going to be correct. I thought > there was a general string escape method, but I'm not finding it. I can > write my own to parse the string and put in \n \t \xhh for hex... > but there > has to be a routine that already does this for me in the standard > libraries. > Pointers please. Doh. I shouldn't ever write documentation and code on the same day, writing docs apparently makes me dumb. repr() seems to do the job, though I didn't test all the special characters. ka |