python for EE CAD program

2007-06-04 Thread chewie54
Hi All,

I have read some posts on this subject but I haven't been able to make
a decision whether to use Python or not.

I'm considering converting a Java CAD program to Python/C with
wxWdigets for the GUI.

I don't have good answers for:

1)  Can I use py2exe or pyinstaller to produce an executable for
Linux, Windows, and Mac?  If not,  is there a way it can be done?

2)  Is there any way to protect the source code,  like obfuscation?

3)  Memory footprint of application seems large for python demo. Is
this typical for large python applications?

I guess the best thing to do is convert a little portion of the Java
program and see how  it works out with respect to the concerns above.

Suggestions and comments appreciated.

-- 
http://mail.python.org/mailman/listinfo/python-list


python for EE CAD program

2007-06-04 Thread chewie54
Hi All,

I have read some posts on this subject but I haven't been able to make
a decision whether to use Python or not.

I'm considering converting a Java CAD program to Python/C with
wxWdigets for the GUI.

I don't have good answers for:

1)  Can I use py2exe or pyinstaller to produce an executable for
Linux, Windows, and Mac?  If not,  is there a way it can be done?

2)  Is there any way to protect the source code,  like obfuscation?

3)  Memory footprint of application seems large for python demo. Is
this typical for large python applications?

I guess the best thing to do is convert a little portion of the Java
program and see how  it works out with respect to the concerns above.

Suggestions and comments appreciated.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python for EE CAD program

2007-06-04 Thread chewie54
On Jun 4, 9:56 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> chewie54 wrote:
> > Hi All,
>
> > I have read some posts on this subject but I haven't been able to make
> > a decision whether to use Python or not.
>
> > I'm considering converting a Java CAD program to Python/C with
> > wxWdigets for the GUI.
>
> > I don't have good answers for:
>
> > 1)  Can I use py2exe or pyinstaller to produce an executable for
> > Linux, Windows, and Mac?  If not,  is there a way it can be done?
>
> > 2)  Is there any way to protect the source code,  like obfuscation?
>
> > 3)  Memory footprint of application seems large for python demo. Is
> > this typical for large python applications?
>
> > I guess the best thing to do is convert a little portion of the Java
> > program and see how  it works out with respect to the concerns above.
>
> > Suggestions and comments appreciated.
>
> Look at python-cad, that might give you an idea how such a thing is to be
> accomplished using python.
>
> Diez


Hello Diez,

I did look at PythonCad but the distribution and install methods for
Windows is not user freindly. Since the public domain software,  I
don't think they protect the source code either.


-- 
http://mail.python.org/mailman/listinfo/python-list


wxPython splitwindow with interpreter on bottom

2007-06-04 Thread chewie54
Hi all,

Does anyone know of an example of wxPython source code that shows how
to put a python shell (interpreter) in a bottom window with a
graphical application in the top window?

Thanks,

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python for EE CAD program

2007-06-04 Thread chewie54
On Jun 4, 10:58 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > Hello Diez,
>
> > I did look at PythonCad but the distribution and install methods for
> > Windows is not user freindly. Since the public domain software,  I
> > don't think they protect the source code either.
>
> The subject of code obfuscation in python has been beaten to death quite a
> few times on this list, do a search to find anything you want to know.
>
> In a nutshell: forget about it. it's not worth it, difficult to accomplish
> due to the dynamic nature of python and to be brutally honest: more or less
> nothing you can come up with in your own code is really worth looking at
> anyway. That's not saying that you can't code, just that more or less
> everything one programs is trivial and only of value in the actual context
> it was written in. So nobody is really interested in ripping stuff out.
>
> diez


Your opinions are noted, thank you,  but I don't agree with you.
There are
portions of the code that are under review for patents and as such
need to
be protected.

I'm investigating whether Python is the right language to use
for a commercial CAD application. While I think Python is a great
scripting
language, there seems to limitations with regards to packaging and
distributing
programs.







-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python for EE CAD program

