[PythonCAD] DXF reader testing (and IPC)

Art Haas ahaas at airmail.net
Thu Dec 4 09:39:53 EST 2003

On Thu, Dec 04, 2003 at 06:31:25AM -0600, Eric Wilhelm wrote:
> Write a back-end to pythoncad for loading dwg/dxf?
> You might want to look at my CAD::Drawing Perl module, which has started to 
> grow the begginings of a GUI.  I plan to eventually incorporate Art's dwg 
> reader as a backend (currently, it just uses the opendwg toolkit.)
> Art,
> Has pythoncad got any IPC capabilities yet?  I've been thinking lately about 
> the possibility of TCP or socket communication.  What would this do for your 
> load/save capabilities?  (i.e. what if your save/load functions just spawned 
> a back-end and dumped/read XML over a pipe?)

No, there isn't any code to do that yet. As for the loading and saving
of files through a pipe, I've tried to write things so that doing this
is possible. I don't know if anyone has tried to do this, however.
Perhaps adding some kind of socket communications will be done - it
should be easier to do than in other programs because we're writing
Python code and have the socket module to make things easier.

File loading is handled in 'Generic/imageio.py' in the load_image()
function. This function takes an opened filehandle and reads from it.
The filehandle can be a pipe or a diskfile. I've thought that the way to
handling importing or exporting other file formats would be that the
format reader would be a stand-alone program that reads the file in its
native format and coverts the data into the PythonCAD format. The
PythonCAD program itself would then read the output of the file reading
program, possibly through a pipe or some sort of temporary file.

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