Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

A question about python and xml

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


holdenpage at gmail

May 9, 2008, 8:39 AM

Post #1 of 3 (158 views)
Permalink
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
--
http://mail.python.org/mailman/listinfo/python-list


stefan_ml at behnel

May 9, 2008, 8:50 AM

Post #2 of 3 (145 views)
Permalink
Re: A question about python and xml [In reply to]

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
--
http://mail.python.org/mailman/listinfo/python-list


jcd at sdf

May 9, 2008, 9:08 AM

Post #3 of 3 (144 views)
Permalink
Re: A question about python and xml [In reply to]

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


--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.