2007-06-04 Thread chewie54
On Jun 4, 12:47 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-06-04, Chris Mellon <[EMAIL PROTECTED]> wrote:
>
>
>
> >> Your opinions are noted, thank you, but I don't agree with
> >> you. There are portions of the code that are under review for
> >> patents and as such need to be protected.
>
> > For the record: This is not true. If you've already applied
> > for the patent, you have as much legal protection as you will
> > ever get. Also, since patents apply to methods and not to
> > literal source, if you're trying to protect something
> > patentable you have even less protection against analysis and
> > disassembly than you would if you were trying to protect the
> > copyright on the code. If you need to make a token effort to
> > satisfy whatever legal hurdles are involved, shipping .pyc
> > files (which py2exe and all the other packagers I'm aware of
> > do) is just as effective as shipping executables compiled with
> > C or C++.
>
> >> I'm investigating whether Python is the right language to use
> >> for a commercial CAD application. While I think Python is a
> >> great scripting language, there seems to limitations with
> >> regards to packaging and distributing programs.
>
> > None that don't also exist in every other language in
> > existence. These are fundamental issues of information theory,
> > not language constraints.
>
> Especially since the alternative appears to be Java.  Just like
> Java, Python compiles to byte code that runs on a VM.
>
> If for some reason he's happy shipping Java VM byte-code and
> not Python VM byte-code, then he can use Jython to generate
> byte-code for the Java VM instead of for the Python VM.
> Personally I think it's rather deluded to think that one is any
> more secure than the other.
>
> --
> Grant Edwards   grante Yow! What UNIVERSE is this,
>   at   please??
>visi.com


Honestly, thank you for your opinions and suggestions.  I know this
has been
discussed before on this forum, but after reading the discussions,
I'm still
unsure about question 1.  This is a big step and I want to make sure,
if
possible, I don't run into any show stoppers after many man hours of
work.

I will put the sensitive stuff and the datbase in a C extension and I
think that solves question 2 for me.





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython splitwindow with interpreter on bottom

2007-06-04 Thread chewie54
On Jun 4, 4:36 pm, [EMAIL PROTECTED] wrote:
> On Jun 4, 9:57 am, chewie54 <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > Does anyone know of an example of wxPython source code that shows how
> > to put a python shell (interpreter) in a bottom window with a
> > graphical application in the top window?
>
> > Thanks,
>
> There's the pyCrust/pyShell examples in the wxPython demo. They are
> quite similar to what you want, I think.
>
> Mike



Thank you.  Yes,  that is exactly what I want.

-- 
http://mail.python.org/mailman/listinfo/python-list


best GUI library for vector drawing program

2007-08-17 Thread chewie54
Hello,

What would be the best cross-platform GUI library to use for a vector
based CAD program ( something like Visio on Windows )   WxWidgets,
Tk,   PyQt,  Java Swing,  Java SWT,   I need the capibility to
draw and edit in a window that looks like a page of paper so WYSIWYG
is very important,  and I need to save the drawings in vector based
file formats like PS, EPS,  SVG, as well as image formats like jpg,
png, and gif.  Also, the images need to be high resolution so that
they can be pasted into various other programs in Windows OS,  and
Linux OS,  and the Mac OS.

Thanks in advance,
Dan

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: best GUI library for vector drawing program

2007-08-17 Thread chewie54
On Aug 17, 9:45 am, "Victor Bazarov" <[EMAIL PROTECTED]> wrote:
> chewie54 wrote:
> > What would be the best cross-platform GUI library to use for a vector
> > based CAD program ( something like Visio on Windows )   WxWidgets,
> > Tk,   PyQt,  Java Swing,  Java SWT,   I need the capibility to
> > draw and edit in a window that looks like a page of paper so WYSIWYG
> > is very important,  and I need to save the drawings in vector based
> > file formats like PS, EPS,  SVG, as well as image formats like jpg,
> > png, and gif.  Also, the images need to be high resolution so that
> > they can be pasted into various other programs in Windows OS,  and
> > Linux OS,  and the Mac OS.
>
> You might actually consider asking in the 'comp.graphics' hierarchy
> instead of the language newsgroups.
>
> V
> --
> Please remove capital 'A's when replying by e-mail
> I do not respond to top-posted replies, please don't ask

That group doesn't seem to be active anymore.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: best GUI library for vector drawing program

