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-23 19:32:46
|
Another day, another opportunity to embarrass my junior high school English teacher. Below is the first draft of samples.txt which I'm including in the docs directory and will eventually turn into HTML and link to the sample screenshots already displayed in samples.html and samples2.html. Please provide corrections and suggestions or indicate which descriptions make no sense. Apologies if the wrapping from the mailer makes this difficult to read. ka --- Descriptions of the samples included with the PythonCardPrototype The main purpose of the samples is to "stress" the PythonCard framework and make sure that the framework is robust and full-featured, yet still simple for the beginner to use. "We learn by doing". As users (programmers) write more samples, we are able to identify which portions of the framework are missing, too simplistic or too complex or just plain broken. The PythonCardPrototype API changes as we identify these issues and fix the framework and the samples always represent the latest version of the API. We don't have a complete API yet, that is why we refer to the code as a PythonCard prototype. The ongoing list of things that needs to be added to PythonCard is represented by the Feature Requests here: http://sourceforge.net/tracker/?atid=369015&group_id=19015&func=browse You can also view this list using the SourceForgeTracker sample. It is essential that we create lots of samples to identify framework issues in order to avoid creating a framework only suitable for simplistic "toy" programs that are only one step beyond "hello world". Equally bad would be a framework that is too general and requires the user to do a lot of work just to write a basic program; simple programs should be simple to write; That is the reason we aren't forcing a model-view-controller (MVC) paradigm on the user, MVC is not easy to grasp or use correctly. The samples also serve as a learning tool. Since there is little documentation for PythonCard right now, the best way to learn to use PythonCard is to copy and modify the samples. Note that due to the current limitations of the framework, some samples use wxPython method calls directly. The wxPython calls can usually be identified via the method name which will start with a capital letter (e.g. GetSize instead of getSize). Please help the PythonCard project, by submitting your own samples and asking questions about PythonCard on the mailing list: http://lists.sourceforge.net/lists/listinfo/pythoncard-users adddresses addresses is the first test of converting the layout and data of an existing HyperCard stack to the PythonCard format. All the code used to do the conversion, limitations of the conversion, and the steps of the conversion are documented. addresses can import Outlook contacts. Comma separated values (CSV) import will be added in the future. addresses also implements transparent loading and saving of the contact data to a separate text file. The textIndexer sample and addresses thus provide the start of a generic transparent data storage model for PythonCard that will eventually be available to all PythonCard apps that want to use it. conversions conversions provides conversion between english <-> morse code and celsius <-> fahrenheit. The conversion framework is implemented so that it should be relatively easy to add other conversions. The base class handles renaming the widgets for a particular conversion. dbBrowser dbBrowser lets you browse mySQL databases. It dynamically creates and destroys widgets to display the fields from a database rather than just using static widget definitions in a resource (.rsrc.py) file. See the readme.txt for more information. resourceEditor resourceEditor is the start of a full-featured GUI resource editor for PythonCard. The current version doesn't allow the user to save files, but the widget descriptions can be viewed with the View Attributes menu command. See the readme.txt for more information. dialogs dialogs shows off all the native dialogs currently supported by PythonCard. If you need to use a FileDialog, MessageDialog, etc. you should refer to this sample and copy the code for the dialog you want to use. findfiles findfiles is currently an incomplete sample, though it does work. It borrows code from the sgrepmdi.py module included with PythonWin. It can read the .grep files created by PythonWin. It can do a grep search just like PythonWin and display the results. Given the mechanism used for searching, do not search your entire hard drive or a network drive or you will wait a LONG TIME for results. minimal minimal is almost the smallest PythonCard program possible. Refer to tutorial.txt for an example of copying and modifying minimal.py as your first PythonCard program. proof proof grew out of the original proof of concept for PythonCard. It shows off all the widgets, but the widgets sample does a much better job of showing all the widgets and allowing the user to experiment with changing the widget attributes (properties). proof shows the use of a tiled background image and handles some events not used in any of the other samples. proof will probably be replaced in the future by a sample dedicated to testing all possible events. resourceEditor resourceEditor represents the beginnings of a GUI resource editor for PythonCard. See the readme.txt for more information. resourceEditor makes extensive use of 'command' handlers. searchExplorer searchExplorer was the first "useful" PythonCard app. It presents a list of search sites and when the user clicks the "Search" button, it launches a web browser to display the search results at the given site. It automatically keeps tracks of the searches made and saves them to disk. searchExplorer has an Edit menu that you might want to copy for your own code. The textIndexer and resourceEditor samples uses a similar Edit menu that use 'command' handlers rather than menu handlers which you might want to use instead. I use searchExplorer, SourceForgeTracker, and worldclock every day, so I keep a shortcut to each app on my desktop; I renamed the copies with a .pyw extension so a console doesn't appear when I double-click the shortcuts. sounds sounds is a simple test of the sound.py module that can play .wav files. SourceForgeTracker SourceForgeTracker downloads XML from SourceForge in order to display Bug Reports and Feature Requests for a variety of Python SF projects. The XML processing of the Unicode is a bit buggy, so not all items are displayed. SourceForgeTracker provides an example of two alternative layouts, one that has the standard "gray" dialog look and one that uses an alternative backgroundColor and empty Image widgets behind the other widgets to give it a Yahoo-style look. textIndexer textIndexer is a conversion of Dan Winkler's original PythonCard demo. It uses ZODB as its storage mechanism, so you will need ZODB standalone or Zope installed in order to use it. See the readme.txt in the textIndexer directory for more information. textIndexer uses command attributes. tictactoe tictactoe shows off using a background image, the ImageButton widget and background handlers. turtle turtle provides a fairly complete turtle library, numerous sample turtle scripts (in the scripts directory) and an application to view them with. The shell can be used to move the turtle(s) around interactively. See the docs directory for more information. widgets widgets shows off all the PythonCard widgets. You can set many of the attributes to see how it impacts each widget type. worldclock worldclock runs an external JavaScript (ECMAScript) program and then downloads an image off the www.time.gov server. Worldclock doesn't use a menubar. It also shows the use of a TextField with no border where the text can't be edited, but can still be copied to the clipboard; this is a good alternative to using a StaticText widget, if you don't need center or right text alignment. See the readme.txt for more information on running worldclock, setting the timezone, etc. |
From: Kevin A. <al...@se...> - 2001-08-23 17:39:07
|
The resourceEditor is now dumping the full attribute list for each widget. The code is below. 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. BTW, I'm not super happy with this attribute listing. It doesn't deal with defaults, such as using -1 for the x, y position or width, height size... I'm having a mental block and am not sure how to suppress the defaults correctly, so that if the widget is using a default value as defined in spec.py, then it is not output in the listing. Yet another reason you have to hand tweak the output, sigh. Finally, the resourceEditor in cvs now forces the Property Editor to be visible when the app starts up, and I added a Help menu and an About menu item. ka --- def widgetAttributes(self, widget): # make sure these primary attributes show up # at the beginning of the listing # the remaining ones will be in alphabetical order dStr = "{'type':'%s', \n" % widget.__class__.__name__ dStr += " 'name':'%s', \n" % widget.name dStr += " 'position':%s, \n" % getattr(widget, 'position') dStr += " 'size':%s, \n" % getattr(widget, 'size') for key in widget._getAttributeNames(): if key in ['bitmap', 'name', 'position', 'size', 'toolTip']: pass elif getattr(widget, key) != None: value = getattr(widget, key) if type(value) == types.StringType: # need to escape strings dStr += " '%s':'%s', \n" % (key, value) else: if key in ['editable', 'enabled', 'visible'] and value == 1: # don't include default values pass else: dStr += " '%s':%s, \n" % (key, value) dStr += ' },\n' return dStr |
From: Kevin A. <al...@se...> - 2001-08-23 15:44:32
|
None of the required mechanisms for helpText in a window are in place, so I disabled helpText in spec.py, debug.py, and widget.py to reduce any confusion. In the future, we can easily uncomment the lines to put it back in. ka |
From: Magnus L. H. <ml...@id...> - 2001-08-23 12:15:19
|
This one's pretty good (the original by Christian Tismer -- don't know where the "official" one is): http://www.druid.net/~darcy/files/delimited.txt Not sure about the license, either... But with code as small as this, it would surprise me if the license were very restrictive. -- Magnus Lie Hetland http://www.hetland.org "Reality is that which, when you stop believing in it, doesn't go away." -- Philip K. Dick |
From: Kevin A. <al...@se...> - 2001-08-23 02:41:29
|
I was looking around for a comma separated values (CSV) module in the Python Standard Libraries and didn't find one, so I went hunting on Google. I came up with: http://object-craft.com.au/projects/csv/ CSV is such a common import and export format that we should probably have one as a standard part of the framework. It is a relatively straightforward programming problem, but there are lots of exceptions and application-specific ways of doing quoting, so it is best not to write our own if we don't have to. We also need to have the framework handle export from a list, which I'm not sure the package above does. I don't want to require the user to download a separate package, so we need to be able to include the package above or any other we find in our distributions. Before I go ahead and contact Dave Cole, does anyone know of alternative CSV code that we should consider using instead? No GPL code, please. ka |
From: Kevin A. <al...@se...> - 2001-08-23 02:07:38
|
I added logic to the code to disable the Import Outlook menu item if either the win32 libraries or Outlook is not found. That should solve the problem. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Neil > Hodgson > Sent: Wednesday, August 22, 2001 6:04 PM > To: pyt...@li... > Subject: Re: [Pythoncard-users] addresses sample > > > Kevin Altis: > > The addresses sample can now import Outlook contacts. I have no > idea what > > kinds of errors will occur when 'addresses' is run on a box without the > > win32 and COM extensions (*nix), nor do I know what happens when Outlook > is > > not installed on a machine, so please let me know and I'll add more > > try/except blocks. > > I only have Outlook Express and see: > > attempting to load Outlook > unable to load Outlook > loading records... > Traceback (most recent call last): > File "G:\pyc\PythonCardPrototype\menu.py", line 219, in doMenu > item.notifyEventListeners( event ) > File "G:\pyc\PythonCardPrototype\event.py", line 266, in > notifyEventListeners > listener.eventOccurred( event ) > File "G:\pyc\PythonCardPrototype\dispatch.py", line 70, in eventOccurred > handler.getFunction()( self._scriptable, aEvent.getSource(), aEvent ) > File "addresses.py", line 179, in on_fileImportOutlook_command > oOutlook.loadRecords() > File "G:\pyc\PythonCardPrototype\samples\addresses\outlook.py", line 45, > in lo > adRecords > onMAPI = self.oOutlookApp.GetNamespace("MAPI") > AttributeError: MSOutlook instance has no attribute 'oOutlookApp' > > Neil > > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Neil H. <ne...@sc...> - 2001-08-23 01:04:53
|
Kevin Altis: > The addresses sample can now import Outlook contacts. I have no idea what > kinds of errors will occur when 'addresses' is run on a box without the > win32 and COM extensions (*nix), nor do I know what happens when Outlook is > not installed on a machine, so please let me know and I'll add more > try/except blocks. I only have Outlook Express and see: attempting to load Outlook unable to load Outlook loading records... Traceback (most recent call last): File "G:\pyc\PythonCardPrototype\menu.py", line 219, in doMenu item.notifyEventListeners( event ) File "G:\pyc\PythonCardPrototype\event.py", line 266, in notifyEventListeners listener.eventOccurred( event ) File "G:\pyc\PythonCardPrototype\dispatch.py", line 70, in eventOccurred handler.getFunction()( self._scriptable, aEvent.getSource(), aEvent ) File "addresses.py", line 179, in on_fileImportOutlook_command oOutlook.loadRecords() File "G:\pyc\PythonCardPrototype\samples\addresses\outlook.py", line 45, in lo adRecords onMAPI = self.oOutlookApp.GetNamespace("MAPI") AttributeError: MSOutlook instance has no attribute 'oOutlookApp' Neil |
From: Kevin A. <al...@se...> - 2001-08-23 00:40:18
|
The addresses sample can now import Outlook contacts. I have no idea what kinds of errors will occur when 'addresses' is run on a box without the win32 and COM extensions (*nix), nor do I know what happens when Outlook is not installed on a machine, so please let me know and I'll add more try/except blocks. I added a menubar derived from the textIndexer sample, New Card, and Delete Card options. I haven't done "Find" yet. Data is automatically saved as you move from card to card and written to disk when you quit! I'm saving to a userdata.txt file in order to avoid trashing the original data.txt file. I think that 'addresses' and 'textIndexer' will be nice samples for us to experiment on data storage models for the framework. Given how quickly I did this, I'm sure there are logic bugs. I know there are some import problems with the Outlook data, but it works reasonably well. Enjoy, ka ps. Importing Outlook data is pretty slow and it eats up all your CPU while it is working, so be patient. Also, if you've installed the Microsoft Outlook virus patches, you'll have to grant Python access to your contacts or the import will fail. > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Kevin > Altis > Sent: Wednesday, August 22, 2001 11:57 AM > To: pythoncard-Users > Subject: [Pythoncard-users] addresses sample > > > I've checked in the initial port of the addresses sample > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pythoncard/PythonCa > rdPrototyp > e/samples/addresses/ > > I included the HyperTalk script used for the conversion (script.txt), the > output of the layout information (fields.txt), the data from the fields > (data.txt), a readme.txt describing the purpose of this sample, and a > notes.txt describing the conversion process in detail. > > When the addresses sample starts up it automatically imports the list in > data.txt and you can move back and forth between the two "cards" of data. > > Later today I plan to hook up the New Card, Delete Card, and Find buttons, > and a menubar. The first thing I need to do is get the > transparent saves of > the data going so that as you go to the previous and next records > ('cards') > and quit the application the data is saved for you. I'll add support for > importing Outlook data at some point, since I use Outlook and have a data > set to test against. > > I realize the telephone fields are a bit small given the default font. I'm > gonna leave them as is until we have font support hooked up. > > If you have developer cvs access, please work on a copy of the addresses > sample, so that you don't end up accidentally checking in a modified > data.txt file. > > ka > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Kevin A. <al...@se...> - 2001-08-22 18:56:30
|
I've checked in the initial port of the addresses sample http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pythoncard/PythonCardPrototyp e/samples/addresses/ I included the HyperTalk script used for the conversion (script.txt), the output of the layout information (fields.txt), the data from the fields (data.txt), a readme.txt describing the purpose of this sample, and a notes.txt describing the conversion process in detail. When the addresses sample starts up it automatically imports the list in data.txt and you can move back and forth between the two "cards" of data. Later today I plan to hook up the New Card, Delete Card, and Find buttons, and a menubar. The first thing I need to do is get the transparent saves of the data going so that as you go to the previous and next records ('cards') and quit the application the data is saved for you. I'll add support for importing Outlook data at some point, since I use Outlook and have a data set to test against. I realize the telephone fields are a bit small given the default font. I'm gonna leave them as is until we have font support hooked up. If you have developer cvs access, please work on a copy of the addresses sample, so that you don't end up accidentally checking in a modified data.txt file. ka |
From: Kevin A. <al...@se...> - 2001-08-22 03:07:12
|
https://sourceforge.net/project/showfiles.php?group_id=19015 Changes since 0.4.2: 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 I know I said I wasn't going to post to the list about the daily releases, but this is probably a better release to use than the 0.4.2 I did yesterday given the Property Editor and resourceEditor changes. Of course, if I wouldn't have done the release last night I wouldn't have had the "aha" moment immediately after posting that enabled me to make the fixes above ;-) ka |
From: Kevin A. <al...@se...> - 2001-08-22 02:45:13
|
> From: Ronald D Stephens [mailto:rd...@ea...] ... > modify, at this vey early stage, and get "results". But when I rename the > two files (minimal.py and minimal.rsrc) I get error > messages. Just in case, make sure the file is named 'minimal.rsrc.py', not 'minimal.rsrc'; you need the trailing .py extension. If that isn't the problem, you can include both files in a post to the list and we'll debug from there. > In working my way through the various error messages, I learn and fix some > things,. But I have one question that I woudl apprecite > help on: > > In the backgrounds section of the rsrc files (I am looking at most of the > sample rscr files or all of them) , I do not yet > understnad where the 'name': comes from, as in bgWidgets in the following > code snippet; > > 'backgrounds': > [ > {'type':'Background', > 'file':'test_widgets.py', > 'classname':'WidgetsTest', > 'name':'bgWidgets', <= <=<=<=<= > #'image':'tile.bmp', > #'tiled':1, > 'components': > > I do not understand where bgWidgets comes from , and also the > anologous name > under resource file backgrounds of the other samples. I > think if I could understand this I might be able to fix my problems and > create successfully renamed files that allow me to claim a > "significant" ;-))) > (bear with me OK ) first newbie PythonCard "program". This to me > would be a > stunning breakthrough. All components in PythonCard require a unique 'name' along with a 'type' (type really means a Python class), so there is a 'name' for all the widgets (components) in the Background as well as the 'Background' itself, the 'Stack', each 'Menu' and 'MenuItem'. The exception is the 'MenuBar', but that is actually a bug that will be fixed when we add support for multiple menubars that you can switch between. The spec.py file defines the optional and required elements used in the .rsrc.py files and is used to validate the contents when your application starts up. The 'name' item for the 'Background' becomes important when you write background handlers that can deal with events for multiple widgets. The tictactoe sample shows this usage. The background 'name' is 'bg1' and the handler in the tic.py file does the work for all nine ImageButtons. The script for btn0 was left in the code just to show that you can mix a background handler and specific widget handler in the same script. --- from tic.rsrc.py { 'type':'Background', 'file':'tic.py', 'classname':'Tic', 'name':'bg1', 'image':'lines.jpg', --- from tic.py def on_bg1_mouseClick(self, button, event): # make sure that we only handle a mouseClick for # the ImageButtons on the playfield if self.playfieldButton(button): print "bg1 mouseClick handler" btnName = button.name pos = int(btnName[3]) #print button.getName(), 'clicked' if self.legalMove(btnName): self.board[pos] = self.human self.setButtonImage(btnName, self.humanImage) self.doComputerMove() else: print "illegal move" When an mouseClick event is generated, PythonCard first looks to see if there is a handler for the target (widget) that generated the event and if so, it calls that method. If it doesn't find a method for the target, it then looks for a handler matching the parent (bg1 in the case above), and then the next parent and so on. > Anyway, I am sufficiently "hooked" to keep at it in my "spare" time. Great! > I am really looking forward to a visual gui layout tool, but I can wait; I > am enjoying studying the Python code of this project! Even if you are looking at the .rsrc.py files, you should still give the resourceEditor a try. In a few days you should be able to use it for most of your layout needs. > I think I will also post about the availability of this project on Byte > magazine's John Udell online forum, unless Kevin objects. I > just discovered this forum and lots of folks there are interested in this > sort of thing, and Python is often intelligently > disucussed. Also great! The more people, the merrier. ka |
From: Kevin A. <al...@se...> - 2001-08-22 02:21:41
|
-----Original Message----- From: Ronald D Stephens [mailto:rd...@ea...] Sent: Tuesday, August 21, 2001 7:21 PM To: Kevin Altis Subject: Questions and comments... I must say that, the more I study the source code, the more impressed I get. Even to a newbie, it seems to be elegant, in that it makes sense. I do not claim to udnerstand all of the details at all, but I feel that I get the big picture. I also feel that this work will lead to some good things. By following the tutorial, I can modify the minimal.py and minimal.rsrc files and get all kinds of neat results. I wanted to share some of these results with the list, because surely any other newbie around who has doubts would be impressed that even I could modify, at this vey early stage, and get "results". But when I rename the two files (minimal.py and minimal.rsrc) I get error messages. In working my way through the various error messages, I learn and fix some things,. But I have one question that I woudl apprecite help on: In the backgrounds section of the rsrc files (I am looking at most of the sample rscr files or all of them) , I do not yet understnad where the 'name': comes from, as in bgWidgets in the following code snippet; 'backgrounds': [ {'type':'Background', 'file':'test_widgets.py', 'classname':'WidgetsTest', 'name':'bgWidgets', <= <=<=<=<= #'image':'tile.bmp', #'tiled':1, 'components': I do not understand where bgWidgets comes from , and also the anologous name under resource file backgrounds of the other samples. I think if I could understand this I might be able to fix my problems and create successfully renamed files that allow me to claim a "significant" ;-))) (bear with me OK ) first newbie PythonCard "program". This to me would be a stunning breakthrough. Anyway, I am sufficiently "hooked" to keep at it in my "spare" time. I am really looking forward to a visual gui layout tool, but I can wait; I am enjoying studying the Python code of this project! I think I will also post about the availability of this project on Byte magazine's John Udell online forum, unless Kevin objects. I just discovered this forum and lots of folks there are interested in this sort of thing, and Python is often intelligently disucussed. Ron Stephens |
From: Kevin A. <al...@se...> - 2001-08-22 00:03:47
|
I added a Duplicate Widget menu item and command. I also cleaned up the mouseDown selection code. 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? 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. 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 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 |
From: Kevin A. <al...@se...> - 2001-08-21 20:01:02
|
I made the Property Editor a "listener" of the background components so now when you add or delete a widget, the change should be reflected in the Property Editor. This makes the Property Editor usable with the resourceEditor. When you select a widget in the resourceEditor, it automatically selects that component in the Property Editor. I think I fixed the backgroundColor reset problem when opening up a stack. The default background color appears to be the wxPython constant wxSYS_COLOUR_3DLIGHT but I haven't tried using many color schemes to see if this is always correct. The real problem is that when you pass a wxNullColour to wxPython it doesn't automatically use the correct background and foreground colors. I think this is a bug, but if the behavior of wxWindows/wxPython isn't going to change, we'll need to special-case the default color when the user specifies a color of 'none'. There is a bug that I haven't been able to solve yet that occurs when you have a widget selected and then open a different .rsrc.py file that has a widget with the same name; this would most likely be a reload of the currently open .rsrc.py file. What I think is happening is that a mouse event is occurring when you select the file in the Open File dialog and somehow that is being sent to the background. In between hiding the sizing handles, deleting old widgets and creating new ones, the widget ends up getting moved and a KeyError is generated when accessing the list. I'm still investigating, but if you have any ideas let me know. ka |
From: Andy T. <an...@cr...> - 2001-08-21 12:24:41
|
You may have noted that the web pages and documentation of the prototype are not changing as rapidly as the code base does. To get them up to date I would like your help to update the samples web pages and to start to produce some documentation. The first thing I would like to do is produce some more screenshots of the sample applications that aren't reflected on the web site. If anyone can provide some screen shots of SourceForge tracker, textIndexer, Property Editor, Message Watcher or PyCrust they will be very welcome. I'd be even more appreciative if they on platforms other than Windows. I'd be eternally grateful if you could code up some html to accompany them in the style of the existing sample web pages. There have also been a few rumblings of user and technical documentation on and off the list. If anyone has started can you please let the list know. Even outlines are welcome and then we can all chip in and improve the usefulness of the system. Thanks in advance, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |
From: Andy T. <an...@cr...> - 2001-08-21 12:17:36
|
I've made a minor change to the dbBrowser sample application. Previously it forced you to enter a username, password and database name. Each of these items is now optional. See the readme.txt in cvs for more details. Whilst I was at it I also took the opportunity to provide a sample schema to those who are using this application as a first taste of MySQL. I've added a 'scripts' directory directly under the dbBrowser application in cvs. It now holds one script (mysql_sample.py) which, when run, will create a couple of tables in your database and populate them with some sample data. If you are going to try it out I suggest you read the comments at the top of the file. Please provide me any thoughts, comments or corrections. The code is a little 'experimental' so any help is most welcome. Thanks, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Shave my poodle!" |
From: Kevin A. <al...@se...> - 2001-08-21 03:48:04
|
The .rsrc.py files are just dictionaries and only provide the descriptions of the application components, so they can't be run by themselves. The minimal.rsrc.py file that you included looks fine. If you renamed one file, you must rename the corresponding file as well. Eventually, we'll probably make this more flexible, but for now since you have: minimal.rsrc.py You must be using a corresponding file named 'minimal.py' or 'minimal.pyw' which is defined in your 'minimal.rsrc.py' here: { 'type':'Background', 'file':'minimal.py', 'classname':'Minimal', 'name':'bgMin', 'components': In addition, the classname should match the main class in your minimal.py file. This is the line: class Minimal(PythonCardPrototype.model.Background): If you look at the other samples, you'll see how these elements match up. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Ronald > D Stephens > Sent: Monday, August 20, 2001 8:36 PM > To: pyt...@li... > Subject: Re: [Pythoncard-users] IDLE and the PythonCardPrototype > > > If you use the above minimal.rsrc file, you will run my first > PythonCard program. However, when I rename the program and rename the > appropriate parts of teh rsrc file, it fails to run. Guess I'll > have to study the codse a littel more... > > By hte way, teh demos do run for me launched form IDLE, most of > the time, but I hgues stht's why I often get genral protecdtion > faults ;-)))0000 > > I must say, they do run now I see, at your suggestion, by just > double clicking on 'em in windows explorere.... > > well, well > |
From: Ronald D S. <rd...@ea...> - 2001-08-21 03:27:42
|
If you use the above minimal.rsrc file, you will run my first PythonCard program. However, when I rename the program and rename the appropriate parts of teh rsrc file, it fails to run. Guess I'll have to study the codse a littel more... By hte way, teh demos do run for me launched form IDLE, most of the time, but I hgues stht's why I often get genral protecdtion faults ;-)))0000 I must say, they do run now I see, at your suggestion, by just double clicking on 'em in windows explorere.... well, well |
From: Kevin A. <al...@se...> - 2001-08-21 02:50: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: 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 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 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): 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 ka --- Kevin Altis al...@se... |
From: Kevin A. <al...@se...> - 2001-08-21 02:43:55
|
I don't use IDLE myself, but if IDLE is like PythonWin, you should not launch a script from within IDLE. There will be contention issues between tkinter and wxPython. The only way you can run a GUI app from within an IDE is if the IDE launches the script as a completely separate process. I believe Boa and Komodo do this correctly. The safe way to run a script is to either run it from the command prompt or double-click on the script. You can edit in your favorite IDE, save, then switch to the command prompt or dir/file browser (Explorer in Windows) to run the script, then after you quit the app, go back to the editor and continue editing. This isn't an issue specific to PythonCard, but I thought it should be addressed. Someone that knows more than I about Python IDEs should chime in with more info. ka |
From: Ronald D S. <rd...@ea...> - 2001-08-21 02:30:34
|
well, believe it or not, yes after setting show shell to '1', I get the pycrust shell automatically when I run worldclock.py. And I fixed my clock for you. I guess i see your point about rsc files containing the 'detail" postionsing of widgets etc. For now, I'm willing to let my widgets go to default positions. I guess now I can edit minimal.py and "create" a Pythoncard gui application. Do I dare? Do you think someone who never reset his clock in three years should give up on gui programming? ----- Original Message ----- From: "Kevin Altis" <al...@se...> To: <pyt...@li...> Sent: Monday, August 20, 2001 9:45 PM Subject: RE: [Pythoncard-users] PythonCard, PyCrust, rsc files etc > > From: pyt...@li... > > [mailto:pyt...@li...]On Behalf Of Ronald > > D Stephens > > > > I have run the demos fine under IDLE. I have studied the source > > code a of minimal, and the dmoes and see how it sort of is put > > togther. > > > > 1. What is PyCrust, and how is it ot be used? > > PyCrust is a package of components that at its simplest provide an > interactive shell interpreter like you get with Boa, PythonWin, IDLE, etc. > But PyCrust isn't tied to one particular IDE environment, so it can be run > standalone (PyCrust\PyCrust.py) or it can be included in other applications > like PythonCard. When you use the "-s" command-line option or set the > 'showShell' option to 1 in your pythoncard.user.config.py file, such as mine > which is displayed below, then you'll get a shell when you start a > PythonCard application: > > > --- pythoncard.user.config.py file > { 'gui':'wxPython', > 'logfile':'pythoncard.log', > 'showMessageWatcher':0, > 'messageWatcherPosition':(900, 0), > 'messageWatcherSize':(200, 300), > 'messageWatcherVisible':1, > 'showPropertyEditor':0, > 'propertyEditorPosition':(750, 350), > 'propertyEditorSize':(360, 240), > 'propertyEditorVisible':1, > 'showShell':1, > 'shellPosition':(50, 600), > 'shellSize':(700, 230), > 'shellVisible':1, > 'defaultStackPosition':(5, 5), > 'enableLogging':0 > } > > So, you don't need to run PyCrust standalone, PythonCard provides it for > you. To create a pythoncard.user.config.py file, just copy the > pythoncard.config.py file and rename it, then set the options to your own > preferences. > > > 2. Could someone breifly describe the resource files function? > > The .rsrc.py files contain the descriptions of all the GUI components in > your application. This is done to keep your layout and code separate as much > as possible. You'll notice there is nothing in minimal.py describing the > field location, position and size of the window. There is a handler for the > file/exit menu item, but it doesn't describe the menu item label or even > what menu the menu item is in. Does that answer your question? > > ka > ps. Is your clock set roughly a day in the past? Your emails are stamped > about a day old, so either your clock is off or your ISP is having major > problems with delivering email. > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/pythoncard-users |
From: Kevin A. <al...@se...> - 2001-08-21 01:55:41
|
The resourceEditor now has an Edit menu that lets you Add widgets as well as Delete the currently selected widget. There is no Undo/Redo capability and probably won't be for a while. This is one reason you still can't save your results, it is just too dangerous right now. You don't have to open an existing .rsrc.py file in order to start creating widgets. Since I updated the StaticLine, StaticText, and Image events earlier today, you can now select those widget types. When you create a new widget a text entry dialog pops up with some default values that you can edit before creating the widget. I realize the text is both small and difficult to edit in the dialog, but this is only temporary and over the next few weeks will be cleaned up. Remember, to enable the Property Editor (-p on the command-line) in order to edit all widget properties. In order to select a disabled or invisible widget, you must first enable it and make it visible using the Property Editor window. Note that currently there is a bug in the way the Property Editor works so that it doesn't update its list of available widgets as new ones are added or deleted. I will try and fix this tomorrow. I want to get out a prototype-daily release tonight. All feedback is appreciated. ka |
From: Kevin A. <al...@se...> - 2001-08-21 01:45:03
|
> From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Ronald > D Stephens > > I have run the demos fine under IDLE. I have studied the source > code a of minimal, and the dmoes and see how it sort of is put > togther. > > 1. What is PyCrust, and how is it ot be used? PyCrust is a package of components that at its simplest provide an interactive shell interpreter like you get with Boa, PythonWin, IDLE, etc. But PyCrust isn't tied to one particular IDE environment, so it can be run standalone (PyCrust\PyCrust.py) or it can be included in other applications like PythonCard. When you use the "-s" command-line option or set the 'showShell' option to 1 in your pythoncard.user.config.py file, such as mine which is displayed below, then you'll get a shell when you start a PythonCard application: --- pythoncard.user.config.py file { 'gui':'wxPython', 'logfile':'pythoncard.log', 'showMessageWatcher':0, 'messageWatcherPosition':(900, 0), 'messageWatcherSize':(200, 300), 'messageWatcherVisible':1, 'showPropertyEditor':0, 'propertyEditorPosition':(750, 350), 'propertyEditorSize':(360, 240), 'propertyEditorVisible':1, 'showShell':1, 'shellPosition':(50, 600), 'shellSize':(700, 230), 'shellVisible':1, 'defaultStackPosition':(5, 5), 'enableLogging':0 } So, you don't need to run PyCrust standalone, PythonCard provides it for you. To create a pythoncard.user.config.py file, just copy the pythoncard.config.py file and rename it, then set the options to your own preferences. > 2. Could someone breifly describe the resource files function? The .rsrc.py files contain the descriptions of all the GUI components in your application. This is done to keep your layout and code separate as much as possible. You'll notice there is nothing in minimal.py describing the field location, position and size of the window. There is a handler for the file/exit menu item, but it doesn't describe the menu item label or even what menu the menu item is in. Does that answer your question? ka ps. Is your clock set roughly a day in the past? Your emails are stamped about a day old, so either your clock is off or your ISP is having major problems with delivering email. |
From: Ronald D S. <rd...@ea...> - 2001-08-21 01:24:25
|
For the mroe brain dead amongst us, and since i missed everythoing up unitl last week: I have run the demos fine under IDLE. I have studied the source code a of minimal, and the dmoes and see how it sort of is put togther. 1. What is PyCrust, and how is it ot be used? 2. Could someone breifly describe the resource files function? |
From: Kevin A. <al...@se...> - 2001-08-20 22:46:41
|
I've enabled basic mouse events for StaticText, StaticLine and Image. You can move and resize these widgets with the resourceEditor now. You can also write handlers for the widgets, just like any other widget. They do not receive the mouseClick. The events they receive are: mouseDown mouseUp mouseDoubleClick mouseMiddleDown mouseMiddleUp mouseMiddleDoubleClick mouseContextDown mouseContextUp mouseContextDoubleClick mouseLeave mouseEnter mouseMove mouseDrag They currently have gainFocus and loseFocus defined, but it doesn't seem to work, nor do I think it is supposed to. If it causes problems the way things are currently defined in the bindings, I'll go in and fix it. You can always check spec.py if you want to see the attributes and events for a given widget. On another note, I've also added getPosition, setPosition, getSize, and setSize methods to Background for adjusting the window position and size (width, height). ka |