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: <MWP...@cs...> - 2005-12-16 01:54:56
|
The program I am writing has a screen capture feature and I need to know how to minimize the app when this is chosen and restore the screen when the capture has been completed....I have tried to search through the mailing lists to see if this question has been asked but Im drawing a blank....any help would be greatly appreciated. |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-15 19:17:22
|
On 15/12/05 12:16, Alex Tweedly wrote: > Oh - you mean you put actual data in it :-) :-) A tree-less tree control... > I didn't get that far - just created a tree control and checked that a > tooltip then worked. > >> I'll try upgrading like you suggest. > > > Won't help. It's not a bug, it's a feature :-) > > At least on Windows, you can set the tooltip individually for each item > (from the WX docs it does look as though this is Windows only, but I'm > not in a position to try it on other systems just now). Wha...different tooltips per item! Actually...now that I think about it...I can't think of any use for one tooltip per item. But thanks for solving the mystery. I just need to follow your example and apply the same tooltip to all items. I can't check whether the same applies to OSX either, since my iBook's motherboard recently kicked the bucket :-( -- XXXXXXXXXXX |
From: Alex T. <al...@tw...> - 2005-12-15 12:16:42
|
XXXXXXXXXXX wrote: > Thanks for checking. I've got the same setup here except for the > PythonCard version. > > But I was a bit hasty in my analysis...it appears that the tool tip > stops working as soon as I let the pointer cross the actual tree > element within the control. If I keep the pointer within the blank > area of the control then I can move it onto other controls and back > and the tip reappears. Touch the tree...tip no more. > Oh - you mean you put actual data in it :-) I didn't get that far - just created a tree control and checked that a tooltip then worked. > I'll try upgrading like you suggest. Won't help. It's not a bug, it's a feature :-) At least on Windows, you can set the tooltip individually for each item (from the WX docs it does look as though this is Windows only, but I'm not in a position to try it on other systems just now). This isn't exposed through PythonCard, so you need to use the wx event system directly. I changed the minimalTree sample as below (changed line and section marked in comments). The "OnItemExpanded" isn't needed - but it was the one I used for first experiments. For this example, I just always set the same tooltip, but you could customize > #!/usr/bin/python > > """ > __version__ = "$Revision: 1.6 $" > __date__ = "$Date: 2004/05/05 16:53:27 $" > """ > > from PythonCard import model > import wx -- ADDED THIS LINE > > # events > # itemActivated, itemExpanding, itemExpanded, > # selectionChanging, selectionChanged > > class Minimal(model.Background): > > def on_initialize(self, event): > tree = self.components.tree > root = tree.addRoot("1") > tree.setItemHasChildren(root, 1) > tree.selectItem(root) > -- START OF NEW SECTION > self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded, > self.components.tree) > self.Bind(wx.EVT_TREE_ITEM_GETTOOLTIP, self.OnItemSetTooltip, > self.components.tree) > > def OnItemExpanded(self, event): > print "expanded", event.GetItem() > pass > > def OnItemSetTooltip(self, event): > print "gettooltip", event.GetItem() > event.SetToolTip("this is the new tooltip for all items") > pass > -- END OF NEW SECTION > > def on_tree_itemExpanding(self, event): > tree = self.components.tree > item=event.item > # This event can happen twice in the self.Expand call > if tree.isExpanded(item): > return > obj = int(tree.getItemText(item)) > if tree.getChildrenCount(item, 0) == 0: > lst = [obj * 2, (obj *2) + 1] > for o in lst: > new_item = tree.appendItem(item, str(o)) > tree.setItemHasChildren(new_item, 1) > event.skip() > > > if __name__ == '__main__': > app = model.Application(Minimal) > app.MainLoop() -- 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.13.13/200 - Release Date: 14/12/2005 |
From: Alex T. <al...@tw...> - 2005-12-15 00:50:36
|
Don Taylor wrote: > Alex Tweedly wrote: > >> >> I use the PythonCard editor about 90% of the time - does have some >> advantages for having built-in knowledge of the controls and events >> associated with them, plus easy access to the runtime options (debug, >> log, message watcher, etc.) > > I am curious about the PythonCard editor having "built-in knowledge of > the controls and events associated with them". A quick look at the > code editor did not reveal this to me - what should I be looking for? It's not in the "normal" codeEditor, it's in the "advanced" version, which can be found, rather confusingly, in PythonCard/tools/oneEditor/tabcodeEditor.py Has two features not in the basic editor - uses tabbed notebook to allow multiple files to be edited - has a drop-down for all controls in the current file Selecting one of them makes another drop-down appear. This shows all events for that control type, with a "+" marking those for which a handler exists. Selecting one of those will position the cursor on the first line of the handler. Selecting one for which no handler exists yet will insert a "blank" handler (without ensuring your on a blank line - use with care :-) This "advanced" editor is "experimental" - hasn't been as widely used or tested as the basic one, so use with care. Having said that, I've used it almost exclusively for many months and had only one (repeated) glitch (something to do with opening new windows while the shell window is open - but couldn't reproduce it). Oh - and it doesn't yet do Ctrl-F4 to close a tab - you need to do Ctrl-W. Minor, but annoying. -- 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.13.13/199 - Release Date: 13/12/2005 |
From: Don T. <nos...@gm...> - 2005-12-14 23:51:47
|
Alex Tweedly wrote: > > I use the PythonCard editor about 90% of the time - does have some > advantages for having built-in knowledge of the controls and events > associated with them, plus easy access to the runtime options (debug, > log, message watcher, etc.) > I been able to use Eclipse/Pydev on "Minimal" and the debugger seems to work at least in a very simple set up. Eclipse/Pydev and the resourceEditor seem to play quite nicely togtether. If the resource files has a different extention then I could register the resourceEditor as an external editor on Eclipse. I am curious about the PythonCard editor having "built-in knowledge of the controls and events associated with them". A quick look at the code editor did not reveal this to me - what should I be looking for? I plan to experiment further with Eclipse/Pydev - PythonCard as it seems like a nice combination to me. Thanks, Don |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-14 23:03:10
|
On 13/12/05 19:55, Alex Tweedly wrote: > Works ok for me : > > PythonCard version: cvs latest > wxPython version: 2.5.3.1 > Python version: 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit > (Intel)] > Platform: win32 > > You should be able to get from CVS using anonymous cvs, so shouldn't be > a lot of setup involved. Thanks for checking. I've got the same setup here except for the PythonCard version. But I was a bit hasty in my analysis...it appears that the tool tip stops working as soon as I let the pointer cross the actual tree element within the control. If I keep the pointer within the blank area of the control then I can move it onto other controls and back and the tip reappears. Touch the tree...tip no more. I'll try upgrading like you suggest. -- XXXXXXXXXXX |
From: Don T. <nos...@ca...> - 2005-12-14 14:43:58
|
Don Taylor wrote: > Total Newbie question - I have not yet tried PythonCard or wxWidgets but > I will 'real soon now'. > > I presume that I can use Eclipse+Pydev for my Python editing while using > Pythoncard to edit my resources. My question is can I run and debug a > PythonCard application from within Eclipse+Pydev? > > I know that I can try this out myself (and I will) but has anyone else > tried this, or something like it, and what pitfalls I should look out for. > I tried this last night and it seemed to work quite nicely - at least for the few minutes that I played with the 'minimal' app simultaneously in both Eclipse/Pydev and the resource editor. I was able to run the Pydev debugger on minimal and it looked OK. Eclipse recognized when a file it was editing changed on the file system and offered to reload it. More play to day. Don. (FWIW. The main reason I like Eclipse is because of its local history feature, I don't think that I want to live without it. You can safely bash away at some source and save it multiple times knowing that you can always go back to a working version without having to remember what you need to do to undo the changes. It is like having a local version control system that automatically commits your changes whenever you save a file. I don't know if other editors/IDEs have this feature.) |
From: Alex T. <al...@tw...> - 2005-12-14 09:06:19
|
Don Taylor wrote: > Total Newbie question - I have not yet tried PythonCard or wxWidgets > but I will 'real soon now'. > > I presume that I can use Eclipse+Pydev for my Python editing while > using Pythoncard to edit my resources. My question is can I run and > debug a PythonCard application from within Eclipse+Pydev? > > I know that I can try this out myself (and I will) but has anyone else > tried this, or something like it, and what pitfalls I should look out > for. Sorry, I haven't tried Eclipse. I use the PythonCard editor about 90% of the time - does have some advantages for having built-in knowledge of the controls and events associated with them, plus easy access to the runtime options (debug, log, message watcher, etc.) When I have complex changes to do, I use Emacs for the sake of its macros etc. (and out of long-term habit). The other 5% of the time, when I want a serious debugger, I use Wing-IDE (Personal Edition). -- 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.13.13/199 - Release Date: 13/12/2005 |
From: Don T. <nos...@ca...> - 2005-12-14 02:43:43
|
Total Newbie question - I have not yet tried PythonCard or wxWidgets but I will 'real soon now'. I presume that I can use Eclipse+Pydev for my Python editing while using Pythoncard to edit my resources. My question is can I run and debug a PythonCard application from within Eclipse+Pydev? I know that I can try this out myself (and I will) but has anyone else tried this, or something like it, and what pitfalls I should look out for. Thanks, Don. |
From: Alex T. <al...@tw...> - 2005-12-13 19:55:07
|
XXXXXXXXXXX wrote: > Could someone confirm that if you add a tool tip to the tree control > via the resource editor, it doesn't actually work? I've held the mouse > over the component every way possible but nothing seems to appear. > > If this has already been fixed in 0.8.2 then apologies - I haven't got > CVS access set up yet (really must get around to it...). > Works ok for me : PythonCard version: cvs latest wxPython version: 2.5.3.1 Python version: 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] Platform: win32 You should be able to get from CVS using anonymous cvs, so shouldn't be a lot of setup involved. -- 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.13.13/199 - Release Date: 13/12/2005 |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2005-12-13 17:30:40
|
Could someone confirm that if you add a tool tip to the tree control via the resource editor, it doesn't actually work? I've held the mouse over the component every way possible but nothing seems to appear. If this has already been fixed in 0.8.2 then apologies - I haven't got CVS access set up yet (really must get around to it...). Neil |
From: Kevin A. <al...@se...> - 2005-12-12 23:26:35
|
On Dec 8, 2005, at 7:15 AM, Alex Tweedly wrote: > Andy Todd wrote: > >> Yesterday I gave a presentation at the Australian Open Source >> Developers Conference in Melbourne. >> >> It was remarkably similar to Kevin's presentations at PyCon and OSCON >> earlier this year. What I managed to do was concentrate on >> demonstrating the power of PythonCard and kept my slides [1] to a >> minimum. >> >> I did, however, produce a paper [2] to be included in the conference >> proceedings. This is a fairly comprehensive description of the >> history, structure and form of PythonCard. I'd like to put this on >> the project web site but would like some feedback about where it >> should sit and what I should cut or add. > > Marvelous ! Thank you. > > I found the paper very interesting for the history (some of which I > knew but some I didn't). > And I learned about the runtime tools of property inspector and > namespace viewer; I guess I'd seen them before - they're right there > and obvious in the options dialog - but I hadn't really noticed them. > I can see I'll be using them - particularly the property inspector - a > lot from now on. > > Nothing seems particularly "missing" to me, so no contribution at the > moment. (Though I'm going to try to construct a tutorial or walk > through that uses the run-time tools ....) > > -- > Alex Tweedly http://www.tweedly.net The runtime Property Editor is probably the weakest of the current tools and I expect it has quite a few boundary condition bugs that were fixed in the resourceEditor. Ideally it would share more code with the resourceEditor property editor. I forked the resourceEditor version a long time ago since the runtime tool does not allow you to save changes, but consequently it hasn't kept up with all the fixes and features in the resourceEditor version, which also has callbacks into the main resourceEditor logic. One possibility would be to change the modules for the property editor and resourceOutput.py to be part of PythonCard/templates and/or primary framework modules. The resourceEditor property editor class and debug runtime property editor would then become subclasses of the base property editor. The runtime tool could be given a Save As... button so the current state of background could be saved. There might be some reason why that isn't a good idea that is currently slipping my mind, but it may also be one of those "why doesn't it do that already?" ideas that will make PythonCard more powerful for some developers. :-) ka |
From: Kevin A. <al...@se...> - 2005-12-12 23:09:16
|
On Dec 5, 2005, at 3:29 PM, Andy Todd wrote: > Yesterday I gave a presentation at the Australian Open Source > Developers Conference in Melbourne. > > It was remarkably similar to Kevin's presentations at PyCon and OSCON > earlier this year. What I managed to do was concentrate on > demonstrating the power of PythonCard and kept my slides [1] to a > minimum. > > I did, however, produce a paper [2] to be included in the conference > proceedings. This is a fairly comprehensive description of the > history, structure and form of PythonCard. I'd like to put this on the > project web site but would like some feedback about where it should > sit and what I should cut or add. > > All contributions are welcome. > > [1] http://www.halfcooked.com/presentations/osdc/presentation.html > [2] http://www.halfcooked.com/presentations/osdc/pythoncard.html > > Regards, > Andy > -- > ----------------------------------------------------------------------- > --------- > From the desk of Andrew J Todd esq - http://www.halfcooked.com/ Wow, very nice job Andy. I expect what we want to do is integrate this into the documentation page http://pythoncard.sourceforge.net/documentation.html perhaps as a new section Overview before Getting Started. There might be a better section name, but it should be clear from the section or title of the article that it is a background and overview of PythonCard rather than the "jumping in" articles in the Gatting Started section. Inserting a few screenshots might not be a bad idea either, since they are already on the web site, but that would change the original paper, so it is up to you. What was the response to the paper and presentation at the conference? ka |
From: Kevin A. <al...@se...> - 2005-12-12 22:54:44
|
What you want to do is use the BitmapCanvas component to do your=20 drawing after you load your existing image. Both the loading and saving=20= are shown in the doodle sample so I suggest basing your own application=20= on the doodle sample. The saving is handled using a helper function=20 from the graphic module so you don't have to hardcode the wxWidgets=20 graphics filetype and a wxWidgets/wxPython method call: from PythonCard import graphic # make sure you have this in your code path =3D 'some.png' # your filename/path here fileType =3D graphic.bitmapType(path) bmp =3D self.components.bufOff.getBitmap() # change to whatever your=20 BitmapCanvas is named bmp.SaveFile(path, fileType) If you're really in a hurry, you can always just use the doodle sample=20= to load an image, do your drawing in the shell window (start the=20 program with the -s command line option) and then use the File->Save=20 As... menu item. ka On Nov 29, 2005, at 8:13 AM, Mauro Cherubini wrote: > Dear All, > > sorry for the newbie question but I am fighting with the following=20 > issue: > I am trying to add some drawing on top of an existing bitmap. > I tried two things: the first one was to draw directly on the image=20 > setting that as the working canvas (i.e., canvas =3D=20 > self.components.canvasBackground); the second was to draw on a=20 > separate canvas. > > The first attempt raised an exception because apparently is not=20 > possible to draw on bitmaps. The second attempt load the drawing=20 > canvas on top of the "background" bitmap and because it is not=20 > transparent it covers automatically the background. > > I tried to set the 'backgroundColor' to 'None' but without success (it=20= > says that 'AttributeError: 'BitmapCanvas' object has no attribute=20 > 'backgroundColour''). > > Does anybody can help me to knock my head on the right place? > Thanks in advance for the pain you will generously cause > > > Mauro > > > _______________ > Mauro Cherubini > Research Associate > Centre de Recherche et d'Appui pour la Formation et ses Technologies=20= > (CRAFT) / Center for Research and Support of Training and its=20 > Technologies > > Ecole Polytechnique F=E9d=E9rale de Lausanne (EPFL) / Swiss Federal=20 > Institute of Technology Lausanne > web: http://craft.epfl.ch -- blog:=20 > http://www.i-cherubini.it/mauro/blog/ |
From: Alex T. <al...@tw...> - 2005-12-08 15:15:19
|
Andy Todd wrote: > Yesterday I gave a presentation at the Australian Open Source > Developers Conference in Melbourne. > > It was remarkably similar to Kevin's presentations at PyCon and OSCON > earlier this year. What I managed to do was concentrate on > demonstrating the power of PythonCard and kept my slides [1] to a > minimum. > > I did, however, produce a paper [2] to be included in the conference > proceedings. This is a fairly comprehensive description of the > history, structure and form of PythonCard. I'd like to put this on the > project web site but would like some feedback about where it should > sit and what I should cut or add. Marvelous ! Thank you. I found the paper very interesting for the history (some of which I knew but some I didn't). And I learned about the runtime tools of property inspector and namespace viewer; I guess I'd seen them before - they're right there and obvious in the options dialog - but I hadn't really noticed them. I can see I'll be using them - particularly the property inspector - a lot from now on. Nothing seems particularly "missing" to me, so no contribution at the moment. (Though I'm going to try to construct a tutorial or walk through that uses the run-time tools ....) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 02/12/2005 |
From: Andy T. <an...@ha...> - 2005-12-07 12:40:38
|
Yesterday I gave a presentation at the Australian Open Source Developers Conference in Melbourne. It was remarkably similar to Kevin's presentations at PyCon and OSCON earlier this year. What I managed to do was concentrate on demonstrating the power of PythonCard and kept my slides [1] to a minimum. I did, however, produce a paper [2] to be included in the conference proceedings. This is a fairly comprehensive description of the history, structure and form of PythonCard. I'd like to put this on the project web site but would like some feedback about where it should sit and what I should cut or add. All contributions are welcome. [1] http://www.halfcooked.com/presentations/osdc/presentation.html [2] http://www.halfcooked.com/presentations/osdc/pythoncard.html Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Phil E. <ph...@li...> - 2005-12-05 12:04:03
|
On Sun, 2005-12-04 at 18:02 +0000, Malcolm wrote: > Can anyone tell me how to get this going. > The Install Guide has no instructions for installing any non-rpm > versions on Linux and the rpm version doesn't seem to work. > Assuming you already have the wxPython libraries and so forth installed: 1. Download the PythonCard tarball and save it in your home directory. 2. Start a command line session 3. Unpack the tarball (tar -zxvf PythonCard-0.8.1.tar.gz) 4. cd PythonCard-0.8.1 5. su (type your root password when prompted) 6. python ./setup.py install 7. exit (to quit your root session and go back to your normal logon) 8. python /usr/lib/python2.4/site-packages/PythonCard/samples/minimal/minimal.py should then get the minimal sample application up and running. > The rpm is for Mandrake & has a pre-requisite of python-base (which > doesn't exist on SuSE). > Also, since I knew I had python product installed properly, I installed > the rpm using --nodeps option. Never a very good idea to do this with RPMs from another distro, unless you're absolutely sure you know what the effect will be! :-) In this case, 'rpm -e' followed by the RPM name will get rid of it safely for you. If you want to be ultra cautious, you could do 'rpm --test -e' first to ensure that no warning messages are generated before doing the 'rpm -e' for real. > This seems to have installed it under /usr/lib/Python2.3 when the active > version of Python on SuSE is in /usr/lib/Python2.4 > That behaviour is by design - those RPMs are built for a version of Mandrake which comes with Python2.3 as standard. Hope this helps, please post back here if you have any further problems. -- Phil Edwards Brighton, UK |
From: Malcolm <mal...@nt...> - 2005-12-04 18:02:30
|
Can anyone tell me how to get this going. The Install Guide has no instructions for installing any non-rpm versions on Linux and the rpm version doesn't seem to work. The rpm is for Mandrake & has a pre-requisite of python-base (which doesn't exist on SuSE). Also, since I knew I had python product installed properly, I installed the rpm using --nodeps option. This seems to have installed it under /usr/lib/Python2.3 when the active version of Python on SuSE is in /usr/lib/Python2.4 Thanks |
From: Alex T. <al...@tw...> - 2005-11-30 11:34:51
|
Mauro Cherubini wrote: > Thanks Alex for the quick answer! > > Actually, when I say existing bitmap I mean an external png file that > represent a geographical map. > What I want to do is to add to this map some "dots" and "lines" at > specific locations according to some logic I have in the rest of the > program. > > I did this using PIL, editing the existing bitmap and saving the > results into a new file. I was hoping to do the same with PythonCard, > maybe working on a transparent canvas which should overlay the > existing bitmap. But I cannot figure out the way to do it. > Is the end result just to display it ? Or do you need to save a new PNG file ? If display on screen is what you want, then it should (maybe) be easy. I doubt if your idea of using an Image and a bitmapCanvas will work - you'd need transparency of the bitmapCanvas which I don't think is supported. What you should be able to do is something like (you'll need "from PythonCard import graphic" if you don't already have it). backimage = graphic.Bitmap('D:/Our Documents/Alex/a.png') self.components.bufOff.drawBitmap(backimage, (0,0)) and then do additional drawing on top of that. If you then need to save that to a new PNG file, it can probably be done - investigate the functions within graphic.py - though I've not done anything like that. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/188 - Release Date: 29/11/2005 |
From: Mauro C. <mau...@ep...> - 2005-11-30 09:48:59
|
Thanks Alex for the quick answer! Actually, when I say existing bitmap I mean an external png file that =20= represent a geographical map. What I want to do is to add to this map some "dots" and "lines" at =20 specific locations according to some logic I have in the rest of the =20 program. I did this using PIL, editing the existing bitmap and saving the =20 results into a new file. I was hoping to do the same with PythonCard, =20= maybe working on a transparent canvas which should overlay the =20 existing bitmap. But I cannot figure out the way to do it. At the moment I have two components in the resource file. The Image =20 component gets loaded on top of the BitmapCanvas, of which shares the =20= same dimensions and position: {'type':'BitmapCanvas', 'name':'Canvas', 'position':(200, 0), 'size':(800, 600), # 'backgroundColor':(255, 255, 255), }, {'type':'Image', 'name':'canvasBackground', 'position':(200, 0), 'file':'campus_base.png', }, The program file contains a piece of drawing code that should be =20 activated when pressing a certain button: def bitmapCanvasTest(self): canvas =3D self.components.Canvas canvas.drawPoint((5, 5)) canvas.foregroundColor =3D 'red' canvas.drawLine((5, 10), (20, 30)) canvas.foregroundColor =3D 'blue' canvas.drawRectangle((25, 5), (30, 20)) canvas.drawText('Text', (5, 30)) canvas.drawRotatedText('Rotated', (60, 40), 90) canvas.foregroundColor =3D 'gray' canvas.fillColor =3D 'gray' canvas.drawEllipse((80, 5), (30, 30)) The problem is than when called, these commands change the ordering =20 of the canvases, bringing the BitmapCanvas on top of the Image that =20 stays as background, with subsequent loss of the reference points =20 (aka, I cannot see the background any more). Now, what I was trying to do was to either: 1) make the BitmapCanvas =20 background transparent or either drawing directly on the png file =20 image that is loaded on the background. So far, I have not figured =20 out the right syntax to do that or/and if it is the right way to do it. Thanks again in advance for any kind soul that wants to join this =20 discussion Mauro On Nov 29, 2005, at 19:20 , Alex Tweedly wrote: > Mauro Cherubini wrote: > >> Dear All, >> >> sorry for the newbie question but I am fighting with the =20 >> following issue: >> I am trying to add some drawing on top of an existing bitmap. > > When you say "existing bitmap" do you mean an existing bitmapCanvas =20= > component ? > >> I tried two things: the first one was to draw directly on the =20 >> image setting that as the working canvas (i.e., canvas =3D =20 >> self.components.canvasBackground); the second was to draw on a =20 >> separate canvas. >> >> The first attempt raised an exception because apparently is not =20 >> possible to draw on bitmaps. > > You should be able to do this. If you didn't already, see the =20 > 'gravity' example in the samples directory (or any of the other =20 > samples that use bitmapCanvas). If you still have a problem with =20 > this, post again maybe including the code that is failing ... (if =20 > you do - please try to give us a complete, small example including =20 > resource file). > >> The second attempt load the drawing canvas on top of the =20 >> "background" bitmap and because it is not transparent it covers =20 >> automatically the background. >> > Don't think you can get transparent bitmapCanvas. > >> I tried to set the 'backgroundColor' to 'None' but without =20 >> success (it says that 'AttributeError: 'BitmapCanvas' object has =20 >> no attribute 'backgroundColour''). >> > You may not be able to set it to None - but you can set the =20 > backgroundColor > (was it a mis-spelling as backgroundColour ??) > > I added : > self.components.bufOff.backgroundColor =3D (255,255,0) > to the on_initialize of the gravity example and it worked =20 > beautifully (maybe that's the wrong word for a bright yellow =20 > background :-) > > --=20 > Alex Tweedly http://www.tweedly.net > > > > --=20 > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: =20 > 25/11/2005 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through =20 > log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD =20 > 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 _______________ Mauro Cherubini Research Associate Centre de Recherche et d'Appui pour la Formation et ses Technologies =20 (CRAFT) / Center for Research and Support of Training and its =20 Technologies Ecole Polytechnique F=E9d=E9rale de Lausanne (EPFL) / Swiss Federal =20 Institute of Technology Lausanne Address: CE 1.631 (B=E2timent CE), Station 1, EPFL - Ecublens, CH - =20 1015 Lausanne, Switzerland T=E9l=E9phone: +41 (0)21/693.27.05 -- Fax: +41 (0)21/693.60.70 -- =20 Mobile: +41 (0)78/ 913.50.11 web: http://craft.epfl.ch -- blog: http://www.i-cherubini.it/mauro/blog/ |
From: Alex T. <al...@tw...> - 2005-11-29 18:20:50
|
Mauro Cherubini wrote: > Dear All, > > sorry for the newbie question but I am fighting with the following > issue: > I am trying to add some drawing on top of an existing bitmap. When you say "existing bitmap" do you mean an existing bitmapCanvas component ? > I tried two things: the first one was to draw directly on the image > setting that as the working canvas (i.e., canvas = > self.components.canvasBackground); the second was to draw on a > separate canvas. > > The first attempt raised an exception because apparently is not > possible to draw on bitmaps. You should be able to do this. If you didn't already, see the 'gravity' example in the samples directory (or any of the other samples that use bitmapCanvas). If you still have a problem with this, post again maybe including the code that is failing ... (if you do - please try to give us a complete, small example including resource file). > The second attempt load the drawing canvas on top of the "background" > bitmap and because it is not transparent it covers automatically the > background. > Don't think you can get transparent bitmapCanvas. > I tried to set the 'backgroundColor' to 'None' but without success > (it says that 'AttributeError: 'BitmapCanvas' object has no attribute > 'backgroundColour''). > You may not be able to set it to None - but you can set the backgroundColor (was it a mis-spelling as backgroundColour ??) I added : self.components.bufOff.backgroundColor = (255,255,0) to the on_initialize of the gravity example and it worked beautifully (maybe that's the wrong word for a bright yellow background :-) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 25/11/2005 |
From: Mauro C. <mau...@ep...> - 2005-11-29 16:14:12
|
Dear All, sorry for the newbie question but I am fighting with the following =20 issue: I am trying to add some drawing on top of an existing bitmap. I tried two things: the first one was to draw directly on the image =20 setting that as the working canvas (i.e., canvas =3D =20 self.components.canvasBackground); the second was to draw on a =20 separate canvas. The first attempt raised an exception because apparently is not =20 possible to draw on bitmaps. The second attempt load the drawing =20 canvas on top of the "background" bitmap and because it is not =20 transparent it covers automatically the background. I tried to set the 'backgroundColor' to 'None' but without success =20 (it says that 'AttributeError: 'BitmapCanvas' object has no attribute =20= 'backgroundColour''). Does anybody can help me to knock my head on the right place? Thanks in advance for the pain you will generously cause Mauro _______________ Mauro Cherubini Research Associate Centre de Recherche et d'Appui pour la Formation et ses Technologies =20 (CRAFT) / Center for Research and Support of Training and its =20 Technologies Ecole Polytechnique F=E9d=E9rale de Lausanne (EPFL) / Swiss Federal =20 Institute of Technology Lausanne web: http://craft.epfl.ch -- blog: http://www.i-cherubini.it/mauro/blog/ |
From: Andy T. <an...@ha...> - 2005-11-28 20:18:00
|
Alex Tweedly wrote: > Siddhartha Azad wrote: > >> Hi, >> I wanted to know if there's a way to add widgets >> dynamically using PythonCard. For example if I wanna >> dynamically generate GUIs without using the Resource >> Editor. I know it is supported in wxPython. >> If not, what are the plans for supporting such a >> functionality? >> >> > Yes, you can do that already. See samples/noresource for an example - > this has both a dictionary included in the source code (rather than a > separate resource file), and a dynamically created component. > Not to mention the dbBrowser sample, which creates widgets to represent the structure of a database table. The code may be slightly more complex than the noresource sample but this is one of the major features it was designed to show. Regards, Andy |
From: Alex T. <al...@tw...> - 2005-11-28 12:01:37
|
Siddhartha Azad wrote: >Hi, >I wanted to know if there's a way to add widgets >dynamically using PythonCard. For example if I wanna >dynamically generate GUIs without using the Resource >Editor. I know it is supported in wxPython. >If not, what are the plans for supporting such a >functionality? > > Yes, you can do that already. See samples/noresource for an example - this has both a dictionary included in the source code (rather than a separate resource file), and a dynamically created component. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 25/11/2005 |
From: Siddhartha A. <sid...@ya...> - 2005-11-28 11:06:00
|
Hi, I wanted to know if there's a way to add widgets dynamically using PythonCard. For example if I wanna dynamically generate GUIs without using the Resource Editor. I know it is supported in wxPython. If not, what are the plans for supporting such a functionality? Thanks, Sid. Life is about being a Phoenix! |