Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Strontium

On 13/12/15 01:20, Wayne Stambaugh wrote:

I just tried this.  Nice!  This is definitely nicer than the Python
shell we are using.  I'm with Nick, where's the patch?

On 12/12/2015 10:00 AM
Attached is A ROUGH PATCH, but its not correct yet.  I am posting it for 
comments, and maybe someone can help explain my problem??


I am getting unexplained assertions in the kicad menu.
With this patch, the first time the "Tools" menu is accessed no problem.
If the Python Console is opened, then the very next access to the tools 
menu gives:
../src/gtk/menu.cpp(745): assert "Assert failure" failed in Check(): 
can't check this item


I am also getting assertions when i expand some items in the "Namespace":

../src/gtk/colour.cpp(218): assert "IsOk()" failed in Alpha(): invalid 
colour

../src/gtk/colour.cpp(207): assert "IsOk()" failed in Blue(): invalid colour
../src/gtk/colour.cpp(196): assert "IsOk()" failed in Green(): invalid 
colour
../src/gtk/colour.cpp(233): assert "IsOk()" failed in GetPixel(): 
invalid colour

../src/gtk/colour.cpp(185): assert "IsOk()" failed in Red(): invalid colour
../src/gtk/colour.cpp(185): assert "IsOk()" failed in Red(): invalid colour
../src/gtk/colour.cpp(196): assert "IsOk()" failed in Green(): invalid 
colour

../src/gtk/colour.cpp(207): assert "IsOk()" failed in Blue(): invalid colour

I don't know whats causing those.  Also, i will probably move the 
setting of the frame name inside CreatePythonShellWindow.


Doing it this way removes the need for the PYTHON_CONSOLE_FRAME and 
assuming I can get it to work without causing assertions, then that 
whole file could be removed.


IF I can get this to work, I would like to add features such as:

Startup scripts which execute the first time the window is opened.
Saving and restoring of the windows settings.
Saving and restoring of the history.
Making the About Dialog more descriptive/meainingful.

I think that:
Settings/History would be stored in the users kicad config directory.
Startup scripts would also be there.

I would also like to add the users kicad config directory and the 
current project path to the search path, so that user scripts could be 
stored with their project or with their kicad settings.


Steven.
=== modified file 'pcbnew/pcbframe.cpp'
--- pcbnew/pcbframe.cpp	2015-11-29 06:56:27 +
+++ pcbnew/pcbframe.cpp	2015-12-13 07:17:14 +
@@ -990,7 +990,11 @@
 bool pythonPanelShown = true;
 
 if( pythonPanelFrame == NULL )
-pythonPanelFrame = new PYTHON_CONSOLE_FRAME( this, pythonConsoleNameId() );
+{
+//  pythonPanelFrame = new PYTHON_CONSOLE_FRAME( this, pythonConsoleNameId() );
+pythonPanelFrame = CreatePythonShellWindow( this );
+pythonPanelFrame->SetName(pythonConsoleNameId());
+}
 else
 pythonPanelShown = ! pythonPanelFrame->IsShown();
 

