Documentation

View: New views
7 Messages — Rating Filter:   Alert me  

Documentation

by Echavarria Gregory, Maria Angelica :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Good Morning Group,

I've been programming in Python (PythonWin32, ActiveState, Enthought...) for a year now. I have a new task of creating a stand alone application for Windows. I have my .py code already, now I'm looking for an easy to program (best if automatic programming) GUI.

I found Glade, then Autoglade but sadly only for Ubuntu-devian, now I found IronPython Studio, but haven't found any Tutorial or users manual, an example, nothing!! Could you please give me advise on:

 *
What to use for my GUI - very automatic please
 *
Documentation of IronPython, preferably Studio... anything would help, even examples. It's about time and my lack of GUI programming knowledge...
 *
If this book IronPython in Action or the new Pro IronPython gives any help in my case...

Thanks so much,

Angelica.



M. Angelica Echavarria-Gregory, M.Sc., E.I.
Ph.D Candidate
University of Miami
Phone 305 284-3611
_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: Documentation

by Michael Foord-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Echavarria Gregory, Maria Angelica wrote:

> Good Morning Group,
>
> I've been programming in Python (PythonWin32, ActiveState, Enthought...) for a year now. I have a new task of creating a stand alone application for Windows. I have my .py code already, now I'm looking for an easy to program (best if automatic programming) GUI.
>
> I found Glade, then Autoglade but sadly only for Ubuntu-devian, now I found IronPython Studio, but haven't found any Tutorial or users manual, an example, nothing!! Could you please give me advise on:
>
>  *
> What to use for my GUI - very automatic please
>  *
> Documentation of IronPython, preferably Studio... anything would help, even examples. It's about time and my lack of GUI programming knowledge...
>  

Personally I would avoid IronPython Studio - it is very brittle and was
created as an 'example' of extending visual studio, not for production use.

For a Windows Forms designer I use Visual Studio (Express) and compile
the generated GUI into a class library which I import from IronPython.
This technique, along with building Windows Forms applications in
general is covered in IronPython in Action.

For an IronPython IDE (without designer) I would recommend Wing,
Netbeans, or SharpDevelop.

http://ironpython-urls.blogspot.com/2009/05/using-ironpython-with-wing-and-netbeans.html

Actually SharpDevelop has very good IronPython support including a
Windows Forms designer and IronPython debugger.

http://ironpython-urls.blogspot.com/2009/06/sharpdevelop-exploring-and-debugging.html
http://ironpython-urls.blogspot.com/2009/05/ironpython-in-sharpdevelop-31-and.html

>  *
> If this book IronPython in Action or the new Pro IronPython gives any help in my case...
>  

Either would be very good, both would be better. :-)

Michael

> Thanks so much,
>
> Angelica.
>
>
>
> M. Angelica Echavarria-Gregory, M.Sc., E.I.
> Ph.D Candidate
> University of Miami
> Phone 305 284-3611
> _______________________________________________
> Users mailing list
> Users@...
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>  


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog


_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: Documentation

by briancurtin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 26, 2009 at 09:54, Echavarria Gregory, Maria Angelica <m.echavarriagregory@...> wrote:
What to use for my GUI - very automatic please


M. Angelica Echavarria-Gregory, M.Sc., E.I.
Ph.D Candidate
University of Miami
Phone 305 284-3611

Although this is not "very automatic"...if you have Visual Studio, you can just create your GUI in the designer, then copy the code from YourForm.designer.cs into a YourForm.py file. Replace "this" with "self", get rid of any existence of "new", convert any true or false values to True or False, remove the semicolons (not required though), etc. A few find-and-replaces turns C# code into working Python code :)

Michael's suggestion of creating a class library may be more up your alley. His book does a great job of covering some GUI topics you may be interested in.

Brian

_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: Documentation

by Justin Regele :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, get Michael's book. I was also really lost until I got it.

I'm using IronPython Studio, but I'm not making any gui's, and I need to embed it in C# code, so that works for me. Like Michael said, it is very brittle. You must disable autocompletion otherwise it will destroy your python code, or at least make perfectly legitimate spacings uncompilable.

On Fri, Jun 26, 2009 at 9:38 AM, Brian Curtin <brian.curtin@...> wrote:
On Fri, Jun 26, 2009 at 09:54, Echavarria Gregory, Maria Angelica <m.echavarriagregory@...> wrote:
What to use for my GUI - very automatic please


M. Angelica Echavarria-Gregory, M.Sc., E.I.
Ph.D Candidate
University of Miami
Phone 305 284-3611

Although this is not "very automatic"...if you have Visual Studio, you can just create your GUI in the designer, then copy the code from YourForm.designer.cs into a YourForm.py file. Replace "this" with "self", get rid of any existence of "new", convert any true or false values to True or False, remove the semicolons (not required though), etc. A few find-and-replaces turns C# code into working Python code :)