2007-08-17 Thread chewie54
On Aug 17, 12:08 pm, Jeremy Sanders  wrote:
> chewie54 wrote:
> > What would be the best cross-platform GUI library to use for a vector
> > based CAD program ( something like Visio on Windows )   WxWidgets,
> > Tk,   PyQt,  Java Swing,  Java SWT,   I need the capibility to
> > draw and edit in a window that looks like a page of paper so WYSIWYG
> > is very important,  and I need to save the drawings in vector based
> > file formats like PS, EPS,  SVG, as well as image formats like jpg,
> > png, and gif.  Also, the images need to be high resolution so that
> > they can be pasted into various other programs in Windows OS,  and
> > Linux OS,  and the Mac OS.
>
> PyQt/Qt4 is capable of that (SVG export was added in Qt4.3).
>
> I have a graph drawing application based around it (Veusz).
>
> If you base everything around QPainter, you'll be able to write to any of
> those output formats (including eps and pdf), and bitmaps. Antialiasing is
> optional for bitmap formats.
>
> Jeremy
>
> --
> Jeremy Sandershttp://www.jeremysanders.net/

Jeremy,

I looked at your application, Veusz (it looks very nice),  and I see
you have binary distrubitions
for each os.  Is is difficult to build these binaries for each
system.  Could
you tell me how that is done?

Thanks,
Dan

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: best GUI library for vector drawing program

2007-08-17 Thread chewie54
On Aug 17, 9:27 am, chewie54 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> What would be the best cross-platform GUI library to use for a vector
> based CAD program ( something like Visio on Windows )   WxWidgets,
> Tk,   PyQt,  Java Swing,  Java SWT,   I need the capibility to
> draw and edit in a window that looks like a page of paper so WYSIWYG
> is very important,  and I need to save the drawings in vector based
> file formats like PS, EPS,  SVG, as well as image formats like jpg,
> png, and gif.  Also, the images need to be high resolution so that
> they can be pasted into various other programs in Windows OS,  and
> Linux OS,  and the Mac OS.
>
> Thanks in advance,
> Dan

Also,  I forgot to mention that it must have scripting capabilities so
and I would like to embed a Tcl or Python interpreter.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: best GUI library for vector drawing program

2007-08-17 Thread chewie54
On Aug 17, 12:07 pm, chewie54 <[EMAIL PROTECTED]> wrote:
> On Aug 17, 9:27 am, chewie54 <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > What would be the best cross-platform GUI library to use for a vector
> > based CAD program ( something like Visio on Windows )   WxWidgets,
> > Tk,   PyQt,  Java Swing,  Java SWT,   I need the capibility to
> > draw and edit in a window that looks like a page of paper so WYSIWYG
> > is very important,  and I need to save the drawings in vector based
> > file formats like PS, EPS,  SVG, as well as image formats like jpg,
> > png, and gif.  Also, the images need to be high resolution so that
> > they can be pasted into various other programs in Windows OS,  and
> > Linux OS,  and the Mac OS.
>
> > Thanks in advance,
> > Dan
>
> Also,  I forgot to mention that it must have scripting capabilities so
> and I would like to embed a Tcl or Python interpreter.

I should have also mentioned that is for a commercial application.
That
doesn't rule Qt or PyQt out,  but this is a startup company with very
little income so my first choice would be to use some GUI library
that
is free to use for commercial apps.


Thanks again,
Dan


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: best GUI library for vector drawing program

2007-08-20 Thread chewie54
On Aug 20, 3:04 am, Mats <[EMAIL PROTECTED]> wrote:
> If you want to stay within Tcl/Tk you could take a look at my tkpath
> package:http://tclbitprint.sf.net/
> and 
> shots:http://tclbitprint.sourceforge.net/tkpath/quartz/index.htmlhttp://tclbitprint.sourceforge.net/tkpath/gdiplus/index.htmlhttp://tclbitprint.sourceforge.net/tkpath/cairo/index.html
>
> Mats

Very nice. Are all the features functional?   I was reading that Cairo
is cross-platform so can I use your tkpath package with Cairo for all
the platforms?

Have you implemented the save as pdf,  ps, and svg vector file
formats?

