running wxpython on server

Phil,

If you're replacing the wxPython GUI with HTML, you're taking wxPython out of the equation and just writing a Python server application. There's no need for wxPython on the server.

David

···

----- Original Message -----
From: Phil Schloss <phil@red-castle.com>
Date: Monday, June 23, 2008 8:47 pm
Subject: [wxpython-users] running wxpython on server
To: wxpython-users@lists.wxwidgets.org

I have a server that has a php application with several thousand lines
of php.
I would like to convert it to wxpython, as I have a similar
application running
on pc and mac done in wxpython, and I think that for the long run if I
took the
time now to change the php to wxpython I would save a lot of maintains
in
the future. I have a lot of maybe dumb questions

First, my php application runs in a virtural server on a Linux box
that I do not
have root access to, I use either cpanel or ftp to change the content,
can I
install wxpython?

Second, can I take my existing wxpython application and do something
to it so
that it creates html out instead of writing to the screen so that I
could use it almost
as is (over 90%)?

IF I get positive anwsers to these that I will ask more.

Thanks
Phil

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Josiah, welcome back.

Phil,

There is no such conversion to convert wxPython -> HTML to be used by
a web server. Sorry.

On the other hand, most web frameworks used with Python include fairly
easy-to-use templating systems. You may want to look at Nevow.stan,
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440563, and
others. There are dozens of variants, some of which offer php-like
'code embedded in html', automatic reloading of pages, etc.

Here's another wild idea. I've been playing with Ext JS (http://extjs.com/), which is a full-up browser-side GUI application framework (you can use it for simple forms on HTML pages as well, but it's pretty heavy for that).

This got me thinking of how that might play with wxPython. Could a user input on the browser side, via an AJAX request, turn into a wx event on the server? And could an operation on the server side turn into a response to the request that would be interpreted appropriately by the JS framework on the browser?

There's probably a fatal gotcha here, but a fun idea to play with.

···

--
Don Dwiggins
Advanced Publishing Technology

Tim Roberts wrote:

I've been wondering when someone would start up a project to do exactly this. It would be an enormous task to support ALL of wx, but you could do a pretty substantial subset in a reasonable amount of time. This would be a great Google summer project.

I am pretty sure this project already exists, and in fact was a GSoC project, though no one ever seems to mention it. Perhaps it died and everyone forgot about it. Anyway, it is called wxWeb: http://lists.wxwidgets.org/pipermail/wx-dev/2007-September/091891.html.’ An excerpt:

"wxWeb was my Google Summer of Code project.
Basically, it is another
port of wxWidgets, but instead of running wxWidgets apps on another
desktop environment, wxWeb (hopefully, eventually) allows you to run
your wxWidgets app as a web application hosted on a web server and
executed through a browser. So for example now your company can
experiment with a Software as a Service business model with less of an
investment, or can demo products directly on the web site. Julian
suggested that eventually we could have all of the wxWidgets samples
running directly on the website."

Anyone know anything about it?

- Mike

Hi Mike,

Tim Roberts wrote:

I've been wondering when someone would start up a project to do exactly this. It would be an enormous task to support ALL of wx, but you could do a pretty substantial subset in a reasonable amount of time. This would be a great Google summer project.

I am pretty sure this project already exists, and in fact was a GSoC project, though no one ever seems to mention it. Perhaps it died and everyone forgot about it. Anyway, it is called wxWeb: http://lists.wxwidgets.org/pipermail/wx-dev/2007-September/091891.html.’ An excerpt:

"wxWeb was my Google Summer of Code project.
Basically, it is another
port of wxWidgets, but instead of running wxWidgets apps on another
desktop environment, wxWeb (hopefully, eventually) allows you to run
your wxWidgets app as a web application hosted on a web server and
executed through a browser. So for example now your company can
experiment with a Software as a Service business model with less of an
investment, or can demo products directly on the web site. Julian
suggested that eventually we could have all of the wxWidgets samples
running directly on the website."

Anyone know anything about it?

They spent 3 months trying to get the basics working, then SoC ended and AFAICT the project pretty much got shelved. Of course, that was working with C++, so there was more challenges than there would be in Python.

Overall, though, I think that while it's doable, it'll be a lot of work to get right, and the apps created with it will probably be pretty inefficient, as for example you might do validation every time someone presses a key in a desktop app, but in a client-server app you'd want validation less frequently, otherwise you'll hit the server hard with validation requests.

non-issue because you'd just pass your wx events and your AJAX events to a controller which would handle the event and update the data accordingly. No need for a huge wx emulation layer that way, which should increase both ease of maintenance/debugging and performance.

Regards,

Kevin

···

On Jun 24, 2008, at 1:42 PM, Mike Rooney wrote:
From my perspective, it seems that if you use MVC, this is really a

- Mike
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users