473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Form using HTML on PythonCard

Somebody know how make html forms or python forms inside html to use as gui
application?

The idea is make a client application like a web site of my interprise for
customers who don't have good connection, in this way the customer can select
the products off line and connect only to execute the shop. The use of HTML
is to have the same paradigm to application and to site.

Jul 18 '05 #1
3 2807
PythonCard is a wxWindows application, therefore you've got two choices:
1) use a wxHtmlWindow that can display *simple* html. Anyway I used it and I
don't think it can handle forms (but maybe I'm wrong). You'd need to extend
it a bit (it is a straightforward process see the wxp example in the
wxWindows demo)
2)if you are on windows you can use the wxHtmlIEWindow that renders html
using th WebBrowser COM component. The problem, then, is how to handle form
data. If you want to access them from python that can be troublesome.

Riccardo

"Luiz Siqueira Neto" <cy**********@mac.com> wrote in message
news:ma**********************************@python.o rg...
Somebody know how make html forms or python forms inside html to use as gui application?

The idea is make a client application like a web site of my interprise for
customers who don't have good connection, in this way the customer can select the products off line and connect only to execute the shop. The use of HTML is to have the same paradigm to application and to site.

Jul 18 '05 #2
You can put panels of widgets into HTML very nicely with wxPython.

The version of HTML that the wxHtmlCtrl supports is pretty simple,
but it includes a hook for extending it, the WXP tag. This looks
something like this embedded in your html:

<wxp module = "somemodule" class="SomeClass" width="95%">
<param name="id" value="-1"> </wxp>

Although the demo that comes with wxPython does something simple
like embedding a button, I just about always derive SomeClass from
wxPanel, and I use sizers to control the layout of several
controls within the panel. The constructor will start like this:

class SomeClass(wxPanel):
def __init__(self, parent, id=-1, size=wxDefaultSize)
wxPanel.__init__(self, parent, id, size=size)

IDK how to pass in object references as constructor parameters in the
embedded HTML, so these panels seem to often wind up using globals to
communicate with the rest of the program.

Keep in mind that the constructor for this panel is not called until
the HTML actually gets put into the wxHtmlCtrl (by SetPage, etc).
The panel also gets automatically destroyed when the next contents get
put into the wxHtmlCtrl, so don't hang on to any references to it.

IDK if PythonCard supports this control or not. Haven't used
pythoncard.

I alsways use wxCallAfter to send the next page to the wxHtmlCtrl.
That way I don't have to worry about a panel destroying itself while
its still running by changing the screen contents. wxCallAfter waits
until the current UI event is completely processed before doing
whatever it does.

This all leads to a pretty convenient style of programming. I throw
something at the screen, the user clicks something, maybe this makes
me throw something else at the screen, maybe it doesn't. If not,
he's still got the same screen to try something else. You don't
have to work out a hierarchy of screens where the user is forever
drilling down and popping up -- they can have more browser-like
freedom. Makes their heads spin. Keep a copy of the HTML and give
them a back button.
Al
Jul 18 '05 #3
> Somebody know how make html forms or python forms inside html to use as gui
application?

The idea is make a client application like a web site of my interprise for
customers who don't have good connection, in this way the customer can select
the products off line and connect only to execute the shop. The use of HTML
is to have the same paradigm to application and to site.


How about starting a simple webserver / proxy on their machine?

You could just connect to that, and if their connection is up
forward the information on to your real server.
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ron Stephens | last post by:
Thanks, Tony, we long term newbies need to stick together ;-)) I just updated a few PythonCard versions of three of the modules from askMerlin, and posted them in a link right below the...
0
by: Werner Merkl | last post by:
Hi, I like to switch from Python 2.3.4 to 2.4. So I tried to reinstall all apps I need. Most works fine When I start PythonCard I get following error: --------------------------- Setup...
1
by: jlocc | last post by:
Hi!! I am working on a school project and I decided to use PythonCard and wxPython for my GUI development. I need a password window that will block unwanted users from the system. I got the...
1
by: Brandon McGinty | last post by:
Hi All, I'm getting started with pythoncard. I'm wondering if there is any way to auto-place the gui elements that I use, so that they are all visible, and aligned? I would use the...
4
by: Tequila | last post by:
I'm having some trouble starting PythonCard on my PC. I've downloaded and ran python-2.5.msi to install Python on my machine. And PythonCard-0.8.2.win32.exe to install PythonCard. When I try...
8
by: king kikapu | last post by:
Hi to all folks here, i downloaded and "playing" with PythonCard and i just want to share my thoughts so maybe we can discuss a little about it. I was used to wxGlade before and i think...
8
by: Kevin Walzer | last post by:
I'm curious to know what others think of these two frameworks for building wxPython apps. PythonCard has been around longer, but its development seems to have slowed. The last release, 0.8.2,...
1
by: bvidinli | last post by:
i installed pythoncard, but i could not find how to start it ? where can i find its executable/binary ? or menu item ? or command line that i should enter ? thanks. -- Ý.Bahattin Vidinli
24
by: John Henry | last post by:
For serveral years, I have been looking for a way to migrate away from desktop GUI/client-server programming onto the browser based network computing model of programming. Unfortunately, up until...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.