Thanks for your feedback.
Dan

-- 
http://mail.python.org/mailman/listinfo/python-list


what version python and wxPython comes with Mac OS X Leopard

2007-10-20 Thread chewie54
Hi All,

Does anyone know what version of Python and wxPython comes with the
new Mac OS X Leopard?

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


does PyAntlr come with Antlr download

2007-10-23 Thread chewie54
Hello All,

I want use java2python which requires PyAntlr.I can't seem to find
PyAntlr mentioned on the main website for Antlr.

Thanks,

-- 
http://mail.python.org/mailman/listinfo/python-list


good example of C extension for Mac OS X

2007-10-27 Thread chewie54
Hi All,

Does anyone now of a good example to use as template for a  C program
extension that needs to be built on the Mac OS X.

Thanks,

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: good example of C extension for Mac OS X

2007-10-27 Thread chewie54
On Oct 27, 2:59 pm, MrJean1 <[EMAIL PROTECTED]> wrote:
> There is a C template in file Modules/xxmodule.c in Python 2.5, maybe
> earlier.
>
> /Jean Brouwers
>
> On Oct 27, 8:11 am, chewie54 <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > Does anyone now of a good example to use as template for a  C program
> > extension that needs to be built on the Mac OS X.
>
> > Thanks,

I have looked at the docs on the python.org but specifically looking
for
examples showing how to deal with linked lists and more about when to
use
references Py_INCREF and Py_DECREF

I didn't find Modules/xxmodule.c on my Mac OS X installation.


Thanks again

-- 
http://mail.python.org/mailman/listinfo/python-list


what version python and wxPython comes with Mac OS X Leopard

2007-10-29 Thread chewie54
Hello,

Anyone using Leopard know which versions of Python and wxPython and
any other Python related modules are default with the new OS?

Thanks,

-- 
http://mail.python.org/mailman/listinfo/python-list


why did these companies choose Tcl over Python

2007-10-30 Thread chewie54
Hello,

As an electronics engineer I use some very expensive EDA CAD tool
programs that are scriptable using Tcl.  I was wondering why these
companies have choose to use Tcl instead of Python.   Some of these
are:

   Mentor Graphics ModelTech VHDL and Verilog simulator
   Synopsys  Design Compiler and Primetime Static Timing Analyzer
   Actel FPGA tools.

Tcl seems to very popular in my business as the scripting language of
choice.

I'm in the process of deciding to use Tcl or Python for a CAD tool
program that I have been working on.Most of the core of the
program,  the database,   will be done is C as an extension to either
Tcl or Python,   but I intend to use Tk or wxPthon for the GUI.   I do
need publishing quality outputs from drawings done on a graphics
device that are scaled to standard printer paper sizes.


I would prefer to use Python but can't deny how popular Tcl is,  as
mentioned above,  so my question is why wasn't Python selected by
these companies as the choice of scripting languages for their
product?

Are there any obvious advantages like:

performance,
memory footprint,
better cross-platform support,
ease of use,


Thanks in advance for your thoughts about this.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: why did these companies choose Tcl over Python

2007-10-31 Thread chewie54
On Oct 31, 3:06 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> chewie54 <[EMAIL PROTECTED]> wrote:
>
> >As an electronics engineer I use some very expensive EDA CAD tool
> >programs that are scriptable using Tcl.  I was wondering why these
> >companies have choose to use Tcl instead of Python.   Some of these
> >are:
>
> >   Mentor Graphics ModelTech VHDL and Verilog simulator
> >   Synopsys  Design Compiler and Primetime Static Timing Analyzer
> >   Actel FPGA tools.
>
> Well, I recently did a development contract for Mentor, and the RFQ gave me
> the choice of doing the library binding and diagnostic GUI in either Tcl or
> Python.  Naturally, I chose Python (and wxPython), and both the client and
> I are quite happy with the result.
>
> (Actually, I did a Tcl binding for them as well, and just writing the text
> scripts reinforced my dislike for it...)
> --
> Tim Roberts, [EMAIL PROTECTED]
> Providenza & Boekelheide, Inc.

Hi Tim,

