Quantcast

wxWidgets for Java / Jython / IronPython ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wxWidgets for Java / Jython / IronPython ?

Doug Sievers
Hello All,

I have recently been getting into more Python, especially since the new release of IronPython. I have also started to explore Jython, which appears to be a great tool, plus it allows use of all the free, stable, open source Java libraries.

One thing that would be awesome, in my not-expert opinion, would be to have wxWidgets / wxPython work transparently across CPython / IronPython / Jython. This would allow much better portability of code (at least as far as wxPython is concerned) across all implementations, and Python fans like myself would only need to learn a single UI framework.

I have done a little bit of homework, and it seems there are possibly 2 routes to solving this.

1) Create a wxPython API in IronPython that wraps .NET classes, and one in Jython that wraps Swing. The advantage here is that each API only uses classes inherent to the underlying platform. This would make it easy for deployment, because Jython would only need a .jar with all the wrappers and namespaces defined, as opposed to having a build for each platform. Similar with IronPython, considering Mono/.NET, there would just be a single assembly that runs everywhere.

2) Create a wrapper around wx.NET for IronPython, and a wrapper around wxJava for Jython.


Option 1 of course you could not really call it wxPython, especially in the case of Jython, since this would not use native widgets. However, it might be the easiest to support.


Now, of course option 2 has some problems. First it requires an active wxJava. I have seen there are 3 projects on sourceforge, all of which appear inactive. Both wx4j and jwx appear to both be downloaded about 40 times per month, so there is still interest there. Both of these projects look promising, using SWIG as the main generating mechanism.

wxJava,  last files 2/14/03
wx4j,      last files 4/1/04
jwx,       last files 12/20/06

Also, wx.NET is still a beta, and there have been no new files for over a year, despite being downloaded 800 times per month.

So, what questions am I really asking?

1) Does anyone have a good explanation why wx/Java has never taken off? 3 projects, all dead. I am considering to revive one of them, or start from scratch, but I don't want to create another project that has little interest from the community.

2) What is the future of wx.NET ? (I will forward this to wx.NET mailing list, but I'm open to replies :)

3) Which Option (1 or 2) are people more interested in? I think this may be more a question for the wxPython mailing list, since they are the target audience. I think people using a so-called "wxJython" would like to have native Widgets, since it would look more like their wxPython program.


Thank you for your responses, and for taking the time to read my lengthy post!

Doug

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxWidgets for Java / Jython / IronPython ?

Stefan Csomor
Re: [wx-discuss] wxWidgets for Java / Jython / IronPython ? Hi

IMHO the way that should work in the future is to generate the bindings directly from the ‘interface’ folder, for all variants, this should help to avoid too much loss if something doesn’t take off.

wx.NET to me seems more promising to me than a wxJava effort as far as the possible audience is concerned.

Best,

Stefan

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxWidgets for Java / Jython / IronPython ?

Kevin Ollivier-5
In reply to this post by Doug Sievers
Hi Doug,

On Jan 8, 2009, at 11:33 AM, Doug Sievers wrote:

> Hello All,
>
> I have recently been getting into more Python, especially since the  
> new release of IronPython. I have also started to explore Jython,  
> which appears to be a great tool, plus it allows use of all the  
> free, stable, open source Java libraries.
>
> One thing that would be awesome, in my not-expert opinion, would be  
> to have wxWidgets / wxPython work transparently across CPython /  
> IronPython / Jython. This would allow much better portability of  
> code (at least as far as wxPython is concerned) across all  
> implementations, and Python fans like myself would only need to  
> learn a single UI framework.
>
> I have done a little bit of homework, and it seems there are  
> possibly 2 routes to solving this.
>
> 1) Create a wxPython API in IronPython that wraps .NET classes, and  
> one in Jython that wraps Swing. The advantage here is that each API  
> only uses classes inherent to the underlying platform. This would  
> make it easy for deployment, because Jython would only need a .jar  
> with all the wrappers and namespaces defined, as opposed to having a  
> build for each platform. Similar with IronPython, considering  
> Mono/.NET, there would just be a single assembly that runs everywhere.
>
> 2) Create a wrapper around wx.NET for IronPython, and a wrapper  
> around wxJava for Jython.
>
>
> Option 1 of course you could not really call it wxPython, especially  
> in the case of Jython, since this would not use native widgets.  
> However, it might be the easiest to support.
>
>
> Now, of course option 2 has some problems. First it requires an  
> active wxJava. I have seen there are 3 projects on sourceforge, all  
> of which appear inactive. Both wx4j and jwx appear to both be  
> downloaded about 40 times per month, so there is still interest  
> there. Both of these projects look promising, using SWIG as the main  
> generating mechanism.
>
> wxJava,  last files 2/14/03
> wx4j,      last files 4/1/04
> jwx,       last files 12/20/06
>
> Also, wx.NET is still a beta, and there have been no new files for  
> over a year, despite being downloaded 800 times per month.
>
> So, what questions am I really asking?
>
> 1) Does anyone have a good explanation why wx/Java has never taken  
> off? 3 projects, all dead. I am considering to revive one of them,  
> or start from scratch, but I don't want to create another project  
> that has little interest from the community.