Michael's suggestion of creating a class library may be more up your alley. His book does a great job of covering some GUI topics you may be interested in.

Brian

_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Parent Message unknown Re: Documentation

by Echavarria Gregory, Maria Angelica :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> For a Windows Forms designer I use Visual Studio (Express) and compile
> the generated GUI into a class library which I import from IronPython.
> This technique, along with building Windows Forms applications in
> general is covered in IronPython in Action.

Thanks Michael and Brian, I will follow all your advice, two more questions would be:

1.  Do the Python packages that I used to produce my code (Numpy, Scipy, Sympy, pylab, matplotlib, Mayavi2) would load and execute using IronPython as you recommend?  I read in a blog by Michael that libraries of regular Python do not work... please advice this need.

and

> Replace "this" with "self",
> get rid of any existence of "new", convert any true or false values to True
> or False, remove the semicolons (not required though), etc. A few
f> ind-and-replaces turns C# code into working Python code :)

2).  Not highly important since I can look up in the web (don't think I'm lazy, it's a matter of time) but: if there is on your wiki or maybe in the issues, a complete list of equivalences between C# and Python when coding GUIs... I haven't touched C (turbo C++) in 10 years... to do the replacement Brian talks about.

Thanks for your very quick reply,
Angelica.
_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: Documentation

by Michael Foord-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Echavarria Gregory, Maria Angelica wrote:

>> For a Windows Forms designer I use Visual Studio (Express) and compile
>> the generated GUI into a class library which I import from IronPython.
>> This technique, along with building Windows Forms applications in
>> general is covered in IronPython in Action.
>>    
>
> Thanks Michael and Brian, I will follow all your advice, two more questions would be:
>
> 1.  Do the Python packages that I used to produce my code (Numpy, Scipy, Sympy, pylab, matplotlib, Mayavi2) would load and execute using IronPython as you recommend?  I read in a blog by Michael that libraries of regular Python do not work... please advice this need.
>  

*Most* pure-Python libraries work fine with IronPython. Libraries which
are written in C (or depend on modules written in C) - which
unfortunately includes numpy, Scipy and all the ones you mention - don't
work with IronPython as it doesn't have the Python C API they use.

*However*, there is a project called Ironclad (created by Resolver
Systems) that provides the C API. It doesn't have 100% coverage yet -
but significant proportions of numpy, scipy etc do work.

http://www.resolversystems.com/documentation/index.php/Ironclad.html

> and
>
>  
>> Replace "this" with "self",
>> get rid of any existence of "new", convert any true or false values to True
>> or False, remove the semicolons (not required though), etc. A few
>>    
> f> ind-and-replaces turns C# code into working Python code :)
>
> 2).  Not highly important since I can look up in the web (don't think I'm lazy, it's a matter of time) but: if there is on your wiki or maybe in the issues, a complete list of equivalences between C# and Python when coding GUIs... I haven't touched C (turbo C++) in 10 years... to do the replacement Brian talks about.
>
>  

No one has written a comprehensive conversion chart I don't think - but
it would be an interesting project.

C# is not really very similar to C except superficially.

Michael
> Thanks for your very quick reply,
> Angelica.
> _______________________________________________
> Users mailing list
> Users@...
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>  


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog


_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: Documentation

by drury_robert_h :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is a program on the net called cs2py, that will convert the gui code
produced by VS to python code for you. While this not a complicated process,
and can be done with search & replace in any good editor, it's less likely
to miss something.

Bob Drury

-----Original Message-----
From: users-bounces@...
[mailto:users-bounces@...] On Behalf Of Echavarria Gregory,
Maria Angelica
Sent: Friday, June 26, 2009 3:32 PM
To: users@...
Subject: Re: [IronPython] Documentation


> For a Windows Forms designer I use Visual Studio (Express) and compile
> the generated GUI into a class library which I import from IronPython.
> This technique, along with building Windows Forms applications in
> general is covered in IronPython in Action.

Thanks Michael and Brian, I will follow all your advice, two more questions
would be:

1.  Do the Python packages that I used to produce my code (Numpy, Scipy,
Sympy, pylab, matplotlib, Mayavi2) would load and execute using IronPython
as you recommend?  I read in a blog by Michael that libraries of regular
Python do not work... please advice this need.

and

> Replace "this" with "self",
> get rid of any existence of "new", convert any true or false values to
True
> or False, remove the semicolons (not required though), etc. A few
f> ind-and-replaces turns C# code into working Python code :)

2).  Not highly important since I can look up in the web (don't think I'm
lazy, it's a matter of time) but: if there is on your wiki or maybe in the
issues, a complete list of equivalences between C# and Python when coding
GUIs... I haven't touched C (turbo C++) in 10 years... to do the replacement
Brian talks about.

Thanks for your very quick reply,
Angelica.
_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com