I would like to use Python and C and wxWidgets for my EDA CAD program.
I want
to put most of the program core in an Python extension and GUI in
wxWidgets.

I do need to get publishing quality vector graphics outputs from this
program so
one of my concerns is if the wxWidgets will work for this or will I
have to use
something like openGL or Cairo.

Did your work for Mentor include a high quality graphics output?

Thanks,






-- 
http://mail.python.org/mailman/listinfo/python-list


source example including the python shell in a wxPython application

2007-11-01 Thread chewie54
Is there an python example that shows how to include a python shell in
a wxPython application.

I have looked the wxPython demo  but I was wondering if there are any
others that might be helpful in seeing how to connect the shell into
the app and allow scripting so that the shell knows all about the app
classes and variables.

thanks,

-- 
http://mail.python.org/mailman/listinfo/python-list


eclipse for developing and debugging python C or C++ extensions

2007-11-13 Thread chewie54
Hi All,

Has anyone used eclipse to develop and debug c or c++ extensions for
python?
Is it possible to you PyDev and CDT with eclipes to get an integrated
environment in which I could debug both Python and C using the
debuggers in each plugin respectively?

If not,   how do others develop and debug c or c++ python
extensions?

I use a Mac for development but would switch to Windows or Linux if
needed to get a better development environment.

Thanks in advance,

-- 
http://mail.python.org/mailman/listinfo/python-list


cross-platform c questions

2007-11-13 Thread chewie54
Hi All,

When writing a python c extension for needs to be compiled for
Windows,   Linux, and the Mac,
what cross-platform differences need to be  accounted for?   Are there
functions in the python api to deal with the differences? For
example,   byte ordering,   how is that controlled?


Thanks in advance,

-- 
http://mail.python.org/mailman/listinfo/python-list


embed ipython in wxPython app

2007-11-18 Thread chewie54
Hi All,

I'm evaluting IPython to see if I can it use like Tcl and Tk. If I
start wish8.4,  I get a command line
interpreter in xterm,  then I can source tcl progams that draw tk
graphics on a canvas in another window.

Is there a way to embed IPython in a wxPython app to do that?
When I do as shown in the example below the GUI window does not show
until I exit IPython.

Thanks in advance for any help with this,



import wx
from IPython.Shell import IPShellEmbed

class MyFrame(wx.Frame):
def __init__(self,parent=None, id=-1, title=' '):
wx.Frame.__init__(self,parent,id,title,size=(200,140))
top = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL)
lb = wx.StaticText(top,-1,'Animals(in pairs; min,pair,
max,dozen)')
sizer.Add(lb)

top.SetSizer(sizer)
self.Layout()

class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(title="wxWidgets")
frame.Show(True)
self.SetTopWindow(frame)
return True

def main():
ipshell = IPShellEmbed()
ipshell()
app = MyApp()
app.MainLoop()

if __name__ == '__main__':
main()
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: embed ipython in wxPython app

2007-11-19 Thread chewie54
On Nov 18, 8:39 pm, chewie54 <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm evaluting IPython to see if I can it use like Tcl and Tk. If I
> start wish8.4,  I get a command line
> interpreter in xterm,  then I can source tcl progams that draw tk
> graphics on a canvas in another window.
>
> Is there a way to embed IPython in a wxPython app to do that?
> When I do as shown in the example below the GUI window does not show
> until I exit IPython.
>
> Thanks in advance for any help with this,
>
> import wx
> from IPython.Shell import IPShellEmbed
>
> class MyFrame(wx.Frame):
> def __init__(self,parent=None, id=-1, title=' '):
> wx.Frame.__init__(self,parent,id,title,size=(200,140))
> top = wx.Panel(self)
> sizer = wx.BoxSizer(wx.VERTICAL)
> lb = wx.StaticText(top,-1,'Animals(in pairs; min,pair,
> max,dozen)')
> sizer.Add(lb)
>
> top.SetSizer(sizer)
> self.Layout()
>
> class MyApp(wx.App):
> def OnInit(self):
> frame = MyFrame(title="wxWidgets")
> frame.Show(True)
> self.SetTopWindow(frame)
> return True
>
> def main():
> ipshell = IPShellEmbed()
> ipshell()
> app = MyApp()
> app.MainLoop()
>
> if __name__ == '__main__':
> main()

I forgot to mention.

I did see an example of embedding IPython in a PyGTK app on
http://ipython.scipy.org/moin/Cookbook

It would be nice to see an example that shows how to embed
IPython in a wxPython or Tkinter GUI app.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: embed ipython in wxPython app

2007-11-19 Thread chewie54
On Nov 19, 1:07 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Nov 19, 2007 11:51 AM, chewie54 <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Nov 18, 8:39 pm, chewie54 <[EMAIL PROTECTED]> wrote:
> > > Hi All,
>
> > > I'm evaluting IPython to see if I can it use like Tcl and Tk. If I
> > > start wish8.4,  I get a command line
> > > interpreter in xterm,  then I can source tcl progams that draw tk
> > > graphics on a canvas in another window.
>
> > > Is there a way to embed IPython in a wxPython app to do that?
> > > When I do as shown in the example below the GUI window does not show
> > > until I exit IPython.
>
> > > Thanks in advance for any help with this,
>
> > > import wx
> > > from IPython.Shell import IPShellEmbed
>
> > > class MyFrame(wx.Frame):
> > > def __init__(self,parent=None, id=-1, title=' '):
> > > wx.Frame.__init__(self,parent,id,title,size=(200,140))
> > > top = wx.Panel(self)
> > > sizer = wx.BoxSizer(wx.VERTICAL)
> > > lb = wx.StaticText(top,-1,'Animals(in pairs; min,pair,
> > > max,dozen)')
> > > sizer.Add(lb)
>
> > > top.SetSizer(sizer)
> > > self.Layout()
>
> > > class MyApp(wx.App):
> > > def OnInit(self):
> > > frame = MyFrame(title="wxWidgets")
> > > frame.Show(True)
> > > self.SetTopWindow(frame)
> > > return True
>
> > > def main():
> > > ipshell = IPShellEmbed()
> > > ipshell()
> > > app = MyApp()
> > > app.MainLoop()
>
> > > if __name__ == '__main__':
> > > main()
>
> > I forgot to mention.
>
> > I did see an example of embedding IPython in a PyGTK app on
> >http://ipython.scipy.org/moin/Cookbook
>
> > It would be nice to see an example that shows how to embed
> > IPython in a wxPython or Tkinter GUI app.
>
> IPython has a custom event loop. You'll need to look at it's sources
> and figure out how to drive it externally. There's some plugins for
> IPython that may help (or may even work out of the box), they're used
> to let you run wx or gtk or other libraries that have their own event
> loop within IPython.
>
> Are you aware that wx already has a Python shell implementation? It's
> different than IPython, of course, but it has graphical inspection of
> objects which is the main reason people tend to use IPython.

Yes,  I have seen the wxPython demo and PyShell example but was
looking
to use IPython since the user can navigate directories like other
unix
shells.

What are these plugins you mentioned?

Thanks,


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: embed ipython in wxPython app

