[wxPython] wxPython + rexec == completely free java/flash replacement

My company wants to make it easy for retailers to sell their merchandise
locally over the internet. There is a problem: HTML is horrible for building
interfaces that make a user at ease for purchasing products (What I'm about
to suggest requires you to agree with me :slight_smile:

It would be cool if you could write a client-side wxPython script that makes
a really attractive GUI that, in turn, posts variables to a server-side
python script. That server script could then generate new wxPython scripts or
normal HTML(etc), depending on the need.

This could be done by combining wxPython, wxWindows, Python and utilizing the
restricted execution module
(http://www.python.org/doc/howto/rexec/rexec.html). By stripping down Python,
wxWindows and wxPython to the bare essentials and bundling them as one
browser plug-in, it would create a whole new way to publish on the net
(combining the ease and small learning curve of both Python and wxWindows).

By building an XML DTD that would be used to describe the layout of the GUI
(not much unlike HTML) and areas in the DTD to write functions and other code
to describe the behavior (not much unlike javascript in HTML pages) , it
would be really easy, with the help of a small set of powerful classes, to
make really powerful, really attractive GUIs that run on all major platforms
(thanks to Python and wxWindows)

The problem with python scripts being run from the net on a user's machine is
that python is a very powerful language with a lot of powerful features that
would be dangerous in the wrong hands. The restricted execution module
provided with python can be used to solve that problem by disabling all OS
level and other dangerous features, making them inaccessible to the script
programmer.

I said above that a small set of powerful classes is required to make this
whole idea work. I've thought of a few:

Class 1 : Text fetching URL parser
Internationalization (i18n) is a pretty big issue in my company, and I think
it is in the computer industry in general... There should be a class that
accepts a URL as a parameter, fetches unicode (or localized) text from the
web server with the purpose of displaying it to the user. This could be used
to easily translate text by removing user-visible text from the layout code
and placing it in a database (or file) on a web server that would be easier
for a non-programmer translator to work on...

Class 2 : Multiple Image fetching URL parser
A class that takes multiple URLs as parameters, that fetches those images and
places them in an array could be used for animation (think mouseOvers,
dancing actors on the screen, or whatever)

Class 3 : CGI variable collector and poster
a class that collects and organizes CGI POST variables that, on command
(event), would send those variables to a web server somewhere.

Class 4 : ogg vorbis player (exists)
a class that downloads ogg vorbis audio files (http://vorbis.com) and then
plays them on the host's computer

I'm sure other classes could be added here to aid in the design and
interactivity of the applet.

Additionally, wxWindows has wonderful layout control classes that make
building the XML interpreter a breeze and would keep the same 'feel' of HTML
+ Javascript, but with added power and ease of wxWindows and Python.

Has somebody already started this? I've seen the wxHTML in demo, but I think
it is still too restrictive. We could remove the wx prefix on all the
controls making it that much easier and intuitive to code the XML as well...

So, any comments/suggestions?
(I sent this to the wxwindows, wxpython and python mailing lists. I'm sorry
if you see it three times)

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

[please trim the reply list if appropriate]

This could be done by combining wxPython, wxWindows, Python and utilizing the
restricted execution module

This certainly seems like an interesting idea. The problem is that a lot of
stuff must be installed on the user system to be able to run such python-lets:
you need Python itself, you need wxWindows and wxPython too. Compared to Java
which is included nowadays in all browsers and so you get it for free, this is
a huge difference. Personally, I hate Java, but can you realistically expect
this solution to be popular when it proposes to do the same thing as Java applets
do (if I understood you correctly) but has many more requirements (from the
user point of view)?

I said above that a small set of powerful classes is required to make this
whole idea work. I've thought of a few:

Sorry, I don't understand where should these classes be implemented, i.e.
who should provide them? Python? wxPython? wxWindows?

Class 1 : Text fetching URL parser

wxWin has everything you need to do this: just use wxHTTP + wxURL +

Internationalization (i18n) is a pretty big issue

+ gettext.

Class 2 : Multiple Image fetching URL parser

Same for this one except you should use wxImage.

Class 3 : CGI variable collector and poster

There is no direct support for this in wxWin, but OTOH it can be [easily]
done from Python.

Regards,
VZ

···

On 27-Dec-00 dan wrote:

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

This could be done by combining wxPython, wxWindows, Python and utilizing

the

restricted execution module
(Python HOWTOs — Python 3.14.0a1 documentation). By stripping down

Python,

wxWindows and wxPython to the bare essentials and bundling them as one
browser plug-in, it would create a whole new way to publish on the net
(combining the ease and small learning curve of both Python and

wxWindows).

Interestingly enough, I've had an idea very similar to this on the back
burner for several months now. It's essentially a wxPython Runtime
Environment, similar in concept to how once you have the VB runtime
installed you can run any VB app. The wxPRE would borrow some technology
from Gordon's Installer to package up Python and much of the Python library,
wxPython, etc. into a small collection of .DLLs, .PYDs and other files that
can be easily downloaded and installed. Once installed, users can run any
Python or wxPython app that's designed to use the wxPRE, (probably will just
require using a particular packaging mechanism.) It will also include stubs
that can be loaded as a NS plugin or IE ActiveX control that can then
bootstrap the wxPRE into the web browser, and will allow downloading and
running wxPython code archives from remote servers, using rexec and etc.

I hope to be able to make some real progress on this idea starting sometime
in the next couple months.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I hope to be able to make some real progress on this idea starting sometime
in the next couple months.

Cool, I'd like to start a project on sourceforge for this...

I guess I forgot to write that Python, wxPython, wxWindows, rexec and the
extra class code would be bundled together as one independent package, and
not named after the products that it is based on.

I meant using all those products and building an XML parser that parses an
XML document built around the needs of a GUI programmer (HTML really hinders
building a nice GUI, except if you use CSS, but that isn't well supported)

The parser builds wxPython code that is executed and the whole thing is
completely hidden from the user and developer (they only see the XML).

e.g.
<app>
  <menubar>
    <menu>&File
      <menuitem onClick="msgbox('New Document')">&New
      <menuitem onClick="msgbox('Open Document")">&Open
    </menu>
  </menubar>
  <body valign="middle" halign="center">
    <text src="http://eevolved.com/rawtext.txt&quot;&gt;
  </body>
</app>

Can you see how easy it would be to parse that XML and generate wxPython code
that could be executed in the runtime environment...

Now place above the layout code a 'code section' in which you can place any
valid python script code that is allowed by rexec... (python is to javscript
what the above code is to HTML)

User : installs one package (that installs itself in browsers, like real
player now does, or like flash now does)

Developer : Uses WYSIWYG editor that builds the GUI for him, with much more
control that HTML ever offered him... The WYSIWYG editor generates XML code
that will be parsed...

Me (and people who want to help me):
  - code XML parser (that validates and translates the XML into wxPython)
  - code extra classes that add stronger net support
  - bundle whole thing into one package (one package for every platform
  supported)
  - rejoice, have a beer, while other people use the completely free,
  completely open product created to make their lives easier :slight_smile:

Sorry for the double posting,
Dan

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users