[PythonCAD] Small fixes for fourteenth release and new stuff at repo

Art Haas ahaas at airmail.net
Thu Jun 3 09:50:22 EDT 2004


On Thu, Jun 03, 2004 at 08:36:28AM -0400, Somerlot, Chris wrote:
> I'm having trouble getting a fresh checkout from the repo going. I get
> these errors:
> 
>   File "C:\Python23\Lib\site-packages\PythonCAD\Generic\acline.py", line
> 667
>      for _node in self.getNodes(_x, _y, _angle)
>                                                ^
>  SyntaxError: invalid syntax

Fixed. I'd fixed this after commiting the change, but hadn't checked in
the fix. Grr ...
 
> And...
> 
>   File "C:\Python23\Lib\site-packages\PythonCAD\gtkpycad.py", line 323,
> in main
>     img = Interface.Gtk.gtkimage.GTKImage()
> AttributeError: 'module' object has no attribute 'GTKImage'
> 
> Not sure why the last one is occuring.

I don't know about this one. The program starts normally here. Can you
try running python from a command line and then do this ...

$ python
> import Interface.Gtk.gtkimage
> dir(Interface.Gtk.gtkimage)

You should see 'GTKImage' in the output.
 
> Also, it turns out the reason files can't be written or saved on windows
> is because fileio.py does not open them as binary, like the Gzip class
> in gzip.py does. Adding the following at line 45 solves the problem:
> 
>         if mode and 'b' not in mode: 
>             mode += 'b'

Thanks! I've checked in a slightly different change - the mode will get
the binary flag if sys.platform is 'win32'. I think that should cover
all the current windows versions.

Do an 'svn update' again and you'll get the changes.

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



More information about the PythonCAD mailing list