=== modified file 'scripting/python_scripting.cpp'
--- scripting/python_scripting.cpp	2015-08-24 18:32:56 +
+++ scripting/python_scripting.cpp	2015-12-13 07:19:47 +
@@ -231,16 +231,16 @@
 {
 const char* pycrust_panel =
 "import wx\n"
-"from wx.py import shell, version\n"
+"from wx.py import editor, version\n"
 "\n"
 "intro = \"PyCrust %s - KiCAD Python Shell\" % version.VERSION\n"
 "\n"
 "def makeWindow(parent):\n"
-"pycrust = shell.Shell(parent, -1, introText=intro)\n"
+"pycrust = editor.EditorNotebookFrame(parent, id=-1, title=intro)\n"
+"pycrust.Show()\n"
 "return pycrust\n"
 "\n";
 
-
 wxWindow*   window = NULL;
 PyObject*   result;
 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Nick Østergaard
Hi Strotium

I have not really used the python shell that much in KiCad, but will
this also allow tab completion like we see in ipython?

2015-12-11 15:57 GMT+01:00 Strontium :
> Hello Kicad developers,
>
> I have been a very long time follower of kicad and I think the work done to
> it over the years is simply amazing.
> I would love to contribute where I can.
>
> I have had need to play with the python scripting of Kicad.  Kicad uses
> wxpython.
> Wxpython includes within it, a much better shell than the one currently
> being used.
>
> If inside the current python shell, one does this:
>
 import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
 f.Show()
>
> You will see what I am talking about.
>
> It provides a nice way to introspect python state when writing scripts, and
> also includes a simple tabbed text editor.
>
> Its possible this shell could be tweaked to be even better, but even as it
> stands its a LOT better than the default shell.
>
> I am working on a proposed patch to sub the existing shell with this one,
> for further discussion.  I will post it once I test it.
>
> Strontium (Steven J)
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Wayne Stambaugh
I just tried this.  Nice!  This is definitely nicer than the Python
shell we are using.  I'm with Nick, where's the patch?

On 12/12/2015 10:00 AM, Nick Østergaard wrote:
> I have heard that it opens fine on linux, windows and OS X. I don't
> expect it to break anything. I am just waiting for the patch to test
> that.
> 
> 2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
>> What say our Python devs.  I'm fine with it assuming it doesn't break
>> anything (read all platforms).
>>
>> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
>>> I second this suggestion. It's way nicer than the dinky little 
>>> Notepad-with-REPL we're using right now.
>>>
>>> --
>>> Chris
>>>
>>> On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
 Hello Kicad developers,

 I have been a very long time follower of kicad and I think the work done to
 it over the years is simply amazing.
 I would love to contribute where I can.

 I have had need to play with the python scripting of Kicad.  Kicad uses
 wxpython.
 Wxpython includes within it, a much better shell than the one currently
 being used.

 If inside the current python shell, one does this:

>>> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
 f.Show()

 You will see what I am talking about.

 It provides a nice way to introspect python state when writing scripts, and
 also includes a simple tabbed text editor.

 Its possible this shell could be tweaked to be even better, but even as it
 stands its a LOT better than the default shell.

 I am working on a proposed patch to sub the existing shell with this one,
 for further discussion.  I will post it once I test it.

 Strontium (Steven J)




 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Wayne Stambaugh
Duh?  Ignore this.  Sorry for the noise.

On 12/12/2015 12:16 PM, Wayne Stambaugh wrote:
> I finally got a chance to test this patch, I like it.  It works as
> advertised and is very handy.  I have only one minor gripe is that it
> appears to space the fields with the same delta no matter what the text
> size (see screenshot).  It looks like your placing the center of the
> text height at a fixed interval.  This make smaller text (discret:R4 in
> my example) appear further away from larger text.  I would like to see
> the spacing between each line be consistent maybe even a option to
> define what the spacing should be.  Other than that, nice job.  Does
> anyone else have any objections?
> 
> On 12/12/2015 10:00 AM, Nick Østergaard wrote:
>> I have heard that it opens fine on linux, windows and OS X. I don't
>> expect it to break anything. I am just waiting for the patch to test
>> that.
>>
>> 2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
>>> What say our Python devs.  I'm fine with it assuming it doesn't break
>>> anything (read all platforms).
>>>
>>> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
 I second this suggestion. It's way nicer than the dinky little 
 Notepad-with-REPL we're using right now.

 --
 Chris

 On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
> Hello Kicad developers,
>
> I have been a very long time follower of kicad and I think the work done 
> to
> it over the years is simply amazing.
> I would love to contribute where I can.
>
> I have had need to play with the python scripting of Kicad.  Kicad uses
> wxpython.
> Wxpython includes within it, a much better shell than the one currently
> being used.
>
> If inside the current python shell, one does this:
>
 import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
> f.Show()
>
> You will see what I am talking about.
>
> It provides a nice way to introspect python state when writing scripts, 
> and
> also includes a simple tabbed text editor.
>
> Its possible this shell could be tweaked to be even better, but even as it
> stands its a LOT better than the default shell.
>
> I am working on a proposed patch to sub the existing shell with this one,
> for further discussion.  I will post it once I test it.
>
> Strontium (Steven J)
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp

>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
> 


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Wayne Stambaugh
I finally got a chance to test this patch, I like it.  It works as
advertised and is very handy.  I have only one minor gripe is that it
appears to space the fields with the same delta no matter what the text
size (see screenshot).  It looks like your placing the center of the
text height at a fixed interval.  This make smaller text (discret:R4 in
my example) appear further away from larger text.  I would like to see
the spacing between each line be consistent maybe even a option to
define what the spacing should be.  Other than that, nice job.  Does
anyone else have any objections?

On 12/12/2015 10:00 AM, Nick Østergaard wrote:
> I have heard that it opens fine on linux, windows and OS X. I don't
> expect it to break anything. I am just waiting for the patch to test
> that.
> 
> 2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
>> What say our Python devs.  I'm fine with it assuming it doesn't break
>> anything (read all platforms).
>>
>> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
>>> I second this suggestion. It's way nicer than the dinky little 
>>> Notepad-with-REPL we're using right now.
>>>
>>> --
>>> Chris
>>>
>>> On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
 Hello Kicad developers,

 I have been a very long time follower of kicad and I think the work done to
 it over the years is simply amazing.
 I would love to contribute where I can.

 I have had need to play with the python scripting of Kicad.  Kicad uses
 wxpython.
 Wxpython includes within it, a much better shell than the one currently
 being used.

 If inside the current python shell, one does this:

>>> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
 f.Show()

 You will see what I am talking about.

 It provides a nice way to introspect python state when writing scripts, and
 also includes a simple tabbed text editor.

 Its possible this shell could be tweaked to be even better, but even as it
 stands its a LOT better than the default shell.

 I am working on a proposed patch to sub the existing shell with this one,
 for further discussion.  I will post it once I test it.

 Strontium (Steven J)




 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Nick Østergaard
I have heard that it opens fine on linux, windows and OS X. I don't
expect it to break anything. I am just waiting for the patch to test
that.

2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
> What say our Python devs.  I'm fine with it assuming it doesn't break
> anything (read all platforms).
>
> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
>> I second this suggestion. It's way nicer than the dinky little 
>> Notepad-with-REPL we're using right now.
>>
>> --
>> Chris
>>
>> On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
>>> Hello Kicad developers,
>>>
>>> I have been a very long time follower of kicad and I think the work done to
>>> it over the years is simply amazing.
>>> I would love to contribute where I can.
>>>
>>> I have had need to play with the python scripting of Kicad.  Kicad uses
>>> wxpython.
>>> Wxpython includes within it, a much better shell than the one currently
>>> being used.
>>>
>>> If inside the current python shell, one does this:
>>>
>> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
>>> f.Show()
>>>
>>> You will see what I am talking about.
>>>
>>> It provides a nice way to introspect python state when writing scripts, and
>>> also includes a simple tabbed text editor.
>>>
>>> Its possible this shell could be tweaked to be even better, but even as it
>>> stands its a LOT better than the default shell.
>>>
>>> I am working on a proposed patch to sub the existing shell with this one,
>>> for further discussion.  I will post it once I test it.
>>>
>>> Strontium (Steven J)
>>>
>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Adam Wolf
Does this actually work with OS X in KiCad, or just in OS X in general?
Last time I tried to use the python shell in KiCad on OS X you couldn't
enter any key that also was used as a command with a modifier button, and
when I tried to chase it down, it was actually a complicated Wx issue.

This also means that if it does not work in OS X, I do not want that to
hold this patch back.

Adam Wolf

On Sat, Dec 12, 2015 at 11:22 AM, Wayne Stambaugh 
wrote:

> Duh?  Ignore this.  Sorry for the noise.
>
> On 12/12/2015 12:16 PM, Wayne Stambaugh wrote:
> > I finally got a chance to test this patch, I like it.  It works as
> > advertised and is very handy.  I have only one minor gripe is that it
> > appears to space the fields with the same delta no matter what the text
> > size (see screenshot).  It looks like your placing the center of the
> > text height at a fixed interval.  This make smaller text (discret:R4 in
> > my example) appear further away from larger text.  I would like to see
> > the spacing between each line be consistent maybe even a option to
> > define what the spacing should be.  Other than that, nice job.  Does
> > anyone else have any objections?
> >
> > On 12/12/2015 10:00 AM, Nick Østergaard wrote:
> >> I have heard that it opens fine on linux, windows and OS X. I don't
> >> expect it to break anything. I am just waiting for the patch to test
> >> that.
> >>
> >> 2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
> >>> What say our Python devs.  I'm fine with it assuming it doesn't break
> >>> anything (read all platforms).
> >>>
> >>> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
>  I second this suggestion. It's way nicer than the dinky little
> Notepad-with-REPL we're using right now.
> 
>  --
>  Chris
> 
>  On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
> > Hello Kicad developers,
> >
> > I have been a very long time follower of kicad and I think the work
> done to
> > it over the years is simply amazing.
> > I would love to contribute where I can.
> >
> > I have had need to play with the python scripting of Kicad.  Kicad
> uses
> > wxpython.
> > Wxpython includes within it, a much better shell than the one
> currently
> > being used.
> >
> > If inside the current python shell, one does this:
> >
>  import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad
> PCB");
> > f.Show()
> >
> > You will see what I am talking about.
> >
> > It provides a nice way to introspect python state when writing
> scripts, and
> > also includes a simple tabbed text editor.
> >
> > Its possible this shell could be tweaked to be even better, but even
> as it
> > stands its a LOT better than the default shell.
> >
> > I am working on a proposed patch to sub the existing shell with this
> one,
> > for further discussion.  I will post it once I test it.
> >
> > Strontium (Steven J)
> >
> >
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> 
>  ___
>  Mailing list: https://launchpad.net/~kicad-developers
>  Post to : kicad-developers@lists.launchpad.net
>  Unsubscribe : https://launchpad.net/~kicad-developers
>  More help   : https://help.launchpad.net/ListHelp
> 
> >>>
> >>>
> >>> ___
> >>> Mailing list: https://launchpad.net/~kicad-developers
> >>> Post to : kicad-developers@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~kicad-developers
> >>> More help   : https://help.launchpad.net/ListHelp
> >
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Garth Corral
This appears to be fixed.

> On Dec 12, 2015, at 11:09 AM, Nick Østergaard  wrote:
> 
> AFIK that issue has been fixed, but I don't really know for sure,
> since I don't have OS X.
> 
> 2015-12-12 19:55 GMT+01:00 Adam Wolf :
>> Does this actually work with OS X in KiCad, or just in OS X in general?
>> Last time I tried to use the python shell in KiCad on OS X you couldn't
>> enter any key that also was used as a command with a modifier button, and
>> when I tried to chase it down, it was actually a complicated Wx issue.
>> 
>> This also means that if it does not work in OS X, I do not want that to hold
>> this patch back.
>> 
>> Adam Wolf
>> 
>> On Sat, Dec 12, 2015 at 11:22 AM, Wayne Stambaugh 
>> wrote:
>>> 
>>> Duh?  Ignore this.  Sorry for the noise.
>>> 
>>> On 12/12/2015 12:16 PM, Wayne Stambaugh wrote:
 I finally got a chance to test this patch, I like it.  It works as
 advertised and is very handy.  I have only one minor gripe is that it
 appears to space the fields with the same delta no matter what the text
 size (see screenshot).  It looks like your placing the center of the
 text height at a fixed interval.  This make smaller text (discret:R4 in
 my example) appear further away from larger text.  I would like to see
 the spacing between each line be consistent maybe even a option to
 define what the spacing should be.  Other than that, nice job.  Does
 anyone else have any objections?
 
 On 12/12/2015 10:00 AM, Nick Østergaard wrote:
> I have heard that it opens fine on linux, windows and OS X. I don't
> expect it to break anything. I am just waiting for the patch to test
> that.
> 
> 2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
>> What say our Python devs.  I'm fine with it assuming it doesn't break
>> anything (read all platforms).
>> 
>> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
>>> I second this suggestion. It's way nicer than the dinky little
>>> Notepad-with-REPL we're using right now.
>>> 
>>> --
>>> Chris
>>> 
>>> On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
 Hello Kicad developers,
 
 I have been a very long time follower of kicad and I think the work
 done to
 it over the years is simply amazing.
 I would love to contribute where I can.
 
 I have had need to play with the python scripting of Kicad.  Kicad
 uses
 wxpython.
 Wxpython includes within it, a much better shell than the one
 currently
 being used.
 
 If inside the current python shell, one does this:
 
>>> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad
>>> PCB");
 f.Show()
 
 You will see what I am talking about.
 
 It provides a nice way to introspect python state when writing
 scripts, and
 also includes a simple tabbed text editor.
 
 Its possible this shell could be tweaked to be even better, but even
 as it
 stands its a LOT better than the default shell.
 
 I am working on a proposed patch to sub the existing shell with this
 one,
 for further discussion.  I will post it once I test it.
 
 Strontium (Steven J)
 
 
 
 
 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
>>> 
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>> 
>> 
>> 
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
 
>>> 
>>> 
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>> 
>> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : 

Re: [Kicad-developers] Enhanced Python Shell

2015-12-12 Thread Nick Østergaard
AFIK that issue has been fixed, but I don't really know for sure,
since I don't have OS X.

2015-12-12 19:55 GMT+01:00 Adam Wolf :
> Does this actually work with OS X in KiCad, or just in OS X in general?
> Last time I tried to use the python shell in KiCad on OS X you couldn't
> enter any key that also was used as a command with a modifier button, and
> when I tried to chase it down, it was actually a complicated Wx issue.
>
> This also means that if it does not work in OS X, I do not want that to hold
> this patch back.
>
> Adam Wolf
>
> On Sat, Dec 12, 2015 at 11:22 AM, Wayne Stambaugh 
> wrote:
>>
>> Duh?  Ignore this.  Sorry for the noise.
>>
>> On 12/12/2015 12:16 PM, Wayne Stambaugh wrote:
>> > I finally got a chance to test this patch, I like it.  It works as
>> > advertised and is very handy.  I have only one minor gripe is that it
>> > appears to space the fields with the same delta no matter what the text
>> > size (see screenshot).  It looks like your placing the center of the
>> > text height at a fixed interval.  This make smaller text (discret:R4 in
>> > my example) appear further away from larger text.  I would like to see
>> > the spacing between each line be consistent maybe even a option to
>> > define what the spacing should be.  Other than that, nice job.  Does
>> > anyone else have any objections?
>> >
>> > On 12/12/2015 10:00 AM, Nick Østergaard wrote:
>> >> I have heard that it opens fine on linux, windows and OS X. I don't
>> >> expect it to break anything. I am just waiting for the patch to test
>> >> that.
>> >>
>> >> 2015-12-11 20:36 GMT+01:00 Wayne Stambaugh :
>> >>> What say our Python devs.  I'm fine with it assuming it doesn't break
>> >>> anything (read all platforms).
>> >>>
>> >>> On 12/11/2015 10:03 AM, Chris Pavlina wrote:
>>  I second this suggestion. It's way nicer than the dinky little
>>  Notepad-with-REPL we're using right now.
>> 
>>  --
>>  Chris
>> 
>>  On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
>> > Hello Kicad developers,
>> >
>> > I have been a very long time follower of kicad and I think the work
>> > done to
>> > it over the years is simply amazing.
>> > I would love to contribute where I can.
>> >
>> > I have had need to play with the python scripting of Kicad.  Kicad
>> > uses
>> > wxpython.
>> > Wxpython includes within it, a much better shell than the one
>> > currently
>> > being used.
>> >
>> > If inside the current python shell, one does this:
>> >
>>  import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad
>>  PCB");
>> > f.Show()
>> >
>> > You will see what I am talking about.
>> >
>> > It provides a nice way to introspect python state when writing
>> > scripts, and
>> > also includes a simple tabbed text editor.
>> >
>> > Its possible this shell could be tweaked to be even better, but even
>> > as it
>> > stands its a LOT better than the default shell.
>> >
>> > I am working on a proposed patch to sub the existing shell with this
>> > one,
>> > for further discussion.  I will post it once I test it.
>> >
>> > Strontium (Steven J)
>> >
>> >
>> >
>> >
>> > ___
>> > Mailing list: https://launchpad.net/~kicad-developers
>> > Post to : kicad-developers@lists.launchpad.net
>> > Unsubscribe : https://launchpad.net/~kicad-developers
>> > More help   : https://help.launchpad.net/ListHelp
>> 
>>  ___
>>  Mailing list: https://launchpad.net/~kicad-developers
>>  Post to : kicad-developers@lists.launchpad.net
>>  Unsubscribe : https://launchpad.net/~kicad-developers
>>  More help   : https://help.launchpad.net/ListHelp
>> 
>> >>>
>> >>>
>> >>> ___
>> >>> Mailing list: https://launchpad.net/~kicad-developers
>> >>> Post to : kicad-developers@lists.launchpad.net
>> >>> Unsubscribe : https://launchpad.net/~kicad-developers
>> >>> More help   : https://help.launchpad.net/ListHelp
>> >
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>
>

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Enhanced Python Shell

2015-12-11 Thread Strontium

Hello Kicad developers,

I have been a very long time follower of kicad and I think the work done 
to it over the years is simply amazing.

I would love to contribute where I can.

I have had need to play with the python scripting of Kicad.  Kicad uses 
wxpython.
Wxpython includes within it, a much better shell than the one currently 
being used.


If inside the current python shell, one does this:

>>> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB"); 
f.Show()


You will see what I am talking about.

It provides a nice way to introspect python state when writing scripts, 
and also includes a simple tabbed text editor.


Its possible this shell could be tweaked to be even better, but even as 
it stands its a LOT better than the default shell.


I am working on a proposed patch to sub the existing shell with this 
one, for further discussion.  I will post it once I test it.


Strontium (Steven J)




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-11 Thread Chris Pavlina
I second this suggestion. It's way nicer than the dinky little 
Notepad-with-REPL we're using right now.

--
Chris

On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
> Hello Kicad developers,
> 
> I have been a very long time follower of kicad and I think the work done to
> it over the years is simply amazing.
> I would love to contribute where I can.
> 
> I have had need to play with the python scripting of Kicad.  Kicad uses
> wxpython.
> Wxpython includes within it, a much better shell than the one currently
> being used.
> 
> If inside the current python shell, one does this:
> 
> >>> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
> f.Show()
> 
> You will see what I am talking about.
> 
> It provides a nice way to introspect python state when writing scripts, and
> also includes a simple tabbed text editor.
> 
> Its possible this shell could be tweaked to be even better, but even as it
> stands its a LOT better than the default shell.
> 
> I am working on a proposed patch to sub the existing shell with this one,
> for further discussion.  I will post it once I test it.
> 
> Strontium (Steven J)
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Enhanced Python Shell

2015-12-11 Thread Wayne Stambaugh
What say our Python devs.  I'm fine with it assuming it doesn't break
anything (read all platforms).

On 12/11/2015 10:03 AM, Chris Pavlina wrote:
> I second this suggestion. It's way nicer than the dinky little 
> Notepad-with-REPL we're using right now.
> 
> --
> Chris
> 
> On Fri, Dec 11, 2015 at 10:57:26PM +0800, Strontium wrote:
>> Hello Kicad developers,
>>
>> I have been a very long time follower of kicad and I think the work done to
>> it over the years is simply amazing.
>> I would love to contribute where I can.
>>
>> I have had need to play with the python scripting of Kicad.  Kicad uses
>> wxpython.
>> Wxpython includes within it, a much better shell than the one currently
>> being used.
>>
>> If inside the current python shell, one does this:
>>
> import wx; f = wx.py.editor.EditorNotebookFrame(title="KiCad PCB");
>> f.Show()
>>
>> You will see what I am talking about.
>>
>> It provides a nice way to introspect python state when writing scripts, and
>> also includes a simple tabbed text editor.
>>
>> Its possible this shell could be tweaked to be even better, but even as it
>> stands its a LOT better than the default shell.
>>
>> I am working on a proposed patch to sub the existing shell with this one,
>> for further discussion.  I will post it once I test it.
>>
>> Strontium (Steven J)
>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp