From ahaas at airmail.net Wed Mar 3 12:32:13 2004 From: ahaas at airmail.net (Art Haas) Date: Wed Mar 3 14:09:55 2004 Subject: [PythonCAD] Update on changes in PythonCAD Message-ID: <20040303173213.GB25821@artsapartment.org> Hi. After making the release last week, the first thing I did was remove all of the deprecated methods I could find, and removed a great deal of the old code for entities like Points, Segments, etc. Making changes where you remove code is nice. :-) I've been working on getting the undo/redo stuff going, and have made a decent enough start. If you pull the code from the subversion repo, you'll see a new file called 'logger.py'. This file contains the code that will be used for implementing undo/redo stuff, and I've added a bit of code to the 'point.py' file to try it out. Things are still in flux, though, and there are still lots of things to try and figure out. Posting a short message though seemed like a good idea to let everyone know what is going on. Besides bug fixes, I'm guessing that the next release will contain just the undo/redo stuff, as that area is what I'm going to concentrate my time and efforts on. Getting a first implementation into the program will resolve one of the serious shortcomings in PythonCAD. The messaging stuff seems to be working well in adding this missing feature, so I'm pleased that the changes over the last two months are producing benefits. I'd like to make the next release by the end of March, but there is no firm date set. I know I'll be gone for a couple of days this month, and progress in adding undo/redo may slow, so as we get closer to the end of the month I'll send out something indicating if a new release will be appearing or not. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From tzicatl at cuetzalan.com Wed Mar 10 00:55:14 2004 From: tzicatl at cuetzalan.com (Noe Misael Nieto Arroyo) Date: Thu Mar 11 09:37:58 2004 Subject: [PythonCAD] Slackware 9.1 and Python 2.3 issues --- can't run pythonCAD Message-ID: <1078898113.1744.3.camel@esperanza.net> Hello everybody. I got running Slackware 9.1 and python 2.3.3 ... While trying to run gtkpyad.py i get this error: tzicatl@esperanza:~$ gtkpycad.py Traceback (most recent call last): File "/usr/bin/gtkpycad.py", line 32, in ? import Interface.Gtk.gtkimage File "/usr/lib/python2.3/site-packages/PythonCAD/Interface/Gtk/gtkimage.py", line 31, in ? import gtkmenus File "/usr/lib/python2.3/site-packages/PythonCAD/Interface/Gtk/gtkmenus.py", line 31, in ? import gtkedit File "/usr/lib/python2.3/site-packages/PythonCAD/Interface/Gtk/gtkedit.py", line 34, in ? import Generic.dimension as dimension File "/usr/lib/python2.3/site-packages/PythonCAD/Generic/dimension.py", line 26, in ? import text File "/usr/lib/python2.3/site-packages/PythonCAD/Generic/text.py", line 529, in ? class TextBlock(object, TextFormat): TypeError: Cannot create a consistent method resolution order (MRO) for bases object, TextFormat Any pointer to solve this issue?? P.D. I'm not subscribed to this list. Could you please post to my e-mail?? Thanks In advance. From w.knol at niwa.co.nz Thu Mar 11 15:22:45 2004 From: w.knol at niwa.co.nz (Wilbert Knol) Date: Thu Mar 11 15:22:52 2004 Subject: [PythonCAD] No module named gobject Message-ID: <200403120922.45598.w.knol@niwa.co.nz> Hi all, I am having trouble getting R12 to work on a Mandrake 9.1 box: --------- [wk@wk pygtk-2.0.0]$ gtkpycad.py Traceback (most recent call last): File "/usr/local/bin/gtkpycad.py", line 32, in ? import Interface.Gtk.gtkimage File "/usr/lib/python2.2/site-packages/PythonCAD/Interface/Gtk/gtkimage.py", line 29, in ? import gobject ImportError: No module named gobject [wk@wk pygtk-2.0.0]$ --------- Indeed, there is no file called gobject.py on the machine. Perl and PyGTK are installed. I checked the very latest release of pygtk, and the module isn't in it. I don't know much about the Python language. Any pointers would be appreciated. Wilbert. From ahaas at airmail.net Mon Mar 15 09:56:17 2004 From: ahaas at airmail.net (Art Haas) Date: Mon Mar 15 09:56:25 2004 Subject: [PythonCAD] No module named gobject In-Reply-To: <200403120922.45598.w.knol@niwa.co.nz> References: <200403120922.45598.w.knol@niwa.co.nz> Message-ID: <20040315145617.GB1787@artsapartment.org> On Fri, Mar 12, 2004 at 09:22:45AM +1300, Wilbert Knol wrote: > Hi all, > > I am having trouble getting R12 to work on a Mandrake 9.1 box: > > --------- > [wk@wk pygtk-2.0.0]$ gtkpycad.py > Traceback (most recent call last): > File "/usr/local/bin/gtkpycad.py", line 32, in ? > import Interface.Gtk.gtkimage > File "/usr/lib/python2.2/site-packages/PythonCAD/Interface/Gtk/gtkimage.py", line 29, in ? > import gobject > ImportError: No module named gobject > [wk@wk pygtk-2.0.0]$ > --------- > > Indeed, there is no file called gobject.py on the machine. > Perl and PyGTK are installed. I checked the very latest release of pygtk, and > the module isn't in it. > > I don't know much about the Python language. Any pointers would be > appreciated. Hi. I'm not exactly familiar with Mandrake, but it sounds like the PyGTK package is only half-installed. I'm thinking that there are two packages - the PyGTK runtime package and then the development package - that have to be installed. Can you tell if you have both installed? There won't be a 'gobject.py' file installed, as PyGTK creates a compiled code shared library 'gobject.so' that Python loads up. Sorry I haven't replied sooner, as I've been offline for a few days. Art Haas -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From w.knol at niwa.co.nz Mon Mar 15 18:22:06 2004 From: w.knol at niwa.co.nz (Wilbert Knol) Date: Mon Mar 15 18:22:56 2004 Subject: [PythonCAD] No module named gobject In-Reply-To: <20040315145617.GB1787@artsapartment.org> References: <200403120922.45598.w.knol@niwa.co.nz> <20040315145617.GB1787@artsapartment.org> Message-ID: <200403161222.06655.w.knol@niwa.co.nz> > I'm not exactly familiar with Mandrake, but it sounds like the > PyGTK package is only half-installed. I'm thinking that there > are two packages - the PyGTK runtime package and then the > development package - that have to be installed. Can you > tell if you have both installed? pygtk-devel-0.6.9-6mdk pygtk-0.6.9-6mdk are both installed. I have realised I need a much later version than 0.6.9. > There won't be a 'gobject.py' file installed, as PyGTK creates > a compiled code shared library 'gobject.so' that Python loads > up. That explains it. Sorry, I was unaware Python could load shared-object code. pygtk-0.6.9 doesn't have gobject.so, so I downloaded pygtk-2.0.0, which does....but it won't compile because gtkgl.pc is missing (although I do have libgtkgl.so, courtesy of libgtkglarea5 and libgtkglarea5-devel). I wrote my own gtkgl.pc, and now pygtk-2.0.0 compiles, but there are several methods it skips because of undefined types...it's not a good look. Anyway, the GTK installation here seems to be a bit of a mess (nothing to do with PythonCAD). I will have to give Mdk 9.1 the flick and go to something better. Thanks, Art, for the suggestions. Wilbert. From ahaas at airmail.net Mon Mar 15 19:58:37 2004 From: ahaas at airmail.net (Art Haas) Date: Mon Mar 15 19:58:46 2004 Subject: [PythonCAD] No module named gobject In-Reply-To: <200403161222.06655.w.knol@niwa.co.nz> References: <200403120922.45598.w.knol@niwa.co.nz> <20040315145617.GB1787@artsapartment.org> <200403161222.06655.w.knol@niwa.co.nz> Message-ID: <20040316005837.GA26661@artsapartment.org> On Tue, Mar 16, 2004 at 12:22:06PM +1300, Wilbert Knol wrote: > > > I'm not exactly familiar with Mandrake, but it sounds like the > > PyGTK package is only half-installed. I'm thinking that there > > are two packages - the PyGTK runtime package and then the > > development package - that have to be installed. Can you > > tell if you have both installed? > > pygtk-devel-0.6.9-6mdk > pygtk-0.6.9-6mdk > > are both installed. I have realised I need a much later version than > 0.6.9. I didn't realize that these versions were still being shipped. I'd thought most distros now shipped the pygtk-2.0 stuff, or at least the development versions leading up to pygtk-2.0. Learn something new every day ... > > There won't be a 'gobject.py' file installed, as PyGTK creates > > a compiled code shared library 'gobject.so' that Python loads > > up. > > That explains it. Sorry, I was unaware Python could load shared-object > code. > > pygtk-0.6.9 doesn't have gobject.so, so I downloaded pygtk-2.0.0, > which does....but it won't compile because gtkgl.pc is missing > (although I do have libgtkgl.so, courtesy of libgtkglarea5 and > libgtkglarea5-devel). > > I wrote my own gtkgl.pc, and now pygtk-2.0.0 compiles, but there are > several methods it skips because of undefined types...it's not a good > look. > > Anyway, the GTK installation here seems to be a bit of a mess (nothing > to do with PythonCAD). I will have to give Mdk 9.1 the flick and go > to something better. > I think that the newest Mandrake releases are out - version 10 or something like that. Perhaps you could get that, or maybe see what sort of info is available on Mandrake related newsgroups or mailing lists. Surely there are prebuilt packages for Mandrake of the most recent pygtk-2.0 and GTK releases. Any other Mandrake users out there with any suggestions? FYI, the PyGTK team just released pygtk-2.2.0. I haven't installed in yet myself, though I did pull the code from the GNOME CVS repo. I'd bet that this version shows up in the next Fedora release, as well as Suse. Debian should pick it up shortly as well I'd wager. -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Tue Mar 16 11:19:08 2004 From: ahaas at airmail.net (Art Haas) Date: Tue Mar 16 11:20:52 2004 Subject: [PythonCAD] Subversion upgrade shortly Message-ID: <20040316161908.GA24153@artsapartment.org> Hi. Just today I've installed a new release of Subversion on my machine. I've got the 1.1.0-dev build installed, and will be upgrading the subversion binary on the public repository today or tomorrow. So, if you are running older subversion releases, I encourage you to upgrade to a newer release. The Subversion team has released the 1.0.1 release, so if you want to track that branch then do so. For the time being I'm going to stick with the 'trunk' of Subversion development - or in CVS-speak what is typically refered to as the HEAD. I figure the Subversion developers have been very careful to ensure that users of the 1.0 branch can work seamlessly with users of the trunk. Also, I'd been out this last weekend, so not much was accomplished. I'm still plodding along on the undo stuff, though it has been one step forward the one step back lately. When the subversion binary on the machine hosting the public repo changes I'll send a message to list. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Tue Mar 16 13:34:26 2004 From: ahaas at airmail.net (Art Haas) Date: Tue Mar 16 13:34:33 2004 Subject: [PythonCAD] Subversion upgraded Message-ID: <20040316183426.GB23956@artsapartment.org> Hi. The new Subversion binary is installed on the machine hosting the public repository. I've mirrored my repo to the public one, and updated from the public repo successfully, so things look like they are working. The new subversion binary is revision 9079 for those of you who are curious. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Thu Mar 25 12:12:55 2004 From: ahaas at airmail.net (Art Haas) Date: Thu Mar 25 12:13:55 2004 Subject: [PythonCAD] Sorry to report lack of progress ... Message-ID: <20040325171255.GC11895@artsapartment.org> Hi. This last week or so I have accomplished little if anything on the undo/redo work, and as we are approaching the end of March, it is extremely unlikely that I'll be making a release this month. I'm still working on resolving some issues with the code, and things always seem to get more complicated (naturally), so my progress has been minimial to non-existant. I've also been spending some time getting a SparcStation20 of mine updated with newer Linux stuff as I finally got some more hard drive space for the machine. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From CSomerlot at Brwncald.com Fri Mar 26 14:15:04 2004 From: CSomerlot at Brwncald.com (Somerlot, Chris) Date: Fri Mar 26 14:20:12 2004 Subject: [PythonCAD] FW: PythonCad in win32 Message-ID: Art, I've looked more into this more and have some questions about how compression is implemented. Firstly, the endline characters are easy to fix; Python 2.3 comes with universal newline supoort. But this isn't solving the problem of reading and writing files on windows. If I redirect the doc.writexml in imageio.py to a standard ascii xml file instead of the compression object, I get good data, and can read it back in fine. The problem seems to be at line 174 in fileio.py, with file.write(self, self.__compobj.compress(data)) Good data is going in, but bad bad data is coming out. My question has to do with the following section of fileio: self.__compobj = zlib.compressobj(6, zlib.DEFLATED, -zlib.MAX_WBITS, zlib.DEF_MEM_LEVEL, 0) file.write(self, '\037\213\010') file.write(self, chr(8)) # flags FNAME - no FHCRC for gzip compat. file.write(self, struct.pack(" -----Original Message----- > From: Art Haas [mailto:ahaas@airmail.net] > Sent: Friday, March 19, 2004 9:05 AM > To: Somerlot, Chris > Subject: Re: PythonCad in win32 > > > On Thu, Mar 18, 2004 at 02:55:22PM -0800, Somerlot, Chris wrote: > > Art, on the web page you state "... certain to be issues > with regards > > to file saving and loading on the windows ports due to > > line-terminating differences. These will be worked out eventually." > > > > I'd like to start to look into solving this, do you have > any pointers > > on where to start? I google "zlib line-terminating windows" > and don't > > get much > > > > Hi. > > Thanks for looking into this. > > I don't the the problem is in zlib, but in the 'fileio.py' > file. What needs attention is the there are places in the > code which search for the unix endline character '\n', so in > windows this neglects the '\r' character that is also used. > The file 'imageio.py' also does a bit of manipulation with > the '\n' character (look around line 1425 or so for a > doc.writexml() call. > > It may be that the solution to the problem is to simply add > some line-ending variables specific to each platform, but > that approach could be too simplistic in the long run. It > would be great to be able to write a write a file on a unix > box, and have it read correctly on windows, and be able to > write on windows and read on unix. I only run Linux at home, > so I don't have means of testing this stuff at my immediate disposal. > > Art > -- > Man once surrendering his reason, has no remaining guard > against absurdities the most monstrous, and like a ship > without rudder, is the sport of every wind. > > -Thomas Jefferson to James Smith, 1822 > From ahaas at airmail.net Fri Mar 26 16:25:02 2004 From: ahaas at airmail.net (Art Haas) Date: Fri Mar 26 16:25:23 2004 Subject: [PythonCAD] FW: PythonCad in win32 In-Reply-To: References: Message-ID: <20040326212502.GB29769@artsapartment.org> On Fri, Mar 26, 2004 at 11:15:04AM -0800, Somerlot, Chris wrote: > Art, I've looked more into this more and have some questions about how > compression is implemented. > > Firstly, the endline characters are easy to fix; Python 2.3 comes with > universal newline supoort. But this isn't solving the problem of reading and > writing files on windows. > These would be nice to use, and there are some other Python 2.3 features that I'd like to use (like types.BooleanType), but I'm trying to maintain Python 2.2 compatibity. I don't know how much longer that will be worth doing, but for now I'm striving to do this. > If I redirect the doc.writexml in imageio.py to a standard ascii xml file > instead of the compression object, I get good data, and can read it back in > fine. > > The problem seems to be at line 174 in fileio.py, with > > file.write(self, self.__compobj.compress(data)) > > Good data is going in, but bad bad data is coming out. My question has to do > with the following section of fileio: > self.__compobj = zlib.compressobj(6, > zlib.DEFLATED, > -zlib.MAX_WBITS, > zlib.DEF_MEM_LEVEL, > 0) > file.write(self, '\037\213\010') > file.write(self, chr(8)) # flags FNAME - no FHCRC for gzip > compat. > file.write(self, struct.pack(" file.write(self, '\000\377') # extra flags and unknown OS flag > > What do the constants do on init of __compobj do? What about the flags? I > can not seem to find any documentation on this stuff other than the value of > the constants. Do you have a link to some documentation? This stuff comes from the 'gzip.py' file that ships with Python. When I wrote this stuff initially, I could not get things to work so that the gzip binary could test the resulting file. When I found how the 'gzip.py' code was doing things, I took what they did as found that I could use gzip on the compressed file that was just written. I remember looking at the gzip code to try and figure out the differences, and the 'FHCRC' thing mattered ... [ ... searches computer ... ] Look for 'rfc1952' for info on the gzip format. I'll mail it to you if you want it rather than sending it to the list and adding to the size of this message. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Mon Mar 29 15:28:21 2004 From: ahaas at airmail.net (Art Haas) Date: Mon Mar 29 15:29:04 2004 Subject: [PythonCAD] Public repository not working Message-ID: <20040329202821.GE30251@artsapartment.org> Hi. There is some weirdness going on right on the machine hosting the public Subversion repository. I'm not sure if it as an Apache problem or a problem with Subversion, but I'm trying to figure it out. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Wed Mar 31 09:57:51 2004 From: ahaas at airmail.net (Art Haas) Date: Wed Mar 31 09:58:00 2004 Subject: [PythonCAD] Subversion repo back online Message-ID: <20040331145751.GB24270@artsapartment.org> Hi. I've updated and rebuilt the Subversion binary on the host machine, and things look like they work. I don't know what happened to cause the problems the older binary had, but as the new binary seems to work, I won't complain. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Wed Mar 31 16:25:37 2004 From: ahaas at airmail.net (Art Haas) Date: Wed Mar 31 16:25:45 2004 Subject: [PythonCAD] First bits of undo stuff in the repo Message-ID: <20040331212537.GA13922@artsapartment.org> Hi. I've checked them in, and they are very preliminary, but PythonCAD now has the start of an undo/redo mechanism that actually works! So far all it does is allow you to undo the creation of an entity, but that is a start. If you pull the code from the repo and run it, you'll see all sorts of stuff printed out in the terminal. I checked the code in even with all the various print-out stuff in place just to get the first blob of changes in the repo. Many more changes ahead will still be needed to make undo/redo stuff more useful, but this is a start. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822