Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - A question about python and xml

 
Thread Tools Search this Thread
Old 05-09-2008, 04:39 PM   #1
Default A question about python and xml


Hello everyone I heard this was a good community to go too for help
and advice. I want to make a web site that uses the python programming
language which I am VERY new at. This website would store simple data
such as names in a form. At first I wanted to use mysql to store the
data but I want to export the data using xml.

So say if a user logged in they would be able to store there basic
information in an xml file and download it whenever. Is that possible
using XML and Python. I am sorry if this post doesn't make much sense
but any advice would be greatly appreciated. You can also e-mail me if
you need further information or clarification.

Thanks

Holden


Holden
  Reply With Quote
Old 05-09-2008, 04:50 PM   #2
Stefan Behnel
 
Posts: n/a
Default Re: A question about python and xml
Holden wrote:
> I want to make a web site that uses the python programming
> language which I am VERY new at. This website would store simple data
> such as names in a form. At first I wanted to use mysql to store the
> data but I want to export the data using xml.
>
> So say if a user logged in they would be able to store there basic
> information in an xml file and download it whenever. Is that possible
> using XML and Python. I am sorry if this post doesn't make much sense
> but any advice would be greatly appreciated. You can also e-mail me if
> you need further information or clarification.


Generating XML from your data shouldn't be too hard once it's in a database.
The harder part is getting it in there through a web interface. I would look
at a dedicated web framework like Django first:

http://www.djangoproject.com/

Stefan


Stefan Behnel
  Reply With Quote
Old 05-09-2008, 05:08 PM   #3
J. Cliff Dyer
 
Posts: n/a
Default Re: A question about python and xml
On Fri, 2008-05-09 at 08:39 -0700, Holden wrote:
> Hello everyone I heard this was a good community to go too for help
> and advice. I want to make a web site that uses the python programming
> language which I am VERY new at. This website would store simple data
> such as names in a form. At first I wanted to use mysql to store the
> data but I want to export the data using xml.
>
> So say if a user logged in they would be able to store there basic
> information in an xml file and download it whenever. Is that possible
> using XML and Python. I am sorry if this post doesn't make much sense
> but any advice would be greatly appreciated. You can also e-mail me if
> you need further information or clarification.
>
> Thanks
>
> Holden
> --
> http://mail.python.org/mailman/listinfo/python-list
>


A general question will only get you a general answer, but yes, it's
very possible.

You'll want to look into the cgi module (in the standard library)for
basic, ground level server/browser communication. You might also be
interested in using a web framework, for keeping your site design clean
and manageable. I recommend Django from my own experience, but you
might also look into turbogears, pylons, webpy, or any of a number of
other well-regarded options. The downside to using a framework is that
it's another set of things to learn, which, if you're just starting out
with python, might be a bit much to chew, but they can be very helpful
with maintenance down the line.

For XML processing, lxml.etree or ElementTree should suit your needs.
ElementTree is included in the standard library of recent versions of
python, though lxml is easily downloadable, and adds a couple bells and
whistles. There are other options available, but those are
straightforward to use, and well designed.

Good luck with your site.

Cheers,
Cliff




J. Cliff Dyer
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Cgi Webserver sagar123 Software 1 04-23-2009 06:32 PM
Monty Python and the Holy Grail SE DVD questions Mark DVD Video 0 04-11-2005 05:29 PM
Help regarding damaged Monty Python DVD? Bex DVD Video 5 04-16-2004 02:11 AM
Universal Python Meaning Of Life reply Peter Williams DVD Video 31 09-27-2003 09:13 PM
Re: MONTY PYTHON CUT?? Brian Jaudon DVD Video 0 06-23-2003 05:29 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46