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: Phil E. <ph...@li...> - 2006-07-30 20:02:55
|
On Friday 28 Jul 2006 15:24, Alex Tweedly wrote: > David Whiteley wrote: > >I am trying to install Pythoncard on a newly installed Fedora Core 5 > >machine. > >I have downloaded > > wxPython-common-gtk2-unicode.i586 0:2.5.4.1-mdk101_py2.3 > > > >and am trying to install it with > > yum localinstall wxPython-common-gtk... > > > >but it is failing it with > > The main reason it's failing is because you're trying to install an RPM intended for a Mandrake/Mandriva Linux system. I believe there are RPMs on the wxPython site which cover Fedora and other flavours of Linux - you should download one of those instead. The PythonCard RPMs on my web site are also only for Mandrake/Mandriva Linux - you'll have similar problems if you try to install these on your machine. -- Regards Phil Edwards Brighton, UK |
From: Alex T. <al...@tw...> - 2006-07-30 17:58:08
|
Ron Stephens wrote: >Brad, > >i hope you have already solved this problem. I use PythonCard don Mac >also. The key for me is to make sure that the correct wxPython is >installed directly in my site-packages directory of the version of >Python I am using and that PythonCard is installed in that same site- >packages directory. Still, if that isn't enough, you might need to >install a clean Python, wxPython, PythonCard setup. That always seems >to work. Once your installation is working, PythonCard is flawless >son the Mac. > > > >By the way, I just did a brief PythonCard podcast, including using >Kevin's PyCon 2005 talk on Python411 at www.awaretek.com/python/ >index.html > > > I wrote to Brad off-list, and we got his problem fixed (he had an earlier version of PythonCard checked out from CVS, and it came earlier in his sys.path, so was being used in preference to his regular PythonCard install). Sorry, we should have reported back to the list so that solution was available to others. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 25/07/2006 |
From: Ron S. <rd...@ma...> - 2006-07-30 17:05:43
|
Brad, i hope you have already solved this problem. I use PythonCard don Mac also. The key for me is to make sure that the correct wxPython is installed directly in my site-packages directory of the version of Python I am using and that PythonCard is installed in that same site- packages directory. Still, if that isn't enough, you might need to install a clean Python, wxPython, PythonCard setup. That always seems to work. Once your installation is working, PythonCard is flawless son the Mac. By the way, I just did a brief PythonCard podcast, including using Kevin's PyCon 2005 talk on Python411 at www.awaretek.com/python/ index.html Ron On Jul 24, 2006, at 2:39 PM, Brad Allen wrote: > I've gotten back into trying to get my PythonCard app to run on Mac, > and find myself getting stuck on launching resourceEditor.py or > layoutEditory.py. The problem seems like it should be easy to solve; > I must be missing something obvious. > > I installed PythonCard .82 using "sudo python setup.py" install, > where Python is the built-in Python 2.3.5 bundled with Mac OS 10.4.x > (Tiger). I have wxPython 2.6.3 installed but PythonCard seems to > ignore it and use the 2.5.3 bundled version of wx. > > The problem seems to be with importing the module "helpful" within > PythonCard. Here is the transcript: > > -=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > =-=-=-=-=-=-=- > > > oms-ballen:/Library/Python/2.3/site-packages/PythonCard/tools/ > resourceEditor > ballen$ pythonw resourceEditor.py > wx.PlatformInfo: ('__WXMAC__', 'wxMac', 'unicode', 'wx-assertions-on') > wx.VERSION: (2, 5, 3, 1, '') > Traceback (most recent call last): > File "resourceEditor.py", line 20, in ? > from modules import backgroundInfoDialog > File > "/Library/Python/2.3/site-packages/PythonCard/tools/resourceEditor/ > modules/backgroundInfoDialog.py", > line 7, in ? > from PythonCard import dialog, model, util, helpful > ImportError: cannot import name helpful > oms-ballen:/Library/Python/2.3/site-packages/PythonCard/tools/ > resourceEditor > ballen$ python > Python 2.3.5 (#1, Oct 5 2005, 11:07:27) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import PythonCard >>>> import PythonCard.model > wx.PlatformInfo: ('__WXMAC__', 'wxMac', 'unicode', 'wx-assertions-on') > wx.VERSION: (2, 5, 3, 1, '') >>>> import PythonCard.helpful > Traceback (most recent call last): > File "<stdin>", line 1, in ? > ImportError: No module named helpful >>>> ^D > > > -=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > =-=-=-=-=-=-=- > > > If I change directory to the "site-packages", I can import > PythonCard.helpful. However, I still can't launch resourceEditor.py > or layoutEditor.py > > > oms-ballen:/Library/Python/2.3/site-packages/PythonCard/tools/ > resourceEditor > ballen$ cd ../.. > oms-ballen:/Library/Python/2.3/site-packages/PythonCard ballen$ cd .. > oms-ballen:/Library/Python/2.3/site-packages ballen$ python > Python 2.3.5 (#1, Oct 5 2005, 11:07:27) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import PythonCard.helpful >>>> ^D > > > -=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > =-=-=-=-=-=-=- > > > Thanks for any help you provide on this! > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |
From: Alex T. <al...@tw...> - 2006-07-28 14:24:06
|
David Whiteley wrote: >I am trying to install Pythoncard on a newly installed Fedora Core 5 >machine. >I have downloaded > wxPython-common-gtk2-unicode.i586 0:2.5.4.1-mdk101_py2.3 > >and am trying to install it with > yum localinstall wxPython-common-gtk... > >but it is failing it with > >Error: Missing Dependency: python-base >= 2.3 is needed by package >wxPython-common-g.... > >My python is Python 2.4.3 (#1, Jun 13 2006, 11:46:08), which is >obviously > 2.3. What is going on? > > I don't know, but you may need to get a wxPython suitable for Python 2.4 since that's what you are using. Although the message *says* ">= 2.3" it may be that when Python 2.4 came out, it imposed a stricter constraint. I know the current (2.6.3) wxPython has different RPMs for Python 2.3 and 2.4 -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 25/07/2006 |
From: David W. <D.L...@ee...> - 2006-07-28 11:44:00
|
I am trying to install Pythoncard on a newly installed Fedora Core 5 machine. I have downloaded wxPython-common-gtk2-unicode.i586 0:2.5.4.1-mdk101_py2.3 and am trying to install it with yum localinstall wxPython-common-gtk... but it is failing it with Error: Missing Dependency: python-base >= 2.3 is needed by package wxPython-common-g.... My python is Python 2.4.3 (#1, Jun 13 2006, 11:46:08), which is obviously > 2.3. What is going on? Please. Dave |
From: <kc1...@ya...> - 2006-07-27 17:04:06
|
Hi list, Is there a way to build a selection list (or any kind of text components other then static text) with text attribute? I want to display certain items with a different color then the others in that selection... Regards, -- John Henry |
From: Kevin A. <al...@se...> - 2006-07-26 07:14:39
|
Begin forwarded message: > From: "Jure Vrscaj" <jur...@gm...> > Date: July 25, 2006 3:58:03 PM PDT > To: pyt...@li... > Subject: [Pythoncard-devel] Dijkstra's algorithm in pythoncard > > Hi, I've done a simple pythoncard app, a demo of dijkstra's algorithm: > http://codeshift.net/dijkstra > > I had no prior experience with GUI applications in python, yet managed > to do it in a day. > Pythoncard seemed very pythonic to me and I think it was the right > choice. > > Anyways, if you find that code useful as a pythoncard demo or sth., > feel > free to use it. > > > regards, > jure |
From: <kc1...@ya...> - 2006-07-26 05:51:27
|
Hi list, Is there any documentation on the panel manager? Google search indicates that it's in the wxWindow documentation. Before I dig that up, I like to know if there's a simpler way. I see how it's used in the sample program but there is no comment or anything. Thanks, -- John Henry |
From: David B. <dav...@al...> - 2006-07-25 14:23:17
|
A general question to persons on this list: What is the coolest pythoncard app that you know off. cool = useful, good looking etc.... On 7/25/06, Brad Allen <bra...@ma...> wrote: > > Alex Tweedly wrote: > >import sys > >sys.path > > > >and check that the correct PythonCard folder appears there. > >Also check there is a file called __init__.py in there (I think > >that's needed to make this directory be able to be used as a package > >that can be 'import'ed.) > > The problem turned out to be that I had an older version of > PythonCard that I had checked out via CVS in a different directory in > one of the directories in sys.path. That older version didn't have > helpful.py. > > Thanks for the help. The idea of looking at sys.path was what I > needed...I knew I was missing something obvious. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Brad A. <bra...@ma...> - 2006-07-25 14:12:39
|
Alex Tweedly wrote: >import sys >sys.path > >and check that the correct PythonCard folder appears there. >Also check there is a file called __init__.py in there (I think >that's needed to make this directory be able to be used as a package >that can be 'import'ed.) The problem turned out to be that I had an older version of PythonCard that I had checked out via CVS in a different directory in one of the directories in sys.path. That older version didn't have helpful.py. Thanks for the help. The idea of looking at sys.path was what I needed...I knew I was missing something obvious. |
From: Alex T. <al...@tw...> - 2006-07-24 23:51:57
|
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 21/07/2006 |
From: Steve F. <sf...@ih...> - 2006-07-24 23:44:51
|
On Sat, 2006-07-22 at 09:42 -0400, hwphillips wrote: > I have written a program which involves a long process of copying > files/converting files. I would like for the user to be able to stop the > process. I put a "stop" menu item, but the program doesn't respond. The > window titlebar goes white and nothing happens till the > copying/converting process is over. Any assistance would be appreciated. Or if you're looking to pick up an awesome asynchronous toolkit, you could use Twisted (http://www.twistedmatrix.com) to do that very simply. (Very simply, that is, after you've had sufficient Kool-Ade, if you will.) I'm using Twisted together with Pythoncard and it's an absolutely killer combo. Somebody with more experience than I should do a writeup on it; that combination is the answer to a lot of developers' needs. Steve |
From: <kc1...@ya...> - 2006-07-24 23:37:10
|
Bonk, bonk, bonk!!! Arh, that feels better. Reason why my quick sample didn't work is because I am running it in single thread mode! Change: self.myThread=MyBackgroundWorker(self).run() to: self.myThread=MyBackgroundWorker(self).start() and you'll see why multi-threaded programs are superior to non-multithreaded programs. -- John Henry |
From: <kc1...@ya...> - 2006-07-24 23:30:54
|
Somebody asked me for a sample program on how to multithread a Pythoncard application. Multithreading in Python is pretty easy to code. All you have to do is to declare a class that's subclassing from the threading.thread class and then kick start it with a start method. Like: import threading class Worker(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): ....actual code... myWorker=Worker().start() The actual work, of course, is synchronization. The Thread class provides counters, locks, and so forth to help that. I've put together a very simple mind multi-thread example to show how to do things in Pythoncard. The code doesn't quite work yet (I did it real quick over lunch time) in that the thread doesn't release the CPU like I expect it to and so one thread would hog the CPU and doesn't switch between threads). But for those that are not familiar with multi-threading PythonCard, this can serve as a sample. If you get the code to work properly, it should allow the user to click the Start menu option twice, and it would run 2 processing threads, and when the user click on Stop, both threads would stop. #!/usr/bin/python """ __version__ = "$Revision: 1.1 $" __date__ = "$Date: 2004/10/24 19:21:46 $" """ import wx import threading import thread import time from PythonCard import model class MyBackground(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here self.running(False) self.textAreas=(self.components.TextArea1,) pass def on_menuFileStart_select(self, event): on_menuFileStart_exe(self.textAreas[0]) return def on_menuFileStart_exe(self, textArea): textArea.visible=True self.running(True) for i in range(10000000): textArea.text = "Got up to %d" % i ## print i for j in range(i): k = 0 time.sleep(0) if not self.running(): break try: wx.SafeYield(self) except: pass if not self.running(): break textArea.text = "Finished at %d" % i return def on_menuFileStop_select(self, event): self.running(False) def on_Stop_mouseClick(self, event): self.on_menuFileStop_select(event) pass def running(self, flag=None): if flag!=None: self.runningFlag=flag return self.runningFlag class MyBackgroundThreaded(MyBackground): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here self.myLock=thread.allocate_lock() self.myThreadCount = 0 self.running(False) self.textAreas=[self.components.TextArea1,] self.textAreas.append(self.components.TextArea2) pass def on_menuFileStart_select(self, event): self.myThread=MyBackgroundWorker(self).run() def on_menuFileStop_select(self, event): self.running(False) self.menuBar.setEnabled("menuFileStart", True) def on_Stop_mouseClick(self, event): self.on_menuFileStop_select(event) def running(self, flag=None): self.myLock.acquire() if flag!=None: self.runningFlag=flag flag=self.runningFlag self.myLock.release() return flag class MyBackgroundWorker(threading.Thread): def __init__(self, parent): threading.Thread.__init__(self) self.parent=parent self.parent.myLock.acquire() threadCount=self.parent.myThreadCount self.parent.myLock.release() self.textArea=self.parent.textAreas[threadCount] def run(self): self.parent.myLock.acquire() self.parent.myThreadCount += 1 if self.parent.myThreadCount==2: self.parent.menuBar.setEnabled("menuFileStart", False) self.parent.myLock.release() self.parent.on_menuFileStart_exe(self.textArea) self.parent.myLock.acquire() self.parent.myThreadCount -= 1 if self.parent.myThreadCount==0: self.parent.menuBar.setEnabled("menuFileStart", True) self.parent.myLock.release() return if __name__ == '__main__': app = model.Application(MyBackgroundThreaded) app.MainLoop() Here's the resource file: {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with File->Exit menu', 'size':(400, 300), 'style':['resizeable'], 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileStart', 'label':u'&Start', }, {'type':'MenuItem', 'name':'menuFileStop', 'label':u'Sto&p', }, {'type':'MenuItem', 'name':'menuFile--', 'label':u'--', }, {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'StaticText', 'name':'TextArea1', 'position':(10, 100), 'text':u'This is a test', 'visible':False, }, {'type':'StaticText', 'name':'TextArea2', 'position':(10, 200), 'text':u'This is a test', 'visible':False, }, ] # end components } # end background ] # end backgrounds } } -- John Henry |
From: Alex T. <al...@tw...> - 2006-07-24 23:04:38
|
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 21/07/2006 |
From: Brad A. <bra...@ma...> - 2006-07-24 18:40:02
|
I've gotten back into trying to get my PythonCard app to run on Mac, and find myself getting stuck on launching resourceEditor.py or layoutEditory.py. The problem seems like it should be easy to solve; I must be missing something obvious. I installed PythonCard .82 using "sudo python setup.py" install, where Python is the built-in Python 2.3.5 bundled with Mac OS 10.4.x (Tiger). I have wxPython 2.6.3 installed but PythonCard seems to ignore it and use the 2.5.3 bundled version of wx. The problem seems to be with importing the module "helpful" within PythonCard. Here is the transcript: -=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- oms-ballen:/Library/Python/2.3/site-packages/PythonCard/tools/resourceEditor ballen$ pythonw resourceEditor.py wx.PlatformInfo: ('__WXMAC__', 'wxMac', 'unicode', 'wx-assertions-on') wx.VERSION: (2, 5, 3, 1, '') Traceback (most recent call last): File "resourceEditor.py", line 20, in ? from modules import backgroundInfoDialog File "/Library/Python/2.3/site-packages/PythonCard/tools/resourceEditor/modules/backgroundInfoDialog.py", line 7, in ? from PythonCard import dialog, model, util, helpful ImportError: cannot import name helpful oms-ballen:/Library/Python/2.3/site-packages/PythonCard/tools/resourceEditor ballen$ python Python 2.3.5 (#1, Oct 5 2005, 11:07:27) [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import PythonCard >>> import PythonCard.model wx.PlatformInfo: ('__WXMAC__', 'wxMac', 'unicode', 'wx-assertions-on') wx.VERSION: (2, 5, 3, 1, '') >>> import PythonCard.helpful Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named helpful >>> ^D -=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- If I change directory to the "site-packages", I can import PythonCard.helpful. However, I still can't launch resourceEditor.py or layoutEditor.py oms-ballen:/Library/Python/2.3/site-packages/PythonCard/tools/resourceEditor ballen$ cd ../.. oms-ballen:/Library/Python/2.3/site-packages/PythonCard ballen$ cd .. oms-ballen:/Library/Python/2.3/site-packages ballen$ python Python 2.3.5 (#1, Oct 5 2005, 11:07:27) [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import PythonCard.helpful >>> ^D -=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Thanks for any help you provide on this! |
From: Alex T. <al...@tw...> - 2006-07-24 09:26:55
|
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 21/07/2006 |
From: <kc1...@ya...> - 2006-07-24 03:33:46
|
hwphillips wrote: >> I have written a program which involves a long process of copying >> files/converting files. I would like for the user to be able to stop the >> process. I put a "stop" menu item, but the program doesn't respond. The >> window titlebar goes white and nothing happens till the >> copying/converting process is over. Any assistance would be appreciated. >> >Try putting a wx.SafeYield() or wx.Yield() inside of >your long running >loop and see if that helps. I believe that's not enough. To do this kind of things, you need to get into multi-threaded programming. Start a worker thread to loop over the processing task. Inside the loop, do a check to see if the GUI created any changes (like a mouse click) and if it does, you know to stop. The GUI code, of course, has to know that a worker thread has been started, and take action to make sure that the user doesn't start another one while the first one is working (like disable a button or something). -- John Henry |
From: Alex T. <al...@tw...> - 2006-07-23 22:20:57
|
hwphillips wrote: >I have written a program which involves a long process of copying >files/converting files. I would like for the user to be able to stop the >process. I put a "stop" menu item, but the program doesn't respond. The >window titlebar goes white and nothing happens till the >copying/converting process is over. Any assistance would be appreciated. > > So long as your processing loop is running, there is no opportunity for the wxPython events to be processed and passed to your menu code. Easiest, simplest, way to handle this is to ensure that your processing loop has something like for file in theListOfFiles: if globalStop: break processOneFile() wx.SafeYield(self) This checks a global variable (which you would set to true when the "stop" button (or menu) was clicked), then processes one file, then yields control (which allows wx to process any events). There are a number of examples that do this in the PythonCard sample - see for instance gravity.py (or findfiles for "yield" in the samples directory). -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 21/07/2006 |
From: Bill B. <bil...@pe...> - 2006-07-23 16:22:12
|
hwphillips wrote: > I have written a program which involves a long process of copying > files/converting files. I would like for the user to be able to stop the > process. I put a "stop" menu item, but the program doesn't respond. The > window titlebar goes white and nothing happens till the > copying/converting process is over. Any assistance would be appreciated. > Try putting a wx.SafeYield() or wx.Yield() inside of your long running loop and see if that helps. HTH, Bill |
From: hwphillips <bu...@ya...> - 2006-07-23 14:23:00
|
kc1...@ya... wrote: > Hi list, > > I am having trouble making the menuitem check mark to > behave properly. > > In my resource file, both the checkable and checkd > options for a particular menuitem has been set to 1. > Upon startup, I want to change the check mark base on > some other settings and I have code in the > on_initialize method to do that. However, no matter > what I do, the check mark still comes out checked. > > I am assuming that I am not doing this properly. The > code I am using in the on_initialize method: > > found=False > for me in self.menuBar.menus: > if me.getLabel()=="MyMenuLabel": > for item in me.items: > if item.getLabel()=="MyMenuItem": > item.checked = 0 (let say) > found=True > break > if found: > break > > The above code *doesn't* work. The check mark value > is affected but the display is not. > > What's the proper way to do this? > > Thanks, > > -- > John Henry > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV I had a similar problem. Alex Tweedy answered as follows: Menu items are not components, so you can't enable / disable them this way. You do this by self.menuBar.setEnabled('main_menuAdd_Info', True) assuming 'menuCommandsAutoRefresh' is the name of the menu item. You can also do getEnabled, or getChecked/setChecked, etc. Also, I have found that you cannot (or I cannot) change the checked state from a script called from the item itself. I can change it outside of the item script. |
From: hwphillips <bu...@ya...> - 2006-07-22 15:10:18
|
I have written a program which involves a long process of copying files/converting files. I would like for the user to be able to stop the process. I put a "stop" menu item, but the program doesn't respond. The window titlebar goes white and nothing happens till the copying/converting process is over. Any assistance would be appreciated. |
From: <kc1...@ya...> - 2006-07-21 19:45:35
|
Hi list, I am having trouble making the menuitem check mark to behave properly. In my resource file, both the checkable and checkd options for a particular menuitem has been set to 1. Upon startup, I want to change the check mark base on some other settings and I have code in the on_initialize method to do that. However, no matter what I do, the check mark still comes out checked. I am assuming that I am not doing this properly. The code I am using in the on_initialize method: found=False for me in self.menuBar.menus: if me.getLabel()=="MyMenuLabel": for item in me.items: if item.getLabel()=="MyMenuItem": item.checked = 0 (let say) found=True break if found: break The above code *doesn't* work. The check mark value is affected but the display is not. What's the proper way to do this? Thanks, -- John Henry |
From: Brian D. <deb...@ho...> - 2006-07-19 22:01:49
|
Hi there, I list the steps to my problem... - Create a new app - Select a button - Place the button where I want - click outside the button to deselect it... WOW... it doesnt work!!! the button never gets unselected, i minimize all in my desktop with the show desktop button... Hope this helps to find out my problem... It is strange that noone else has the same issues.... I'll try installing on a friends computer and see what happens PD: My dependecies are... Python 2.4 wxPython 2.5 PythonCard 0.82 on a windows XP SP2 machine Alex wrote... >You should be able to reduce the annoyance it causes by simply commenting >out the dialog placement from > if (not r.Inside(clientPosition)): > self.panel.SetFocus() > junk = dialog.alertDialog(self, "You double-clicked - >please don't", 'a title') > return I already did that... but doesnt work either... Thanks in advance _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ |
From: Ron S. <rd...@ma...> - 2006-07-19 16:51:49
|
On Jul 17, 2006, at 8:20 PM, Kevin Altis wrote: > > On Jul 16, 2006, at 7:49 PM, Ron Stephens wrote: > >> >> Hello Kevin, >> >> I do a weekly podcast about Python subjects. If it's OK with you, >> I would like to use the audio from your talk at PyCon 2005 (which >> can be found online at the PyCon website) in an upcoming podcast >> about PythonCard. I would edit it a little and make it compatible >> with the audio of the rest of the podcast, in which I would walk >> through a tutorial and just give my thoughts and comments about >> how easy PythonCard is to learn to use. I do use PythonCard >> routinely for simple GUI's for inputting data into my scripts. The >> podcast series is mainly for people who are learning Python and >> can be found at www.awaretek.com/python/index.html >> >> Ron Stephens >> > > Fine with me. If I remember correctly all the Pycon stuff has an > open source type usage license, so just look at what it says on the > site. > > Thanks, > > ka Kevin, Thanks. I'll try to do a good job on a PythonCard podcast. Ron |