2007-11-19 Thread chewie54
On Nov 19, 1:44 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Nov 19, 2007 12:21 PM, chewie54 <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Nov 19, 1:07 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 19, 2007 11:51 AM, chewie54 <[EMAIL PROTECTED]> wrote:
>
> > > > On Nov 18, 8:39 pm, chewie54 <[EMAIL PROTECTED]> wrote:
> > > > > Hi All,
>
> > > > > I'm evaluting IPython to see if I can it use like Tcl and Tk. If I
> > > > > start wish8.4,  I get a command line
> > > > > interpreter in xterm,  then I can source tcl progams that draw tk
> > > > > graphics on a canvas in another window.
>
> > > > > Is there a way to embed IPython in a wxPython app to do that?
> > > > > When I do as shown in the example below the GUI window does not show
> > > > > until I exit IPython.
>
> > > > > Thanks in advance for any help with this,
>
> > > > > import wx
> > > > > from IPython.Shell import IPShellEmbed
>
> > > > > class MyFrame(wx.Frame):
> > > > > def __init__(self,parent=None, id=-1, title=' '):
> > > > > wx.Frame.__init__(self,parent,id,title,size=(200,140))
> > > > > top = wx.Panel(self)
> > > > > sizer = wx.BoxSizer(wx.VERTICAL)
> > > > > lb = wx.StaticText(top,-1,'Animals(in pairs; min,pair,
> > > > > max,dozen)')
> > > > > sizer.Add(lb)
>
> > > > > top.SetSizer(sizer)
> > > > > self.Layout()
>
> > > > > class MyApp(wx.App):
> > > > > def OnInit(self):
> > > > > frame = MyFrame(title="wxWidgets")
> > > > > frame.Show(True)
> > > > > self.SetTopWindow(frame)
> > > > > return True
>
> > > > > def main():
> > > > > ipshell = IPShellEmbed()
> > > > > ipshell()
> > > > > app = MyApp()
> > > > > app.MainLoop()
>
> > > > > if __name__ == '__main__':
> > > > > main()
>
> > > > I forgot to mention.
>
> > > > I did see an example of embedding IPython in a PyGTK app on
> > > >http://ipython.scipy.org/moin/Cookbook
>
> > > > It would be nice to see an example that shows how to embed
> > > > IPython in a wxPython or Tkinter GUI app.
>
> > > IPython has a custom event loop. You'll need to look at it's sources
> > > and figure out how to drive it externally. There's some plugins for
> > > IPython that may help (or may even work out of the box), they're used
> > > to let you run wx or gtk or other libraries that have their own event
> > > loop within IPython.
>
> > > Are you aware that wx already has a Python shell implementation? It's
> > > different than IPython, of course, but it has graphical inspection of
> > > objects which is the main reason people tend to use IPython.
>
> > Yes,  I have seen the wxPython demo and PyShell example but was
> > looking
> > to use IPython since the user can navigate directories like other
> > unix
> > shells.
>
> > What are these plugins you mentioned?
>
> http://ipython.scipy.org/moin/Cookbook/InterruptingThreads
>
> I'm not sure how these work (the wiki page implies they just run the
> external event loop in a thread, so they're not suitable for embedding
> IPython in such a tool kit). I'm sure there's a way to pump IPython
> though (there must be, since it's embeddable in gtk) so that's where
> you'll want to look.

This was helpful.

ipython -wxthread

run test1_python.py

and the GUI window was displayed and I can see my object definitions.

I'm getting closer,  now I need to imbed ipython -wxthread shell in
the app somehow.


Thanks,
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Will Python on day replace MATLAB?????????????????????????????????????????????????????

2008-01-31 Thread chewie54
> I have been evaluating the python environment ever more closer.  I
> believe I can interface python with a development environment known as
> the ImpulseC environment.  The ImpulseC environment develops C to VHDL
> for FPGA development. I would especially love to interface Python
> with ImpulseC and the graphing capabilities of GNU Plot and SciPy in
> order to recreate a VHDL development environment that will be just as
> capable as a $50,000 dollar Matlab to VHDL toolbox.  This is also a part
> of my Masters thesis.  Is anyone willing to help in this endeavor?
>
> David Blubaugh
>

Why not use MyHDL which is written in Python and translates to
Verilog.
I assume ImpulseC is a commercial product and costs a log.  MyHDL is
free.
If you have any interests in combining MyHDL with SciPy and NumPy I
would
be interested in getting involved.

Dan Fabrizio
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: MyHDL project !!!!!

2008-02-01 Thread chewie54
> Dan,
>
> I would be honored to start a project such as that in mind.  How do we
> begin ??
>
> David Blubaugh
>
>
> Why not use MyHDL which is written in Python and translates to Verilog.
> I assume ImpulseC is a commercial product and costs a log.  MyHDL is
> free.
> If you have any interests in combining MyHDL with SciPy and NumPy I
> would be interested in getting involved.
>
> Dan Fabrizio
>

David,

Let's start by discussing your masters thesis subject in more detail.
We can take a project from conception to hardware using MyHDL,  NumPy
and SciPy.  Maybe you could use this project as a proof for your
thesis showing this methodology warrants consideration compared other
ASIC/FPGA flows.

Let's discuss some of your ideas and decide how to proceed.


Dan
-- 
http://mail.python.org/mailman/listinfo/python-list