473,320 Members | 1,804 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,320 software developers and data experts.

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
Jun 27 '08 #1
2 737
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
Jun 27 '08 #2
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
Jun 27 '08 #3

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
3
by: fdsl ysnh | last post by:
--- python-list-request@python.orgдµÀ: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit >...
17
by: Jan Danielsson | last post by:
Hello all, I recently started using Python, and I must say I like it. Both the language and libraries available for it. Background: I have written an application which I use to keep track of...
97
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
23
by: Ray | last post by:
Hello! I've been reading about PyPy, but there are some things that I don't understand about it. I hope I can get some enlightenment in this newsgroup :) First, the intro: <excerpt> "The...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
65
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
21
by: Roy Smith | last post by:
I'm working on a product which for a long time has had a Perl binding for our remote access API. A while ago, I wrote a Python binding on my own, chatted it up a bit internally, and recently had a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.