Re: [Kicad-developers] UTF8 source files

2013-05-03 Thread Edwin van den Oetelaar
I checked the patch with GEdit, Vim, Geany, Notepad and HexEdit. The original text shows as a mu sign ( in html mu; ) changes the text into an A circumflex ( in html Acirc; ) followed by a mu sign. In Hex it shows : 0xB5 0x6D changed into 0xC2 0xB5 0x6D ( where 0xC2 is the A circumflex) my

Re: [Kicad-developers] UTF8 source files

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 09:12:50AM +0200, Edwin van den Oetelaar wrote: I checked the patch with GEdit, Vim, Geany, Notepad and HexEdit. The original text shows as a mu sign ( in html mu; ) changes the text into an A circumflex ( in html Acirc; ) followed by a mu sign. In Hex it shows :

Re: [Kicad-developers] UTF8 source files

2013-05-03 Thread Edwin van den Oetelaar
2013/5/3 Lorenzo Marcantonio l.marcanto...@logossrl.com: On Fri, May 03, 2013 at 09:12:50AM +0200, Edwin van den Oetelaar wrote: I checked the patch with GEdit, Vim, Geany, Notepad and HexEdit. The original text shows as a mu sign ( in html mu; ) changes the text into an A circumflex ( in

Re: [Kicad-developers] UTF8 source files

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 09:43:29AM +0200, Edwin van den Oetelaar wrote: Flashback : It reminds me of the problems that existed with web-browsers, when people pasted stuff from their text-editor (like Word) into html textarea boxes to publish articles... oh the old days. More or less the

Re: [Kicad-developers] UTF8 source files

2013-05-03 Thread Edwin van den Oetelaar
Thanks for your detailed explanation. In my other code I put this : ( off topic joke ) (according to http://www.python.org/dev/peps/pep-0263/ ) #! /usr/bin/env python # -*- coding: utf-8 -*- The encoding should be on first or second line, so the python parsers (and editors) can find it. I found

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 10:07:02AM +0200, Miguel Angel Ajo wrote: Hi Adam, I'm rereading your work, and It's something we all love to have, but, I have a concern: Plot controller, works in some way (thanks to lorenzo abstraction) different to the drill. As I said it's a *plot*

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Miguel Angel Ajo
Lorenzo, don't get me wrong by my bad english, I was in fact saying thanks to your abstraction :) And , that the new drill code should have something equivalent, so our interfaces were uniform somehow :-) Yes, that drill controller could serve for scripting, but later, when finished, to

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 10:55:16AM +0200, Miguel Angel Ajo wrote: And , that the new drill code should have something equivalent, so our interfaces were uniform somehow :-) Implicit meaning detected: would be good if 'someone' wrote the drill controller :D :D :D In queue, but don't be in a

[Kicad-developers] UTF8 source files

2013-05-03 Thread Dick Hollenbeck
We introduced a patch today which introduces UTF8 encoding into a couple of source files, then made a policy decision to allow UTF8 string constants in 8 bit strings. So this is currently about 3 places only, nothing to worry about yet. The only time you can be sure you have an 8 bit string is

Re: [Kicad-developers] UTF8 source files

2013-05-03 Thread Dick Hollenbeck
On 05/03/2013 01:22 AM, Lorenzo Marcantonio wrote: On Thu, May 02, 2013 at 11:20:09PM -0500, Dick Hollenbeck wrote: We introduced a patch today which introduces UTF8 encoding into a couple of source files, then made a policy decision to allow UTF8 string constants in 8 bit strings. So this

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Adam Wolf
I agree that the plot and drill generation could have a similar API. However, if I'm going to put time into the Kicad C++ half, I want to improve PLOT CONTROLLER. Because the call that opens the file doesn't know anything about what layer you're on, there's no way for the PLOT CONTROLLER to

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Miguel Angel Ajo
I like your idea Adam, specially because you can change file for a stringio, and it could work.. Lorenzo, what do you think?, do you like Adam refactor idea for the plot controller? I think it's important that we have similar interfaces at both sides, and also that we have a

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 10:27:12AM -0500, Adam Wolf wrote: Because the call that opens the file doesn't know anything about what layer you're on, there's no way for the PLOT CONTROLLER to honor your Use Gerber Extension option. Because there's logic in the dialog box, PLOT That's by design.

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Adam Wolf
Lorenzo, When I said file-like object, I was speaking in a Python context. In Python, a file like object supports seek() and other things you do on files. That's why I mentioned StringIO--it's a helper class to treat strings like file-like objects. I believe this mitigates all your complaints

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 05:31:48PM +0200, Miguel Angel Ajo wrote: I like your idea Adam, specially because you can change file for a stringio, and it could work.. Lorenzo, what do you think?, do you like Adam refactor idea for the plot controller? I think it's important

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Adam Wolf
Lorenzo, I've already done the SWIG magic to hook up FILE * to Python file like objects. It was about 5 lines in the SWIG files. It works, today, using my patch and drill.py. This did not involve mmap, or rewriting anything to think of files as strings. I do not understand why you think this

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 01:38:58PM -0500, Adam Wolf wrote: Lorenzo, I've already done the SWIG magic to hook up FILE * to Python file like objects. It was about 5 lines in the SWIG files. It works, today, using my patch and drill.py. This did not involve mmap, or rewriting anything to

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Dick Hollenbeck
On 05/03/2013 01:56 PM, Lorenzo Marcantonio wrote: On Fri, May 03, 2013 at 01:38:58PM -0500, Adam Wolf wrote: Lorenzo, I've already done the SWIG magic to hook up FILE * to Python file like objects. It was about 5 lines in the SWIG files. It works, today, using my patch and drill.py. This

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Dick Hollenbeck
On 05/03/2013 02:23 PM, Lorenzo Marcantonio wrote: On Fri, May 03, 2013 at 02:02:01PM -0500, Dick Hollenbeck wrote: What about what I think Lorenzo? Is that important to you in any way? I reread this: https://lists.launchpad.net/kicad-developers/msg07515.html (is this what you were talking

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Adam Wolf
Hi folks, Can I selfishly suggest something? Since Dick has a plan for where this goes and how the future interface works, can we do the minor changes in my patch so that folks that choose to use the experimental Python features can get to the drill calls? I tried to propose a solution to

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Lorenzo Marcantonio
On Fri, May 03, 2013 at 02:45:01PM -0500, Dick Hollenbeck wrote: If they are not in one class, this makes the mix-in tougher back up at the PCB_BASE_FRAME. You end up with 2,3,4 classes, each holding a BOARD*, and each being mixed in via multiple inheritance? Instead of one class. I also

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Dick Hollenbeck
On 05/03/2013 03:07 PM, Adam Wolf wrote: Hi folks, Can I selfishly suggest something? Since Dick has a plan for where this goes and how the future interface works, can we do the minor changes in my patch so that folks that choose to use the experimental Python features can get to the

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Adam Wolf
Hi Dick, I appreciate the 1187 commits. If I didn't, I would have simply created another PPA and maintained a testing branch, selling this functionality to board houses. Can you tell me (privately if need be) how much Wayne and Layne would have to pay to have you implement enough of your

Re: [Kicad-developers] Plot and drill file generation via scripts

2013-05-03 Thread Dick Hollenbeck
I haven't even had time to read what Lorenzo is thinking yet. And as I said, I would not do anything this big without talking to the key share holders, excuse me, lead developers, JP and Wayne. So at some point, providing I can catch up in time to satisfy you, by me executing those steps,