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: Rohit <ro...@gm...> - 2005-07-16 11:00:54
|
Hi, I have started using Pythoncard recently, so this may seem trivial. I was going through the samples which come with it and I found the "gravity" sample, which animates a number of balls. I also tried to do something similar to that, but just only for one ball with one color. For this I used one button to start the animation, another button to stop it and a canvas to draw the whole sequence. In the animation sequence the program keeps on checking whether a flag variable has been altered to stop the animation or not. This flag variable was supposed to be altered by the stop animation button, when a mouse click occured. But when I click the stop button the animation keeps on running. I am including the code of my program. [code] import time,random from PythonCard import model class MyBackground(model.Background): def on_initialize(self, event): self.stopAnimation=3DFalse pass def on_startBtn_mouseClick(self,event): event.target.enabled=3DFalse self.stopAnimation=3DFalse xco=3D50. yco=3D0. =20 xspeed=3Drandom.random()*60-30 yspeed=3Drandom.random()*60-30 leftedge=3D0 rightedge,bottomedge=3Dself.components.canvas.size topedge=3D0 gravity=3D2 drag=3D0.98 bounce=3D0.5 radius=3D10 self.components.canvas.fillColor=3D'red' prev=3D() while(not self.stopAnimation): =20 self.components.canvas.drawCircle((xco,yco),radius) time.sleep(0.02) self.components.canvas.clear(); self.components.canvas.refresh(); =20 xco=3Dxco+xspeed if(xco+radius>rightedge): xco=3Drightedge-radius xspeed=3D-xspeed*bounce if(xco-radius<leftedge): xco=3Dleftedge+radius xspeed=3D-xspeed*bounce yco=3Dyco+yspeed if(yco+radius>bottomedge): yco=3Dbottomedge-radius yspeed=3D-yspeed*bounce if(yco-radius<topedge): yco=3Dtopedge+radius yspeed=3Dyspeed*bounce if((int(xco),int(yco))=3D=3Dprev): break =20 yspeed=3Dyspeed*drag+gravity xspeed=3Dxspeed*drag prev=3D(int(xco),int(yco)) =20 def on_stopBtn_mouseClick(self,event): self.stopAnimation=3DTrue self.components.startBtn.enabled=3DTrue =20 =20 if __name__ =3D=3D '__main__': app =3D model.Application(MyBackground) app.MainLoop() [/code] Thanks for any help. Rohit |
From: Alex T. <al...@tw...> - 2005-07-15 22:20:42
|
kim...@ya... wrote: >Hi list, > >Took some headscratching to figure out that I can get >at the date string of a calendar object from: > > dateObj = self.components.caCalendar.date > >where caCalendar is a PythonCard calendar object. > >Does anybody know of an easy way to convert the date >object that comes back to a standard string like: > > Thursday, July 15 2005 > > > I had some code that used Pythoncard calendar objects, but it's been a while since I looked at it. What I did then was > result = calDialog.calDialog(self, date) > if result.accepted: > date = result.date > self.components.DateYear.value = date.GetYear() > self.components.DateMonth.value = date.GetMonth() + 1 > self.components.DateDay.value = date.GetDay() > else: > s = "No date entered" I think (but haven't tried it out) that it's a wxDateTime, so any of the functions listed in the wx Docs could be used - so you could do s = date.FormatDate() to get the "standard representation", or s= date.Format(formatstring) where formatstring takes the same values as stdlib's strftime() (See also Python datetime documentation which covers strftime options) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005 |
From: <kim...@ya...> - 2005-07-15 19:25:51
|
Hi list, Took some headscratching to figure out that I can get at the date string of a calendar object from: dateObj = self.components.caCalendar.date where caCalendar is a PythonCard calendar object. Does anybody know of an easy way to convert the date object that comes back to a standard string like: Thursday, July 15 2005 Thanks, -- John Henry |
From: Schollnick, B. <Ben...@xe...> - 2005-07-14 17:27:10
|
I'm such a fool today... Thanks... Silly Programmer Error, I guess... (D'oh) - Ben > -----Original Message----- > From: Alex Tweedly [mailto:al...@tw...]=20 > Sent: Thursday, July 14, 2005 1:17 PM > To: Schollnick, Benjamin > Cc: pyt...@li... > Subject: Re: [Pythoncard-users] Programatically adding Choice field... >=20 >=20 > Schollnick, Benjamin wrote: >=20 > >Folks, > > > >I'm working on a custom dialog, that I need to revise=20 > depending on the=20 > >type of data being edited. > > > >The following code works fine, except for the Choice Dialog. > > > > =20 > > > What is there about it that doesn't work ? >=20 > The following shows a traceback for the error that there is=20 > no component=20 > named "Software_Classificationfield" - which is what I'd=20 > expect, because=20 > all 3 variants of defining that component are commented out. >=20 > If one of those were put back in (I think any of them), then=20 > you'd also=20 > want to change the source line that says >=20 > result.Software_Classification =3D=20 > dlg.components.Software_Classificationfield.text > to > result.Software_Classification =3D=20 > dlg.components.Software_Classificationfield.stringSelection >=20 > and I think it might then work. >=20 > I created a quick dialog that (I think) was equivalent (using=20 > the first variant from the comment block), and that one-line=20 > change made it work - so give it a try, and if that doesn't=20 > do it for you, let me know. >=20 > If it's still not working, you can send me the code/rsrc=20 > directly and then I'll be sure I'm fixing the right problem :-) >=20 > -- Alex >=20 >=20 > >class Edit_Window(model.CustomDialog): > > def static_and_area (self, x, y, label, default): > > #self.static_and_area (10, 20, "xyz", "testing") > > #self.static_and_area (10, 20, "xyz", "testing") > > self.components[label+'text'] =3D {'type':'StaticText', > > 'name':label+'text', > > 'position':(x, y), > > 'text':label.replace("_", " "),} > > > > self.components[label+'field'] =3D {'type':'TextArea', > > 'name':label+'field', > > 'position':(x+110, y-10), > > 'size':(280, 40), > > =20 > 'text':default.replace("_", " "),} > > > > > > def static_and_pulldown ( self, x, y, label, data=3D[]): > > self.components[label+'text'] =3D {'type':'StaticText', > > 'name':label+'text', > > 'position':(x, y), > > 'text':label.replace("_", " "),} > >## self.components[label+'field'] =3D {'type':'Choice',=20 > >## 'name':'Choice1',=20 > >## 'position':(10, 10),=20 > >## 'items':[],=20 > >## 'labelSpecified':0,=20 > >## 'nameSpecified':0,=20 > >## } > >## self.components[label+'field'] =3D {'type':'Choice',=20 > >## 'name':'popChoice',=20 > >## 'position':(100, 360),=20 > >## =20 > 'items':{'one':1, 'two':2, > >'three':3},=20 > >## =20 > 'stringSelection':'two',=20 > >## }, > >## self.components[label+'field'] =3D {'type':'Choice', > >## 'name':label+'field', > >## 'position':(x+125, y), > >## 'items':['abc', > >'def','ghi'], > >## =20 > 'stringSelection': 'def',}, > > > > > >Any ideas? > > > >C:\develope\security>software_licensing_report2.py > > > >Traceback (most recent call last): > > File "C:\develope\Python24\lib\site-packages\PythonCard\widget.py", > >line 439,in _dispatch > > handler(background, aWxEvent) > > File "C:\develope\security\browser.py", line 62, in=20 > >on_btnEdit_mouseClick > > results =3D self.edit (self, data) > > File "C:\develope\security\editting_dialog.py", line 109, in=20 > >edit_software_catalog > > result.Software_Classification =3D=20 > >dlg.components.Software_Classificationfield.text > > File "C:\develope\Python24\lib\site-packages\PythonCard\model.py", > >line 77, in __getattr__ > > return self.data[key] > >KeyError: 'Software_Classificationfield' > >{'returnedString': 'Close', 'accepted': True, 'returned': 5100} > > > > - Ben > > =20 > > > --=20 > Alex Tweedly http://www.tweedly.net >=20 >=20 >=20 > --=20 > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.323 / Virus Database: 267.8.14/48 - Release=20 > Date: 13/07/2005 >=20 >=20 |
From: Alex T. <al...@tw...> - 2005-07-14 17:17:01
|
Schollnick, Benjamin wrote: >Folks, > >I'm working on a custom dialog, that I need to revise depending on the >type of data being edited. > >The following code works fine, except for the Choice Dialog. > > > What is there about it that doesn't work ? The following shows a traceback for the error that there is no component named "Software_Classificationfield" - which is what I'd expect, because all 3 variants of defining that component are commented out. If one of those were put back in (I think any of them), then you'd also want to change the source line that says result.Software_Classification = dlg.components.Software_Classificationfield.text to result.Software_Classification = dlg.components.Software_Classificationfield.stringSelection and I think it might then work. I created a quick dialog that (I think) was equivalent (using the first variant from the comment block), and that one-line change made it work - so give it a try, and if that doesn't do it for you, let me know. If it's still not working, you can send me the code/rsrc directly and then I'll be sure I'm fixing the right problem :-) -- Alex >class Edit_Window(model.CustomDialog): > def static_and_area (self, x, y, label, default): > #self.static_and_area (10, 20, "xyz", "testing") > #self.static_and_area (10, 20, "xyz", "testing") > self.components[label+'text'] = {'type':'StaticText', > 'name':label+'text', > 'position':(x, y), > 'text':label.replace("_", " "),} > > self.components[label+'field'] = {'type':'TextArea', > 'name':label+'field', > 'position':(x+110, y-10), > 'size':(280, 40), > 'text':default.replace("_", " "),} > > > def static_and_pulldown ( self, x, y, label, data=[]): > self.components[label+'text'] = {'type':'StaticText', > 'name':label+'text', > 'position':(x, y), > 'text':label.replace("_", " "),} >## self.components[label+'field'] = {'type':'Choice', >## 'name':'Choice1', >## 'position':(10, 10), >## 'items':[], >## 'labelSpecified':0, >## 'nameSpecified':0, >## } >## self.components[label+'field'] = {'type':'Choice', >## 'name':'popChoice', >## 'position':(100, 360), >## 'items':{'one':1, 'two':2, >'three':3}, >## 'stringSelection':'two', >## }, >## self.components[label+'field'] = {'type':'Choice', >## 'name':label+'field', >## 'position':(x+125, y), >## 'items':['abc', >'def','ghi'], >## 'stringSelection': 'def',}, > > >Any ideas? > >C:\develope\security>software_licensing_report2.py > >Traceback (most recent call last): > File "C:\develope\Python24\lib\site-packages\PythonCard\widget.py", >line 439,in _dispatch > handler(background, aWxEvent) > File "C:\develope\security\browser.py", line 62, in >on_btnEdit_mouseClick > results = self.edit (self, data) > File "C:\develope\security\editting_dialog.py", line 109, in >edit_software_catalog > result.Software_Classification = >dlg.components.Software_Classificationfield.text > File "C:\develope\Python24\lib\site-packages\PythonCard\model.py", >line 77, in __getattr__ > return self.data[key] >KeyError: 'Software_Classificationfield' >{'returnedString': 'Close', 'accepted': True, 'returned': 5100} > > - Ben > > -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005 |
From: Schollnick, B. <Ben...@xe...> - 2005-07-14 16:27:10
|
Folks, I'm working on a custom dialog, that I need to revise depending on the type of data being edited. The following code works fine, except for the Choice Dialog. class Edit_Window(model.CustomDialog): def static_and_area (self, x, y, label, default): #self.static_and_area (10, 20, "xyz", "testing") #self.static_and_area (10, 20, "xyz", "testing") self.components[label+'text'] =3D {'type':'StaticText', 'name':label+'text', 'position':(x, y), 'text':label.replace("_", " "),} self.components[label+'field'] =3D {'type':'TextArea', 'name':label+'field', 'position':(x+110, y-10), 'size':(280, 40), 'text':default.replace("_", " "),} def static_and_pulldown ( self, x, y, label, data=3D[]): self.components[label+'text'] =3D {'type':'StaticText', 'name':label+'text', 'position':(x, y), 'text':label.replace("_", " "),} ## self.components[label+'field'] =3D {'type':'Choice',=20 ## 'name':'Choice1',=20 ## 'position':(10, 10),=20 ## 'items':[],=20 ## 'labelSpecified':0,=20 ## 'nameSpecified':0,=20 ## } ## self.components[label+'field'] =3D {'type':'Choice',=20 ## 'name':'popChoice',=20 ## 'position':(100, 360),=20 ## 'items':{'one':1, 'two':2, 'three':3},=20 ## 'stringSelection':'two',=20 ## }, ## self.components[label+'field'] =3D {'type':'Choice', ## 'name':label+'field', ## 'position':(x+125, y), ## 'items':['abc', 'def','ghi'], ## 'stringSelection': 'def',}, Any ideas? C:\develope\security>software_licensing_report2.py Traceback (most recent call last): File "C:\develope\Python24\lib\site-packages\PythonCard\widget.py", line 439,in _dispatch handler(background, aWxEvent) File "C:\develope\security\browser.py", line 62, in on_btnEdit_mouseClick results =3D self.edit (self, data) File "C:\develope\security\editting_dialog.py", line 109, in edit_software_catalog result.Software_Classification =3D dlg.components.Software_Classificationfield.text File "C:\develope\Python24\lib\site-packages\PythonCard\model.py", line 77, in __getattr__ return self.data[key] KeyError: 'Software_Classificationfield' {'returnedString': 'Close', 'accepted': True, 'returned': 5100} - Ben |
From: <kim...@ya...> - 2005-07-05 22:21:22
|
Alex Tweedly wrote: > kim...@ya... wrote: > >> I don't know whether this is true or not with other Python GUI >> toolkits (I only know PythonCard) but I >> find PythonCard extremely easy to handle situations >> where you have a number of user interfaces that are >> quite similar and yet each one has it's own subtleties >> that needs its own code. >> For instance, with the application I am developing, I >> have many situations like that. So, what I did was to >> define a super-class for all of the similar GUIs. Then I have one file >> (module) for each of the GUIs, >> and subclass them from the super-class. This way, I >> can have a resource file for each of them, and yet >> share lots of the common action code as long as I >> structured the code accordingly. >> >> >> > If you have an example of that you'd be willing to share, I'd love to > see it (preferably the code etc. , not just a description, please). > In my case, I have a lot of lists that require editing. So, I have a GUI with a left list, and a right list. Now, there are lots of things I want to do with such a panel. Like: move an item from the left side to the right side, sort the lists, move them up and down, and so forth. But then with some lists, I don't want them sorted and I don't want the sort button at all. Some might have additional controls in addition to the left/right list.... Some buttons essentially do the same thing but requires different labels... All of which can be done by additional if/then/else code but that makes the code quite unreadable and hard to maintain. So, I use the sub-classing architecture instead. The code comes out very very clean and easy to maintain. I can put together tonight when I get home. >> I really like PythonCard. The only gripe I have is >> the lack of more detailed documentations, like which >> control supports which method and so forth - the >> existing documentation needs a lot of improvement. I >> had to spend a lot of time looking through code before >> I can figure out how to do certain things. >> >> >> > Did you look at the html files created from the "widgets" sample ? > Is there more detail that you need, or something missing from there ? > Yes, I have. > (that's for the first part about details of which controls support which > methods; I agree more documentation would be good - though I really like > looking at the samples to see how things are done. Given a choice of a > certain level of effort in writing docs vs. extending samples to give > more coverage, I'd put the hours of effort into more examples ...) > > This is always a chanllenge for programmers... :=) -- John |
From: Alex T. <al...@tw...> - 2005-07-05 22:10:38
|
kim...@ya... wrote: >I don't know whether this is true or not with other >Python GUI toolkits (I only know PythonCard) but I >find PythonCard extremely easy to handle situations >where you have a number of user interfaces that are >quite similar and yet each one has it's own subtleties >that needs its own code. > >For instance, with the application I am developing, I >have many situations like that. So, what I did was to >define a super-class for all of the similar GUIs. >Then I have one file (module) for each of the GUIs, >and subclass them from the super-class. This way, I >can have a resource file for each of them, and yet >share lots of the common action code as long as I >structured the code accordingly. > > > If you have an example of that you'd be willing to share, I'd love to see it (preferably the code etc. , not just a description, please). >I really like PythonCard. The only gripe I have is >the lack of more detailed documentations, like which >control supports which method and so forth - the >existing documentation needs a lot of improvement. I >had to spend a lot of time looking through code before >I can figure out how to do certain things. > > > Did you look at the html files created from the "widgets" sample ? Is there more detail that you need, or something missing from there ? (that's for the first part about details of which controls support which methods; I agree more documentation would be good - though I really like looking at the samples to see how things are done. Given a choice of a certain level of effort in writing docs vs. extending samples to give more coverage, I'd put the hours of effort into more examples ...) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.8/37 - Release Date: 01/07/2005 |
From: <kim...@ya...> - 2005-07-05 21:52:28
|
I don't know whether this is true or not with other Python GUI toolkits (I only know PythonCard) but I find PythonCard extremely easy to handle situations where you have a number of user interfaces that are quite similar and yet each one has it's own subtleties that needs its own code. For instance, with the application I am developing, I have many situations like that. So, what I did was to define a super-class for all of the similar GUIs. Then I have one file (module) for each of the GUIs, and subclass them from the super-class. This way, I can have a resource file for each of them, and yet share lots of the common action code as long as I structured the code accordingly. Not sure if this is too much for your presentation but if the audience are seasoned Python programmers, may be the object oriented nature of doing things might appeal to them. I really like PythonCard. The only gripe I have is the lack of more detailed documentations, like which control supports which method and so forth - the existing documentation needs a lot of improvement. I had to spend a lot of time looking through code before I can figure out how to do certain things. -- John Steve Christensen wrote: > Alex Tweedly wrote: > >>Andy Todd wrote: >> >> >>>Steve Christensen wrote: >>> >>> >>>>On our local python user's group mailing list, I shot my mouth off that >>>>PythonCard was great (which it definitely is). Now I've been asked to do >>>>a presentation. Curses! >>>> >>>>I was thinking of covering the following: >>>> >>>>* a walk-through of the tutorials (this might drop off, since it'd be >>>>duplicating the stuff discussed in the tutorials) >>>> >>>>* a comparison between a simple application written in PythonCard vs. >>>>straight wxPython. >>>> >> >>Remember it's as much the difference in process as the difference in the >>resulting code that matters. >> >> >>>>* a brief list of 'why choose pythoncard' (hit some of the highpoints of >>>>the recent 'who is pythoncard's intended audience' thread). >>>>* a brief example of directly using wxPython inside a PythonCard >>>>application (anyone have a link to a straightforward example?). >>>> >> >>One aspect of that is using sizers - part of wxPython but not Pythoncard >>- a good simple example is the FindFiles utility. >> >>I'd also mention the ability to customize the built-in components if >>needed - see the recent example on multicolumn lists. >> >> >>>Whenever I've done this kind of thing I've found that interactive >>>demos are the best way to show PythonCard's strengths. Stick to one of >>>the early walkthroughs by Dan Shafer with detours into the tools >>>(resource editor, code editor and runtime shell) and you will soon >>>find that time flies. >>> >>>If you wan't some great material this document by Patrick O'Brien from >>>2002 is a great resource; >>> >>>http://www.onlamp.com/pub/a/python/2002/07/18/pycrust.html >>> >> >>I'd agree 100% with that. Do not underestimate how much of your allotted >>time it will take to get through even a simple example, given a couple >>of questions as you go; demonstrations to a mixed audience need to be >>much slower than if you were just doing it for yourself. >> > > > Thanks Andy and Alex for the advice. > > If people are interested... you can get a first draft of my presentation > from : > http://www.xmission.com/~stnchris/tmp/IntroducingPythonCard_v1.pdf > > Any areas where I should go into more depth? Less depth? > > Should I touch on the other provided tools, e.g. findFiles/codeEditor (I > tend to use Vim for everything, so I'm not that familiar with > codeEditor). > > Should I stick to one example program rather than the 2.5 I'm using? > (The .5 coming from my project which I wanted to show as a more > 'complete' application rather than a demo. I didn't want to go into > too much detail... it seems like it could derail the conversation away > from PythonCard into the other libraries/frameworks used) > > > -Steve > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > |
From: Steve C. <stn...@xm...> - 2005-07-05 18:14:46
|
Alex Tweedly wrote: > Andy Todd wrote: > > >Steve Christensen wrote: > > > >>On our local python user's group mailing list, I shot my mouth off that > >>PythonCard was great (which it definitely is). Now I've been asked to do > >>a presentation. Curses! > >> > >>I was thinking of covering the following: > >> > >>* a walk-through of the tutorials (this might drop off, since it'd be > >>duplicating the stuff discussed in the tutorials) > >> > >>* a comparison between a simple application written in PythonCard vs. > >>straight wxPython. > >> > Remember it's as much the difference in process as the difference in the > resulting code that matters. > > >>* a brief list of 'why choose pythoncard' (hit some of the highpoints of > >>the recent 'who is pythoncard's intended audience' thread). > >>* a brief example of directly using wxPython inside a PythonCard > >>application (anyone have a link to a straightforward example?). > >> > One aspect of that is using sizers - part of wxPython but not Pythoncard > - a good simple example is the FindFiles utility. > > I'd also mention the ability to customize the built-in components if > needed - see the recent example on multicolumn lists. > > > > >Whenever I've done this kind of thing I've found that interactive > >demos are the best way to show PythonCard's strengths. Stick to one of > >the early walkthroughs by Dan Shafer with detours into the tools > >(resource editor, code editor and runtime shell) and you will soon > >find that time flies. > > > >If you wan't some great material this document by Patrick O'Brien from > >2002 is a great resource; > > > >http://www.onlamp.com/pub/a/python/2002/07/18/pycrust.html > > > I'd agree 100% with that. Do not underestimate how much of your allotted > time it will take to get through even a simple example, given a couple > of questions as you go; demonstrations to a mixed audience need to be > much slower than if you were just doing it for yourself. > Thanks Andy and Alex for the advice. If people are interested... you can get a first draft of my presentation from : http://www.xmission.com/~stnchris/tmp/IntroducingPythonCard_v1.pdf Any areas where I should go into more depth? Less depth? Should I touch on the other provided tools, e.g. findFiles/codeEditor (I tend to use Vim for everything, so I'm not that familiar with codeEditor). Should I stick to one example program rather than the 2.5 I'm using? (The .5 coming from my project which I wanted to show as a more 'complete' application rather than a demo. I didn't want to go into too much detail... it seems like it could derail the conversation away from PythonCard into the other libraries/frameworks used) -Steve |
From: Andy T. <an...@ha...> - 2005-06-29 12:15:37
|
Bernie Hogan wrote: > My apologies for sending this to the pythoncard list, but sadly its the only > python list I'm on, and I need some emergency help. > > I pickled some files and now I can't unpickle them - it says that the class > that was pickled is no where to be found, but when I use the program to > pickle new files they work just fine. These are BIG pickles, and probably > would take me a full day or two to go through them by hand. > > Does anybody know a way to reconstruct a pickle or deal with it would the > associated class? > > Once again, sorry for the pseudo-spam. > > Thanks > BERNiE > > Bernie Hogan > PhD Student > University of Toronto I don't think I can help, but you would be better off asking this question on the comp.lang.python newsgroup. If you don't have a news reader it is mirrored as a mailing list [1], or available at gmane [2] [1] http://mail.python.org/mailman/listinfo/python-list [2] http://dir.gmane.org/gmane.comp.python.general Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Andy T. <an...@ha...> - 2005-06-29 11:58:52
|
one sugarbaby wrote: > G'day all > > I wonder if anyone can help me. I want to start using Pythoncard and > postgreSQL on Tiger (Macintosh). > > I figure I need: > > Python - already installed and working > wxPython - already installed and working - sometimes > PythonCard - downloaded but cannot get it to work > postgreSQL - working > python to pstgreSQL plug-in for Python - haven't the foggiest how to > get any of the open-source plug-ins to work > > I am essentially a newbie to unix and not that excited about becoming > an old hand. I would just like to get all the bits working. > > Alexander > > > Dr Alexander Bennett > Cooroy Qld > Australia > Alexander, Which release number and which version (zip, tar.gz) of PythonCard did you download? What are you doing with PythonCard that leads you to think that it isn't working? What error messages are you getting when you try and run the sample applications? Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Bernie H. <ber...@ut...> - 2005-06-29 06:27:30
|
My apologies for sending this to the pythoncard list, but sadly its the only python list I'm on, and I need some emergency help. I pickled some files and now I can't unpickle them - it says that the class that was pickled is no where to be found, but when I use the program to pickle new files they work just fine. These are BIG pickles, and probably would take me a full day or two to go through them by hand. Does anybody know a way to reconstruct a pickle or deal with it would the associated class? Once again, sorry for the pseudo-spam. Thanks BERNiE Bernie Hogan PhD Student University of Toronto -- |
From: one s. <abe...@co...> - 2005-06-29 05:54:16
|
G'day all I wonder if anyone can help me. I want to start using Pythoncard and postgreSQL on Tiger (Macintosh). I figure I need: Python - already installed and working wxPython - already installed and working - sometimes PythonCard - downloaded but cannot get it to work postgreSQL - working python to pstgreSQL plug-in for Python - haven't the foggiest how to get any of the open-source plug-ins to work I am essentially a newbie to unix and not that excited about becoming an old hand. I would just like to get all the bits working. Alexander Dr Alexander Bennett Cooroy Qld Australia |
From: Alex T. <al...@tw...> - 2005-06-28 21:55:55
|
Andy Todd wrote: > Steve Christensen wrote: > >> On our local python user's group mailing list, I shot my mouth off that >> PythonCard was great (which it definitely is). Now I've been asked to do >> a presentation. Curses! >> >> I was thinking of covering the following: >> >> * a walk-through of the tutorials (this might drop off, since it'd be >> duplicating the stuff discussed in the tutorials) >> >> * a comparison between a simple application written in PythonCard vs. >> straight wxPython. >> Remember it's as much the difference in process as the difference in the resulting code that matters. >> * a brief list of 'why choose pythoncard' (hit some of the highpoints of >> the recent 'who is pythoncard's intended audience' thread). >> * a brief example of directly using wxPython inside a PythonCard >> application (anyone have a link to a straightforward example?). >> One aspect of that is using sizers - part of wxPython but not Pythoncard - a good simple example is the FindFiles utility. I'd also mention the ability to customize the built-in components if needed - see the recent example on multicolumn lists. > > Whenever I've done this kind of thing I've found that interactive > demos are the best way to show PythonCard's strengths. Stick to one of > the early walkthroughs by Dan Shafer with detours into the tools > (resource editor, code editor and runtime shell) and you will soon > find that time flies. > > If you wan't some great material this document by Patrick O'Brien from > 2002 is a great resource; > > http://www.onlamp.com/pub/a/python/2002/07/18/pycrust.html > I'd agree 100% with that. Do not underestimate how much of your allotted time it will take to get through even a simple example, given a couple of questions as you go; demonstrations to a mixed audience need to be much slower than if you were just doing it for yourself. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.2/29 - Release Date: 27/06/2005 |
From: Andy T. <an...@ha...> - 2005-06-28 11:04:01
|
Steve Christensen wrote: > On our local python user's group mailing list, I shot my mouth off that > PythonCard was great (which it definitely is). Now I've been asked to do > a presentation. Curses! > > In addition to Kevin's "Keeping it simple with PythonCard" ... what > would _you_ like to see in a presentation? I don't feel like I can > speak with much authority about the internals or in-depth comparisons to > other tools; it will be much more focused on the user's perspective. > > The target audience is a Python UG, with varying levels of expertise. > > > I was thinking of covering the following: > > * a walk-through of the tutorials (this might drop off, since it'd be > duplicating the stuff discussed in the tutorials) > > * a comparison between a simple application written in PythonCard vs. > straight wxPython. > > * a brief list of 'why choose pythoncard' (hit some of the highpoints of > the recent 'who is pythoncard's intended audience' thread). > > * a brief example of directly using wxPython inside a PythonCard > application (anyone have a link to a straightforward example?). > > > -Steve > Whenever I've done this kind of thing I've found that interactive demos are the best way to show PythonCard's strengths. Stick to one of the early walkthroughs by Dan Shafer with detours into the tools (resource editor, code editor and runtime shell) and you will soon find that time flies. If you wan't some great material this document by Patrick O'Brien from 2002 is a great resource; http://www.onlamp.com/pub/a/python/2002/07/18/pycrust.html Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Steve C. <stn...@xm...> - 2005-06-28 03:31:46
|
On our local python user's group mailing list, I shot my mouth off that PythonCard was great (which it definitely is). Now I've been asked to do a presentation. Curses! In addition to Kevin's "Keeping it simple with PythonCard" ... what would _you_ like to see in a presentation? I don't feel like I can speak with much authority about the internals or in-depth comparisons to other tools; it will be much more focused on the user's perspective. The target audience is a Python UG, with varying levels of expertise. I was thinking of covering the following: * a walk-through of the tutorials (this might drop off, since it'd be duplicating the stuff discussed in the tutorials) * a comparison between a simple application written in PythonCard vs. straight wxPython. * a brief list of 'why choose pythoncard' (hit some of the highpoints of the recent 'who is pythoncard's intended audience' thread). * a brief example of directly using wxPython inside a PythonCard application (anyone have a link to a straightforward example?). -Steve |
From: Alex T. <al...@tw...> - 2005-06-23 13:27:13
|
Bryan Murdock wrote: >There's a nice program called gtkpod for linux that displays your mp3s >and their relavant info like artist, album, genre, etc. in a >multicolumn list looking widget. It allows you to double click on any >of the fields and edit the string right there in place. Is it >possible to do something like this with the PythonCard >multiColumnList? > > No and Yes. No - because the Pythoncard multiColumnList (as distributed) can't do it, but .... Yes - it's fairly easy to modify it to allow it - see instructions below. I got this far by looking at the wxPython demo which has a sample of a ListCtrl_edit (under CoreWindows/Controls). This showed me how to add in the text editing - but doesn't show how to get any events resulting from the edit; I'm not sure if there is an easy way to be notified when an edit has taken place. However, you can add handlers for gainFocus and loseFocus which will be called at the start and/or end of each edit - whether or not a change happened - so you can then retrieve the row and compare it against previous contents (assuming that you do need to take some action :-) Here's what I did. 1. Set up a custom version of the multiColumnList component You need to make your own modified multiColumnList component. I don't remember where the doc describing how to make a customized version of any component is - so here's a brief version of it ..... Go to the directory where your app lives, and create a directory called appcomponents. Copy into it the component file you want to change (pythoncard/components/multiColumnList.py) into it, and create a file within appcomponents called _init_.py (this is needed to let Pythoncard know to use these components - it needn't contain anything useful) This component will now be used in preference to the pythoncard one, only for applications in the directory it is within - so it won't affect any other projects you're doing. 2. Customize it. Go into the multiColumnList.py, and change it like this .... > *** /cygdrive/c/python/PythonCard/components/multicolumnlist.py Sun > Nov 7 17:13:13 2004 > --- ./multicolumnlist.py Thu Jun 23 11:55:14 2005 > *************** > *** 5,11 **** > """ > > import wx > ! from wx.lib.mixins.listctrl import ColumnSorterMixin, > ListCtrlAutoWidthMixin > from types import TupleType, ListType, StringTypes, NoneType, IntType > from PythonCard import event, widget > > --- 5,11 ---- > """ > > import wx > ! from wx.lib.mixins.listctrl import ColumnSorterMixin, > ListCtrlAutoWidthMixin, TextEditMixin > from types import TupleType, ListType, StringTypes, NoneType, IntType > from PythonCard import event, widget > > *************** > *** 80,86 **** > widget.WidgetSpec.__init__( self, 'MultiColumnList', > 'Widget', events, attributes ) > > > ! class MultiColumnList(widget.Widget, wx.ListCtrl, ColumnSorterMixin, > ListCtrlAutoWidthMixin): > """ > A multi-column list. > """ > --- 80,86 ---- > widget.WidgetSpec.__init__( self, 'MultiColumnList', > 'Widget', events, attributes ) > > > ! class MultiColumnList(widget.Widget, wx.ListCtrl, ColumnSorterMixin, > ListCtrlAutoWidthMixin, TextEditMixin): > """ > A multi-column list. > """ > *************** > *** 88,93 **** > --- 88,94 ---- > _spec = MultiColumnListSpec() > > def __init__( self, aParent, aResource ) : > + print "here" > if aResource.rules: > rules = wx.LC_HRULES | wx.LC_VRULES > else: > *************** > *** 115,120 **** > --- 116,122 ---- > # Now that the list exists we can init the other base class, > # see wxPython/lib/mixins/listctrl.py > ColumnSorterMixin.__init__(self, self._maxColumns) > + TextEditMixin.__init__(self) > > # Perform init for AutoWidth (resizes the last column to take up > # the remaining display width) If you're not used to diff output - all I did was add "TextEditMixin" to the import line, add it to the class dependency line, and initialize it immediately after ColumnSorterMixin was init'ed. I also added a diagnostic "print 'here'" just to check whether or not this customized version was being used :-) 3. Make a copy of the multicolumnlist sample copy Pythoncard/samples/multicolumnexample/multicolumnexample.py (and .rsrc.py) into your working directory (i.e. the one above appcomponents) 4. Change it It currently has a handler on_theList_select - at the end of it, I added the following > if not isinstance(row, StringTypes): > row = ' '.join(row) > base.displayArea.text = row > event.skip() > > def on_theList_gainFocus(self, event): > print "gainfocus" > event.skip() > > def on_theList_loseFocus(self, event): > print "losefocus" #, dir(event) > print event.target.curRow, event.this > event.skip() > And now the multicolumn example has editable items - and the event.target.curRow in loseFocus tells you which line has (perhaps) just been edited.... Good luck - let us know if you need more. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.11/26 - Release Date: 22/06/2005 |
From: Bryan M. <bmu...@gm...> - 2005-06-23 03:55:08
|
There's a nice program called gtkpod for linux that displays your mp3s and their relavant info like artist, album, genre, etc. in a multicolumn list looking widget. It allows you to double click on any of the fields and edit the string right there in place. Is it possible to do something like this with the PythonCard multiColumnList? Thanks, Bryan |
From: Bryan M. <bmu...@gm...> - 2005-06-16 18:01:25
|
On 6/15/05, Alex Tweedly <al...@tw...> wrote: > which is true - but there's a better (and more obvious !!) way .... put > in your own handler for the OK button within the dialog, validate any > fields there - if they're good, do an event.skip(), if they're bad, pop > up an alert (or whatever else you want) to inform the user ... That works beautifully, thanks! Thanks for the sample code too, I hadn't seen or heard of event.skip() before. Bryan |
From: Alex T. <al...@tw...> - 2005-06-15 22:29:40
|
Alex Tweedly wrote: > Bryan Murdock wrote: > >> I'm writing an app that will open up a CustomDialog asking the user to >> fill in a number of TextFields. I'm trying to figure out a good >> design for validating the fields and prompting the user to try again >> if they left one blank, or entered something invalid. It looks to me >> like it can only be done after the user clicks OK and I get the result >> back. I'm having my Background create an alert dialog telling the >> user what they did wrong, and then go back and redisplay the dialog, >> which is kind OK, I guess. Any suggestions for improvement? > > You can do it in the custom dialog function. This simple example will > keep the dialog on-screen until it gets a satisfactory value for one > of the fields (or the "Cancel" button is clicked). which is true - but there's a better (and more obvious !!) way .... put in your own handler for the OK button within the dialog, validate any fields there - if they're good, do an event.skip(), if they're bad, pop up an alert (or whatever else you want) to inform the user ... from PythonCard import model, dialog class MyDialog(model.CustomDialog): def __init__(self, parent, txt=''): model.CustomDialog.__init__(self, parent) def on_btnOK_mouseClick(self, event): if self.components.TextField1.text == "Done": event.skip() else: result = dialog.alertDialog(self, 'Field 1 must be "Done"', 'title') def myDialog(parent): dlg = MyDialog(parent) result = dlg.showModal() ## result.TextField1 = dlg.components.TextField1.text ## result.TextField2 = dlg.components.TextField2.text result.texts = {} for name in ["TextField1", "TextField2"]: result.texts[name] = dlg.components[name].text dlg.destroy() return result -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.3/15 - Release Date: 14/06/2005 |
From: Alex T. <al...@tw...> - 2005-06-15 20:16:40
|
Bryan Murdock wrote: >Hello, > >I'm writing an app that will open up a CustomDialog asking the user to >fill in a number of TextFields. I'm trying to figure out a good >design for validating the fields and prompting the user to try again >if they left one blank, or entered something invalid. It looks to me >like it can only be done after the user clicks OK and I get the result >back. I'm having my Background create an alert dialog telling the >user what they did wrong, and then go back and redisplay the dialog, >which is kind OK, I guess. Any suggestions for improvement? > > > You can do it in the custom dialog function. This simple example will keep the dialog on-screen until it gets a satisfactory value for one of the fields (or the "Cancel" button is clicked). from PythonCard import model, dialog class MyDialog(model.CustomDialog): def __init__(self, parent, txt=''): model.CustomDialog.__init__(self, parent) def myDialog(parent): dlg = MyDialog(parent) while True: result = dlg.showModal() if not result.accepted: #can always cancel break if dlg.components.TextField1.text == "Done": break ## result.TextField1 = dlg.components.TextField1.text ## result.TextField2 = dlg.components.TextField2.text result.texts = {} for name in ["TextField1", "TextField2"]: result.texts[name] = dlg.components[name].text dlg.destroy() return result This keeps the dialog on-screen - but unfortunately it doesn't provide any helpful feedback to the user. I tried changing it to provide an alert box - and when you do that, the original dialog disappears while the new dialog is there. Changed section of code: while True: result = dlg.showModal() if not result.accepted: #can always cancel break if dlg.components.TextField1.text == "Done": break else: result = dialog.alertDialog(parent, 'Must set field 1 to "Done"', 'some title') You could experiment with this - e.g. add a "status/error" component (static text) to the dialog, and try setting it rather than the alert dialog - see if that allows you to give helpful feedback while avoiding the visual distraction of having the dialog disappear and reappear. >Also, while we're on the subject of CustomDialogs, is there a nice way >to copy the text from all TextField components of the CustomDialog >into result, other than listing each one out, like so? > >result.FirstName = dlg.components.FirstNameTextField.text >result.LastName = dlg.components.LastNameTextField.text >etc. >etc. > > > you can do it using a dictionary as I did above (a dictionary called "texts" within the overall "result" dictionary). It makes it easy to get them into "result" - but it means that back in the background app where you invoked the dialog, you need to access them via the dictionary, as in def on_Button1_mouseClick(self, event): result = custDialog.myDialog(self) print result.texts["TextField1"] print result.texts["TextField2"] -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.3/15 - Release Date: 14/06/2005 |
From: Bryan M. <bmu...@gm...> - 2005-06-15 19:18:26
|
Hello, I'm writing an app that will open up a CustomDialog asking the user to fill in a number of TextFields. I'm trying to figure out a good design for validating the fields and prompting the user to try again if they left one blank, or entered something invalid. It looks to me like it can only be done after the user clicks OK and I get the result back. I'm having my Background create an alert dialog telling the user what they did wrong, and then go back and redisplay the dialog, which is kind OK, I guess. Any suggestions for improvement? Also, while we're on the subject of CustomDialogs, is there a nice way to copy the text from all TextField components of the CustomDialog into result, other than listing each one out, like so? result.FirstName =3D dlg.components.FirstNameTextField.text result.LastName =3D dlg.components.LastNameTextField.text etc. etc. Thanks, Bryan |
From: Arthur E. <ar...@ia...> - 2005-06-13 23:15:51
|
Hi Brad, I got Pythoncard running under 10.4.1 and python 2.4.1 and haven't found any serious errors.. yet. The only thing I did was copying pythoncard to the appropriate directory (site-packages) under 2.4, setting my path and my app worked. Haven't tested the editor or anything else. Arthur > > I can't speak with any authority on this, but I don't think that > PythonCard .81/.82 has been tested against Python 2.4.x. I ran into > lots of problems with this and no one on the PythonCard list was > able to help me with it, so I ended up continuing to use Python > 2.3.5 for PythonCard .81 and .82. > > I was able to run PythonCard apps under 2.4.1, but got lots of > exceptions and tracebacks in the terminal output, and as I recall > Resource Editor was almost unuseable under Python 2.4.1. Of course, > PythonCard is open source, so anybody with time to debug under > Python 2.4.1 could do so to get to the bottom of the problem... > > My PythonCard app seems to work ok under Mac OS 10.4.1 and Python > 2.3.5, along with wxPython 2.3.5 ansi (not Unicode). I doubt if > 10.4 is the problem here. > > Arthur Elsenaar wrote on 06/07/2005 06:23:16 PM: > > > > > Hi, > > > > trying to install PythonCard on OS X 10.4, but running into an > import > > problem. > > > > I installed python2.4.1, wxPython2.6, TigerPython24Fix and > > TigerPython23Compat from Bob's packages page and added /usr/local/ > bin > > to my path. Python2.4 runs fine and I can import wx fine, but not > > pythoncard.. anyone know what can be wrong? > > > > Thanks, Arthur. > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > you shotput > > a projector? How fast can you ride your desk chair down the > office luge track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Pythoncard-users mailing list > > Pyt...@li... > > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |
From: <bra...@om...> - 2005-06-13 21:37:41
|
I've seen this same symptom on the Mac--it doesn't seem to happen on Windows, which explains why Alex hasn't see this problem. To avoid the flicker problem, I usually uncheck "Visible at Startup" in the Background Info dialog in resource editor for a child window, and then explicitly set self.visible=True right before the self.Raise() statement. Liame Clarke wrote on 06/08/2005 01:20:02 AM: > Hey man, > > At the end of your method which calls the dialog box i.e. > > def foo(self, event): > <some stuff> > <dialog is called> > <Dialog has finished, now call...> > self.Raise() > > Try it, it may flicker, however. > On 6/8/05, kim...@ya... < kim...@ya... > > wrote: > Hello list, > > I am writing an app involving child-window. When the > child window invokes a dialogbox, it switches focus to > the main windows first, before poping up. Of course, > when it closes, the child-window becomes underneath > the main window. > > Is there a parameter I am suppose to set or something > in order to maintain the proper z-order? > > Thanks, > > -- > John > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > > > -- > 'There is only one basic human right, and that is to do as you damn > well please. > And with it comes the only basic human duty, to take the consequences.' |