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: Andy T. <an...@ha...> - 2006-01-19 11:04:30
|
Martinez, Miguel (Amermex) wrote: > Martinez, Miguel (Amermex) wrote: >> I'm trying to show a db cursor in a wxgrid and I don't know how, I > tried >> to set a cursor.fetchall() and I get this error. >> >> >> >> SetTable >> >> return _grid.Grid_SetTable(*args, **kwargs) >> >> TypeError: argument number 2: a 'wxGridTableBase *' is expected, >> 'list([('column one, row one', 'column two, row one'), ('column one, > row >> two', 'column two, row two')] >> >> )' is received. >> >> >> >> How can I show a list, tuple, cursor or resultset in a grid? >> > > First, it's more useful if you post a small sample of your code that > triggers the error message, that way people on this list can be a little > > more helpful and responsive. > > Secondly, if you want to display the contents of a database table in a > grid look at the dbBrowser2 sample application (in the samples/dbBrowser > > folder of your PythonCard installation). This does pretty much what you > have described. > > Regards, > Andy I know that this is late even by my lax standards, but I've been testing dbBrowser prior to the next release of PythonCard and thought I'd revisit this issue. In essence, there are two ways to populate a grid, you can loop through your rows and columns populating them as you go - as you've done in your sample code above - or you can pass a sequence of sequences to an object of type wxGridTableBase (or one that inherits from it) and assign that to your grid. The second option is generally a lot faster than the first and doesn't require much more code. So I've attached a sample PythonCard application that connects to a database (in this case MySQL but it will work just as well with Oracle as per your example). When you run it just type the name of one of your database tables into the field and then press the button labelled 'Get Rows'. It will then fetch the data from your database table, build a GridBaseTable from it and display it in the grid in the bottom part of the window. Hopefully this will be simpler to follow than the rather abstract code in dbBrowser2 for anyone wanting to use wx grids in their PythonCard application. The application class is quite simple and handles connecting to the database and then dropping and recreating the grid component when the button is pressed. The DBTable class is the one that deals with extracting the data from the database and then using it to populate a GridTableBase which is then attached to the grid. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Kevin A. <al...@se...> - 2006-01-13 23:33:21
|
On Dec 16, 2005, at 3:32 AM, Alex Tweedly wrote: > MWP...@cs... wrote: The program I am writing has a screen capture=20= > feature and I need to know how to minimize the app when this is chosen=20= > and restore the screen when the capture has been completed....I have=20= > tried to search through the mailing lists to see if this question has=20= > been asked but Im drawing a blank....any help would be greatly=20 > appreciated.You can call > =A0=A0 self.Iconize()=A0 > > e.g. > =A0=A0 def on_initialize(self, event): > =A0=A0=A0=A0=A0=A0 self.Iconize() > > and to restore afterwards do > =A0=A0=A0=A0=A0=A0=A0 self.Iconize(False) > > and you can check the current status by > =A0=A0=A0=A0=A0=A0=A0=A0 self.IsIconized() > > Further options are documented in the wxWidgets docs under=20 > "wxTopLevelWindow" > > --=20 > Alex Tweedly http://www.tweedly.net I've added new background properties 'minimized' and 'maximized' for=20 release 0.8.2, so Alex's code examples above become: def on_initialize(self, event): self.minimized =3D True self.minimized =3D False to check the state, just check the property self.minimized, this is=20 identical to how the visible property works for backgrounds. Remember=20 that there are also minimize, maximize, and restore events for the=20 background so you can respond to the user changing the window if=20 needed. The change was simple, so you can add the following lines below=20= the visible property line in model.py if you would like: maximized =3D property(wx.Frame.IsMaximized, wx.Frame.Maximize,=20 doc=3D"whether the background window is maximized") minimized =3D property(wx.Frame.IsIconized, wx.Frame.Iconize,=20 doc=3D"whether the background window is minimized") ka |
From: Brad A. <bra...@ma...> - 2006-01-05 22:19:32
|
Bernie Hogan wrote: >I am trying to use a notebook in pythoncard and looking for resources for >building the notebook pages. I found a reference online to employing >model.pageBackground instead of model.Background when initializing pages, >but that is as far as I got. Are there any code examples lying around for >employing pages using the pythoncard, rather than wxPython style of dealing >with notebook pages? I've been using notebook pages in my app for about seven months, and they seem to work well. They look "platform-native" like other wx widgets. I think I originally learned how to use notebook pages from the examples in PythonCard/samples/testNotebook. I think I got some help from the mailing list as well, so you might check the archives. If the examples in testNotebook aren't helpful, let me know and I'll send you some excerpts my from app's source code. |
From: Kevin A. <al...@se...> - 2006-01-05 19:20:02
|
On Jan 5, 2006, at 10:46 AM, Bernie Hogan wrote: > Hi Everyone, > > I am trying to use a notebook in pythoncard and looking for resources > for > building the notebook pages. I found a reference online to employing > model.pageBackground instead of model.Background when initializing > pages, > but that is as far as I got. Are there any code examples lying around > for > employing pages using the pythoncard, rather than wxPython style of > dealing > with notebook pages? > > And I have to say right up, that I appreciate this list - its been > great for > me so far. > > Take Care, > BERNiE The testNotebook sample didn't make it into release 0.8.1, but the zip file for the sample can be downloaded at: http://prdownloads.sourceforge.net/pythoncard/testNotebook.zip?download ka |
From: Bernie H. <ber...@ut...> - 2006-01-05 18:46:51
|
Hi Everyone, I am trying to use a notebook in pythoncard and looking for resources for building the notebook pages. I found a reference online to employing model.pageBackground instead of model.Background when initializing pages, but that is as far as I got. Are there any code examples lying around for employing pages using the pythoncard, rather than wxPython style of dealing with notebook pages? And I have to say right up, that I appreciate this list - its been great for me so far. Take Care, BERNiE -- |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2006-01-01 22:50:57
|
On 30/12/05 12:34, Thomas Heller wrote: > I have a 800MHz P3 box with 512 MB with XP SP2 for testing. > > Times are for py2exe created applications. > An application with a custom GUI based on ctypes takes far less than a > second to show the window. A wxPython app takes about 3 seconds. > If this is too slow for you, or your system is slower, see below. My hardware might be on the slow side. After rebooting, my P3 takes about 12 seconds to get the wxPython demo splashscreen and about 15 seconds to start up my PythonCard application from the .py file. My McMillan'd executable of the same app takes 10 seconds. A 2.8Ghz Celeron laptop with 4200rpm drive and (apparently) crappy motherboard architecture gives me approximately the same results. This is all testing after a reboot each time - if I repeat the run without reboot then disk caching, etc. must kick in because the times drop to 2-3 seconds. OK, I admit it, I'm impatient :-) Unfortunately I'm also dealing with users who, if there's no on-screen feedback, will start double-clicking again and, hey presto, before you know it there are four copies of the application started. > For a C programmer it should not be a problem to extend the py2exe > sources to include a dialog resource, then call CreateDialog somewhere > to create the spash screen. The C code could DestroyWindow the dialog > just before starting the Python main script, or you could even expose > a DestroySplashscreen function to Python which would then destroy the > dialog after the GUI is initialized. Ooo...sounds interesting. Thank you - I'll take a look. -- XXXXXXXXXXX |
From: Thomas H. <th...@py...> - 2005-12-30 12:35:13
|
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX writes: > On 30/12/05 01:22, Alex Tweedly wrote: >> I don't know if this is a solution or not .... but I've always >> noticed that the wxPython demo gets the splashscreen up there pretty >> quickly, and then the real window follows a while later. > <snip> > > I'd forgotten about the demo...wxPython (and wx in general) is still a > bit of a blind spot for me. But the splashscreen part looks pretty > straightforward. > >> That may or may not help - depends how much time is just getting the >> base interpreter up and going. > > Quite a large proportion of the loading by the look of it. The demo > splashscreen takes an age to appear on my cold-booted NT box (Pentium > 3 700MHz, 640MB RAM, 5400rpm ATA/100 drive...not an unusual spec. for > where I have to distribute my application). I have a 800MHz P3 box with 512 MB with XP SP2 for testing. Times are for py2exe created applications. An application with a custom GUI based on ctypes takes far less than a second to show the window. A wxPython app takes about 3 seconds. If this is too slow for you, or your system is slower, see below. >> If that doesn't help, you might consider a lightweight "main" >> program (not in Python) which simply displays the splashscreen and >> then runs the real app ... there are certainly shareware apps that >> do this, and a thorough search may well find a freeware one (for >> Windows - probably also for Mac or Linux but I don't know) >> See http://www.intrepidmouse.com/products/ssm/index.asp for a >> shareware example. > > I'm an old school C programmer and had considered creating a "stub" > that launches a py2exe/McMillan installer-created Python > executable. It was a bit of a last resort though ;-) For a C programmer it should not be a problem to extend the py2exe sources to include a dialog resource, then call CreateDialog somewhere to create the spash screen. The C code could DestroyWindow the dialog just before starting the Python main script, or you could even expose a DestroySplashscreen function to Python which would then destroy the dialog after the GUI is initialized. Thomas |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-30 09:43:52
|
On 30/12/05 05:49, Kevin Altis wrote: > I would go ahead and ask on wxPython-users as I suspect this is > something one of the other developers has dealt with in the past. You > could add some calls to time various spots in the startup process, but > disk caching, first time compilation of to .pyc files, etc. will mean > you'll get different results each time. ...and just to confuse things a bit more, I presume that when I use McMillan to create an executable, then any work I've done delaying imports until they're actually needed (rather than sticking everything at the start) is probably negated to some degree as the whole application becomes one executable and a lot of DLLs. Mind you, it seems to be the interpreter that's taking the time to load, so... > In the end my guess is that you might have to do something that will > make your code less portable such as using ctypes or win32 to load > something small right at the beginning of your program to display an > image or message on screen and then wait for the rest of the app to load. I like ctypes (I don't have to throw away all the old C DLLs I've created over the years :-)) but that will also require the Python interpreter to be up-and-running. So it's looking more and more like I'll need to roll my own C "stub" to create the splashscreen and somehow disappear once the Python interpreter is loaded. Yikes. Thanks for the suggestions....I need to do some more research! -- XXXXXXXXXXX |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-30 09:30:45
|
On 30/12/05 01:22, Alex Tweedly wrote: > I don't know if this is a solution or not .... but I've always noticed > that the wxPython demo gets the splashscreen up there pretty quickly, > and then the real window follows a while later. <snip> I'd forgotten about the demo...wxPython (and wx in general) is still a bit of a blind spot for me. But the splashscreen part looks pretty straightforward. > That may or may not help - depends how much time is just getting the > base interpreter up and going. Quite a large proportion of the loading by the look of it. The demo splashscreen takes an age to appear on my cold-booted NT box (Pentium 3 700MHz, 640MB RAM, 5400rpm ATA/100 drive...not an unusual spec. for where I have to distribute my application). > If that doesn't help, you might consider a lightweight "main" program > (not in Python) which simply displays the splashscreen and then runs the > real app ... there are certainly shareware apps that do this, and a > thorough search may well find a freeware one (for Windows - probably > also for Mac or Linux but I don't know) > > See http://www.intrepidmouse.com/products/ssm/index.asp for a shareware > example. I'm an old school C programmer and had considered creating a "stub" that launches a py2exe/McMillan installer-created Python executable. It was a bit of a last resort though ;-) Thanks for the pointers -- XXXXXXXXXXX |
From: Kevin A. <al...@se...> - 2005-12-30 05:49:31
|
On Dec 29, 2005, at 4:03 PM, XXXXXXXXXXX wrote: > Hmmm...a chicken-and-egg problem...and a bit OT. > > Some of my PythonCard apps run on fairly old hardware, with the result > that the Python interpreter/runtime takes a while to start up with > nothing apparently happening as far as the user is concerned. A > loading splash screen would be good, but if this was summoned from > Python/PythonCard/wxPython then it would happen too late. > > Has anybody done any brainstorming on this and come up with a > solution, or is anyone aware of one? I remember hearing on a podcast > recently that a future version of Java will load some basic > functionality ahead of the JVM to allow splash screens to be drawn > early on, when an application is run that requires the JVM to be > loaded. I don't think Python allows anything like this, though I'd > love to be proved wrong. > > -- > XXXXXXXXXXX I would go ahead and ask on wxPython-users as I suspect this is something one of the other developers has dealt with in the past. You could add some calls to time various spots in the startup process, but disk caching, first time compilation of to .pyc files, etc. will mean you'll get different results each time. In the end my guess is that you might have to do something that will make your code less portable such as using ctypes or win32 to load something small right at the beginning of your program to display an image or message on screen and then wait for the rest of the app to load. ka |
From: Alex T. <al...@tw...> - 2005-12-30 01:21:33
|
XXXXXXXXXXX wrote: > Hmmm...a chicken-and-egg problem...and a bit OT. > > Some of my PythonCard apps run on fairly old hardware, with the result > that the Python interpreter/runtime takes a while to start up with > nothing apparently happening as far as the user is concerned. A > loading splash screen would be good, but if this was summoned from > Python/PythonCard/wxPython then it would happen too late. > > Has anybody done any brainstorming on this and come up with a > solution, or is anyone aware of one? I remember hearing on a podcast > recently that a future version of Java will load some basic > functionality ahead of the JVM to allow splash screens to be drawn > early on, when an application is run that requires the JVM to be > loaded. I don't think Python allows anything like this, though I'd > love to be proved wrong. > I don't know if this is a solution or not .... but I've always noticed that the wxPython demo gets the splashscreen up there pretty quickly, and then the real window follows a while later. But that may be just because it deliberately holds the splashscreen up on screen for two seconds, rather than because it is going through the rest of its initialization. In any case, it may be worth your while trying what it does ..... 1. the demo.pyw is very small - all it does is "import Main" then call Main.main() This means that there is a "compiled" version of the majority of the program (Main.pyc) which may save some time. 2. The app is very small (load and display a bitmap, and schedule a call to the real app for two seconds later). So (with suitable arrangement of the code), you can delay most of your app's initialization to after the splash screen is visible. That may or may not help - depends how much time is just getting the base interpreter up and going. If that doesn't help, you might consider a lightweight "main" program (not in Python) which simply displays the splashscreen and then runs the real app ... there are certainly shareware apps that do this, and a thorough search may well find a freeware one (for Windows - probably also for Mac or Linux but I don't know) See http://www.intrepidmouse.com/products/ssm/index.asp for a shareware example. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.9/216 - Release Date: 29/12/2005 |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-30 00:04:13
|
Hmmm...a chicken-and-egg problem...and a bit OT. Some of my PythonCard apps run on fairly old hardware, with the result that the Python interpreter/runtime takes a while to start up with nothing apparently happening as far as the user is concerned. A loading splash screen would be good, but if this was summoned from Python/PythonCard/wxPython then it would happen too late. Has anybody done any brainstorming on this and come up with a solution, or is anyone aware of one? I remember hearing on a podcast recently that a future version of Java will load some basic functionality ahead of the JVM to allow splash screens to be drawn early on, when an application is run that requires the JVM to be loaded. I don't think Python allows anything like this, though I'd love to be proved wrong. -- XXXXXXXXXXX |
From: Alex T. <al...@tw...> - 2005-12-29 02:53:41
|
I found there were some problems with the tabcodeEditor when using wxPython 2.6 Changing between pages of the notebook was ok with wxPython 2.5, but with wxPython 2.6 the focus would remain on the notebook 'tab' rather than within the document. The effect was that when you changed page, you had to click within the page before you could then type, and the arrow keys would move you between tabs rather than within the page. I've added some "SetFocus" calls so that focus is within the document, as we want it to be, either when changing page or when creating a new page. (These have no effect when used with wxPython 2.5) If anyone finds other circumstances where focus isn't set properly, please let me know. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 27/12/2005 |
From: <gre...@gm...> - 2005-12-27 21:10:58
|
Just wanted to throw in some encouragement ;-) It's an excellent product! -Greg > And as always, thanks to the users for feedback > and encouragement. I really appreciate the contributions everyone > continues to make. > > Happy holidays, > > ka > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Brad A. <bra...@ma...> - 2005-12-27 20:07:40
|
At 2:04 PM +0000 12/27/05, Neil Hughes wrote: >...and a big pat on the back to you all. I've been so busy this year >(often using PythonCard for work-related projects) that I haven't >given the feedback and help that I wanted to. I WILL try harder next >year. What he said. |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-27 14:05:11
|
On 27/12/05 04:20, Kevin Altis wrote: > The last few days I've been updating the documentation at > > http://pythoncard.sourceforge.net/documentation.html > > including versions of documents that had been updated in cvs, but not > uploaded to the main site. I'm doing this as part of the release 0.8.2 > process; I expect to get 0.8.2 out sometime in January (ya really), so > I would appreciate feedback on any errors or aspects of the docs that > still seem out-of-date for the current release. Do you want the feedback posted to this mailing list, or sent privately? While I'm here...Dan's "Getting Started in PythonCard" page (http://pythoncard.sourceforge.net/walkthrough1.html $Revision: 1.19 $ : $Author: kasplat $ : Last updated $Date: 2005/12/25 12:33:32 $) needs to be updated before somebody reads it and thinks that Macs aren't supported (see "Some Basic Preparation" section, first paragraph). > While doing the edits I couldn't help but notice how a project of this > scope simply wouldn't be possible without the contributions of a large > number of people. ...and a big pat on the back to you all. I've been so busy this year (often using PythonCard for work-related projects) that I haven't given the feedback and help that I wanted to. I WILL try harder next year. -- XXXXXXXXXXX |
From: Kevin A. <al...@se...> - 2005-12-27 04:20:27
|
The last few days I've been updating the documentation at http://pythoncard.sourceforge.net/documentation.html including versions of documents that had been updated in cvs, but not uploaded to the main site. I'm doing this as part of the release 0.8.2 process; I expect to get 0.8.2 out sometime in January (ya really), so I would appreciate feedback on any errors or aspects of the docs that still seem out-of-date for the current release. Thanks to everyone that has already provided corrections. When supplying feedback, please reference the version number of the document. You can find this information at the bottom of each page like the one included below: $Revision: 1.24 $ : $Author: kasplat $ : Last updated $Date: 2005/12/27 03:51:32 $ While doing the edits I couldn't help but notice how a project of this scope simply wouldn't be possible without the contributions of a large number of people. We've tried to recognize the contributions of everyone in the license file, the latest version is at: http://cvs.sourceforge.net/viewcvs.py/pythoncard/PythonCard/ LICENSE.txt?view=markup In particular I would like to recognize Alex Tweedly for all his contributions this year from major enhancements to the codeEditor, resourceEditor, documentation updates, framework fixes, answering questions on this mailing list and covering for me at Python UK last April. Thanks also to Andy Todd and the other developers for holding down the fort in 2005. And as always, thanks to the users for feedback and encouragement. I really appreciate the contributions everyone continues to make. Happy holidays, ka |
From: Kevin A. <al...@se...> - 2005-12-23 00:08:24
|
On Dec 22, 2005, at 11:48 AM, bra...@om... wrote: > > Any PythonCard folks coming to PyCon 2006? It's coming up at the end > of February. > I think there is room to schedule sprints; I wouldn't mind helping out > at a PythonCard > sprint if any of the PythonCard developers are here. My familiarity > with the PythonCard > source code is still pretty weak and I don't know wx very well, but > that would be a good > opportunity to learn and possibly assist. > > Whether or not we have a PythonCard sprint, we could still have a > PythonCard users > get-together of some kind; maybe a dinner. Since I'm a Dallas local, I > have a car and > can provide transport. > > Also, PyCon 2006 will have a tutorial day on Thursday before the main > convention starts. > Of particular interest to PythonCard users is the morning tutorial > about wx by Steve Holden. > > <http://wiki.python.org/moin/PyCon2006/Tutorials> > > Most of the tutorials are expected to fill up by the end of early bird > registration on Dec 31, > so if you want to attend tutorials now would be a good time to sign up. I'm not currently signed up for Pycon, but I might go. If you are planning to attend, go and reply to Brad's thread here. http://wiki.python.org/moin/PyCon2006/Talks In addition to Steve's wxPython tutorial, Ed Leafe will be giving a talk on "The State of Dabo". Like other Pycons there is a large selection of other talks you may find of interest and you won't find a larger concentration of Python folks at any other conference. ka |
From: <bra...@om...> - 2005-12-22 19:51:14
|
Any PythonCard folks coming to PyCon 2006? It's coming up at the end of February. I think there is room to schedule sprints; I wouldn't mind helping out at a PythonCard sprint if any of the PythonCard developers are here. My familiarity with the PythonCard source code is still pretty weak and I don't know wx very well, but that would be a good opportunity to learn and possibly assist. Whether or not we have a PythonCard sprint, we could still have a PythonCard users get-together of some kind; maybe a dinner. Since I'm a Dallas local, I have a car and can provide transport. Also, PyCon 2006 will have a tutorial day on Thursday before the main convention starts. Of particular interest to PythonCard users is the morning tutorial about wx by Steve Holden. <http://wiki.python.org/moin/PyCon2006/Tutorials> Most of the tutorials are expected to fill up by the end of early bird registration on Dec 31, so if you want to attend tutorials now would be a good time to sign up. |
From: Alex T. <al...@tw...> - 2005-12-22 12:39:47
|
Andy Todd wrote: > > > On my Mac with the documentation displayed in Safari copying and > pasting into both Vim and Aquamacs appears to be fine. > > Having said that I've got no objections to changing the code samples > to use <pre> blocks instead of the "code" class. > > Any volunteers? > If someone (e.g. you or Kevin) who can verify the results does the first one and commits it into CVS, I'll be happy to go through and do all the others (may take me a few days - still have to do my Xmas shopping :-) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.3/209 - Release Date: 21/12/2005 |
From: Andy T. <an...@ha...> - 2005-12-22 10:36:36
|
Kevin Altis wrote: > On Dec 19, 2005, at 5:14 PM, Alex Tweedly wrote: > >> Kevin Altis wrote: >> >>> I'm sending this message to the general list rather than the >>> pythoncard-devel list in hopes that some HTML/CSS expert will have a >>> suggestion for how we can clean up our Python example code in the >>> documentation so it can be copied and pasted. >>> >>> ka >>> >>> --- >>> >>> It was pointed out to me by Don Taylor that source examples in the >>> docs can't be copied and pasted and run correctly. He specifically >>> mentioned this code block in walkthrough2.html which you can see here: >>> >>> http://pythoncard.sourceforge.net/walkthrough2.html >>> >>> <p class="code"> def >>> on_incrBtn_mouseClick(self, event):<br /> >>> startValue = >>> int(self.components.field1.text)<br /> >>> endValue = startValue >>> + 1<br /> >>> >>> self.components.field1.text >>> = str(endValue)</p> >>> >>> The code looks fine displayed in the browser, but if someone tries to >>> copy, paste, and then run it then the messes it up. Since >>> this isn't an old-style <pre></pre> block you can't simply use >>> spaces in the code to get the desired effect. The CSS we have >>> defined for the style is: >>> >> The shouldn't mess it up - the browser should copy that as spaces. >> And indeed that's what it does for me : >> >> WinXP >> copy from : Firefox 1.0.4 and IE 6.0 >> paste into : Emacs, Notepad and tabcodeEditor >> >> >> >> -- >> Alex Tweedly http://www.tweedly.net >> > > Hmm, pasting the second line of the code into the tabCodeEditor and > turning on show invisibles I could see that all was not well. > Investigating in the shell I got: > > >>> self.currentDocument.text > ' \xca\xca\xca\xca\xca\xca\xca\xcastartValue = > int(self.components.field1.text)\n' > >>> s = self.currentDocument.text > >>> s[0] > ' ' > >>> ord(s[0]) > 32 > >>> ord(s[1]) > 202 > > So there is a space at the beginning, followed by the eight non-breaking > spaces. The copy/paste was done from Safari to the tabCodeEditor, so > platform differences could be at fault here. Anyway, I did try just > junking the <p class="code"> and non-breaking spaces and just using a > <pre> block and that seemed to look fine and gave me exactly what I > expected (i.e. just spaces). As long as <pre> is still valid I lean > toward just falling back to that. Harold Marshall sent me a message that > makes me think <pre> is still okay. > > Howard said: > Two good howto's are: "CSS Tip: Adding Whitespace To Text" ( > http://www.netmechanic.com/news/vol6/css_no9.htm )and "Making > preformated <pre> text wrap in CSS3, Mozilla, Opera and IE" ( > http://myy.helia.fi/~karte/pre-wrap-css3-mozilla-opera-ie.html ) which > also addresses "code snippets". > > In our case we shouldn't be concerned about wrapping, adding color to > the text, etc. > > BTW, have I mentioned lately how much I still love having a Python shell > available in my Python editor with access to the guts of the > application! ;-) > > ka > On my Mac with the documentation displayed in Safari copying and pasting into both Vim and Aquamacs appears to be fine. Having said that I've got no objections to changing the code samples to use <pre> blocks instead of the "code" class. Any volunteers? Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Kevin A. <al...@se...> - 2005-12-20 06:55:54
|
On Dec 19, 2005, at 5:14 PM, Alex Tweedly wrote: > Kevin Altis wrote: > >> I'm sending this message to the general list rather than the >> pythoncard-devel list in hopes that some HTML/CSS expert will have a >> suggestion for how we can clean up our Python example code in the >> documentation so it can be copied and pasted. >> >> ka >> >> --- >> >> It was pointed out to me by Don Taylor that source examples in the >> docs can't be copied and pasted and run correctly. He specifically >> mentioned this code block in walkthrough2.html which you can see >> here: >> >> http://pythoncard.sourceforge.net/walkthrough2.html >> >> <p class="code"> def >> on_incrBtn_mouseClick(self, event):<br /> >> startValue = >> int(self.components.field1.text)<br /> >> endValue = startValue >> + 1<br /> >> >> self.components.field1.text >> = str(endValue)</p> >> >> The code looks fine displayed in the browser, but if someone tries to >> copy, paste, and then run it then the messes it up. Since >> this isn't an old-style <pre></pre> block you can't simply use >> spaces in the code to get the desired effect. The CSS we have >> defined for the style is: >> > The shouldn't mess it up - the browser should copy that as > spaces. > And indeed that's what it does for me : > > WinXP > copy from : Firefox 1.0.4 and IE 6.0 > paste into : Emacs, Notepad and tabcodeEditor > > > > -- > Alex Tweedly http://www.tweedly.net > Hmm, pasting the second line of the code into the tabCodeEditor and turning on show invisibles I could see that all was not well. Investigating in the shell I got: >>> self.currentDocument.text ' \xca\xca\xca\xca\xca\xca\xca\xcastartValue = int(self.components.field1.text)\n' >>> s = self.currentDocument.text >>> s[0] ' ' >>> ord(s[0]) 32 >>> ord(s[1]) 202 So there is a space at the beginning, followed by the eight non-breaking spaces. The copy/paste was done from Safari to the tabCodeEditor, so platform differences could be at fault here. Anyway, I did try just junking the <p class="code"> and non-breaking spaces and just using a <pre> block and that seemed to look fine and gave me exactly what I expected (i.e. just spaces). As long as <pre> is still valid I lean toward just falling back to that. Harold Marshall sent me a message that makes me think <pre> is still okay. Howard said: Two good howto's are: "CSS Tip: Adding Whitespace To Text" ( http://www.netmechanic.com/news/vol6/css_no9.htm )and "Making preformated <pre> text wrap in CSS3, Mozilla, Opera and IE" ( http://myy.helia.fi/~karte/pre-wrap-css3-mozilla-opera-ie.html ) which also addresses "code snippets". In our case we shouldn't be concerned about wrapping, adding color to the text, etc. BTW, have I mentioned lately how much I still love having a Python shell available in my Python editor with access to the guts of the application! ;-) ka |
From: Alex T. <al...@tw...> - 2005-12-20 01:14:31
|
Kevin Altis wrote: > I'm sending this message to the general list rather than the > pythoncard-devel list in hopes that some HTML/CSS expert will have a > suggestion for how we can clean up our Python example code in the > documentation so it can be copied and pasted. > > ka > > --- > > It was pointed out to me by Don Taylor that source examples in the > docs can't be copied and pasted and run correctly. He specifically > mentioned this code block in walkthrough2.html which you can see here: > > http://pythoncard.sourceforge.net/walkthrough2.html > > <p class="code"> def > on_incrBtn_mouseClick(self, event):<br /> > startValue = > int(self.components.field1.text)<br /> > endValue = startValue > + 1<br /> > > self.components.field1.text > = str(endValue)</p> > > The code looks fine displayed in the browser, but if someone tries to > copy, paste, and then run it then the messes it up. Since this > isn't an old-style <pre></pre> block you can't simply use spaces in > the code to get the desired effect. The CSS we have defined for the > style is: > The shouldn't mess it up - the browser should copy that as spaces. And indeed that's what it does for me : WinXP copy from : Firefox 1.0.4 and IE 6.0 paste into : Emacs, Notepad and tabcodeEditor -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.1/206 - Release Date: 16/12/2005 |
From: Kevin A. <al...@se...> - 2005-12-19 23:49:05
|
I'm sending this message to the general list rather than the pythoncard-devel list in hopes that some HTML/CSS expert will have a suggestion for how we can clean up our Python example code in the documentation so it can be copied and pasted. ka --- It was pointed out to me by Don Taylor that source examples in the docs can't be copied and pasted and run correctly. He specifically mentioned this code block in walkthrough2.html which you can see here: http://pythoncard.sourceforge.net/walkthrough2.html <p class="code"> def on_incrBtn_mouseClick(self, event):<br /> startValue = int(self.components.field1.text)<br /> endValue = startValue + 1<br /> self.components.field1.text = str(endValue)</p> The code looks fine displayed in the browser, but if someone tries to copy, paste, and then run it then the messes it up. Since this isn't an old-style <pre></pre> block you can't simply use spaces in the code to get the desired effect. The CSS we have defined for the style is: code, tt { font-family: Courier, monospace } A friend of mine suggested that you might simply change the CSS to: code, tt { text-indent: -1em; font-family: Courier, monospace } and then remove all the and wrap all the code in: <div style='padding:10px'> He said, "you are essentially negative indenting the first line but you have to move all of it over far enough so that it doesn't go off the page." I no longer have any HTML chops, but this seems like a hack. Surely there is a cleaner and simpler way we can adopt that other web sites, wikis, whatever are using for Python code so that it will look right and people will be able to copy and paste it? ka |
From: Kevin A. <al...@se...> - 2005-12-19 18:31:52
|
On Dec 16, 2005, at 8:03 PM, Don Taylor wrote: > Is there a list somewhere of which events can be handled by the > Background? Or, which code should I look at to fiigure this out? > > Thanks, > > Don. > There isn't a specific list of background events that is up-to-date so I'll list them here until the docs are fixed: Events for the background (defined in model.py): activate deactivate initialize idle close maximize minimize restore move size The easiest way to see these in action is to run a sample with the Message Watcher window open. Note that since "idle" in wxPython simply means that there are no more events in the event queue the 'idle' event is not actually displayed in the message watcher window as it can cause some problems during program exit and other places where events are still firing but window handles no longer exist, which can cause a crash. In addition, due to the way events fire when a window is first created, you won't see some of the other initial events. You might want to run the testevents sample to see some of these or check differences between platforms in event firing. It is also possible to have a generic "background" handler for multiple components rather than a specific one for each component. This is used in several places within the samples and tools of PythonCard, but the tictactoe sample has a handler specifically to show this off with a generic def on_mouseUp(self, event): as well as a def on_btn0_mouseUp(self, event): All, components that generate mouseUp events but don't have their own handlers such as the btn0 one above end up using the on_mouseUp handler. There is code in the on_mouseUp handler to make sure that it only deals with buttons it was intended for like so: def on_mouseUp(self, event): # make sure that we only handle a mouseClick for # the ImageButtons on the playfield if self.isPlayfieldButton(event.target): ... else: event.skip() When PythonCard loads a background it auto-binds events. The way this works is that it searches for an event handler in your code of the form on_componentName_eventName and if it finds one then it binds that event handler to your component, then it searches for one of the form on_eventName and binds that handler. If no handler exists, then the native event is simply passed up the event chain and handled by wxPython normally. ka |