Usually the simple answer for this is that either the demand is very  
low, or the workload was large enough that it scared people off or  
wore them down. It's important to remember though that the core Java  
developers at Sun didn't particularly care about native LNF, and  
naturally as a result the language is not going to attract many  
developers who feel that is very important.

> 2) What is the future of wx.NET ? (I will forward this to wx.NET  
> mailing list, but I'm open to replies :)
>
> 3) Which Option (1 or 2) are people more interested in? I think this  
> may be more a question for the wxPython mailing list, since they are  
> the target audience. I think people using a so-called "wxJython"  
> would like to have native Widgets, since it would look more like  
> their wxPython program.

What I'm curious about is if you have some concrete needs you're  
trying to address, or if this is just a "let people have more choices"  
sort of discussion. For the most part, while I can see the benefit in  
giving people more options, I have a hard time thinking of reasons to  
want to use both IronPython or Jython and wxPython, as those  
specialized builds of Python are mostly about leveraging the Java  
or .NET platforms, which if you do so in any real capacity means your  
program is no longer platform agnostic, unless you write another  
implementation for other platforms...

Regarding IronPython and extensions, have you seen this BTW? http://www.voidspace.org.uk/ironpython/cpython_extensions.shtml

Regards,

Kevin

>
> Thank you for your responses, and for taking the time to read my  
> lengthy post!
>
> Doug
> _______________________________________________
> wx-discuss mailing list
> [hidden email]
> http://lists.wxwidgets.org/mailman/listinfo/wx-discuss

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxWidgets for Java / Jython / IronPython ?

Robin Dunn
In reply to this post by Doug Sievers
Doug Sievers wrote:
>
> 1) Create a wxPython API in IronPython that wraps .NET classes, and one
> in Jython that wraps Swing. The advantage here is that each API only
> uses classes inherent to the underlying platform. This would make it
> easy for deployment, because Jython would only need a .jar with all the
> wrappers and namespaces defined, as opposed to having a build for each
> platform. Similar with IronPython, considering Mono/.NET, there would
> just be a single assembly that runs everywhere.

I was involved with a discussion of doing something like this many years
ago at a Python conference.  (Jython/Swing only, this was before C#
existed.)  While there was lots of positive discussion about doing it,
there wasn't anybody that stepped forward to do any work on it which of
course is the main requirement of any open source project.

The other problem with either approach you mentioned is keeping them all
(wxPython and **ython wrappers around Swing or .NET, or the wxJava,
wx.NET libs) in sync so the APIs match and Python apps are at least
mostly portable between them.  As Stefan mentioned we now have the
opportunity to try and standardize the various wx wrappers by driving
the code generation of all their APIs and what-not from the new
documentation/interface files in 2.9.  I plan on investigating this for
wxPython in the near future.

--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wxWidgets for Java / Jython / IronPython ?

Doug Sievers
In reply to this post by Doug Sievers
Robin,

Thank you for the feedback. I was certain that I was not the first
person to discuss this.

Agreed, keeping everything consistent would be the most difficult
part. I like the "interface" idea that Stefan mentioned also. Thank
you for bringing attention to it again... I don't follow wxWidgets
development activities closely, so I was unaware of this new feature.

I agree that generating the code from "interface" would be best, since
it avoids dependence on other projects. Another possibility may be
getting SWIG to generate Jython or IronPython code. This might be more
work, but might have larger payoff due to the other libraries it would
give access to.

In regards to Kevin's post, I don't have any specific needs that I am
trying to meet with this idea. However, I have some wxPython
experience, and I would love to use that knowledge in Jython, instead
of moving backwards and learning Swing. For IronPython, the same holds
true, although I do have more C# and WinForms experience to help me
through. I guess the main goal I have in mind is to be able to use my
knowledge of Python and wxPython whichever implementation I use.

I did stumble upon another intersting project called FarPy, which
generates GUI code for either wxPython or IronPython, but I'm not sure
if this is still in development either.
http://sourceforge.net/projects/farpyguie

Thanks all for the posts, it seems I have some more investigating to do.

Doug


Robin Dunn wrote:

> Doug Sievers wrote:
> >
> > 1) Create a wxPython API in IronPython that wraps .NET classes, and one
> > in Jython that wraps Swing. The advantage here is that each API only
> > uses classes inherent to the underlying platform. This would make it
> > easy for deployment, because Jython would only need a .jar with all the
> > wrappers and namespaces defined, as opposed to having a build for each
> > platform. Similar with IronPython, considering Mono/.NET, there would
> > just be a single assembly that runs everywhere.
>
> I was involved with a discussion of doing something like this many years
> ago at a Python conference.  (Jython/Swing only, this was before C#
> existed.)  While there was lots of positive discussion about doing it,
> there wasn't anybody that stepped forward to do any work on it which of
> course is the main requirement of any open source project.
>
> The other problem with either approach you mentioned is keeping them all
> (wxPython and **ython wrappers around Swing or .NET, or the wxJava,
> wx.NET libs) in sync so the APIs match and Python apps are at least
> mostly portable between them.  As Stefan mentioned we now have the
> opportunity to try and standardize the various wx wrappers by driving
> the code generation of all their APIs and what-not from the new
> documentation/interface files in 2.9.  I plan on investigating this for
> wxPython in the near future.
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!
>
_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Loading...