Re: Web development with Python 3.1

2009-11-07 Thread Alan Harris-Reid
mario ruggier wrote: With respect to to original question regarding web frameworks + database and Python 3, all the following have been available for Python 3 since the day Python 3.0 was released: QP, a Web Framework http://pypi.python.org/pypi/qp/ Durus, a Python Object Database (the "defaul

Re: Web development with Python 3.1

2009-11-04 Thread rustom
On Oct 30, 6:23 pm, Dotan Cohen wrote: > The point is that I want to use only _Python_ features, not > Django/Mako/whatever features. Pure python has a builtin templating system -- its called % See http://simonwillison.net/2003/Jul/28/simpleTemplates/ -- http://mail.python.org/mailman/listinf

Re: Web development with Python 3.1

2009-11-03 Thread mario ruggier
With respect to to original question regarding web frameworks + database and Python 3, all the following have been available for Python 3 since the day Python 3.0 was released: QP, a Web Framework http://pypi.python.org/pypi/qp/ Durus, a Python Object Database (the "default" in qp, for user sessi

Re. Web development with Python 3.1

2009-10-31 Thread Rustom Mody
Rober Kern wrote > But if you insist, you may be interested in Breve: > http://pypi.python.org/pypi/Breve/ Thanks for that! Viva internal DSLs! [Sorry -- cut my teeth on lisp] Is there anything like this for xml? Well I guess that is a slightly wrong (if not straight stupid) question. Maybe s

Re: Web development with Python 3.1

2009-10-31 Thread Dotan Cohen
>> notmm uses Python 2.6 and will probably work just fine with Python >> 3000. >> The only reference to "notmm" that I could find in Google was this thread! > "I am free, no matter what rules surround me. If I find them > tolerable, I tolerate them; if I find them too obnoxious, I break > them.

Re: Web development with Python 3.1

2009-10-30 Thread erob
On Oct 30, 7:01 pm, erob wrote: > On Oct 28, 5:16 am, "Diez B. Roggisch" wrote: > > > > > Dotan Cohen schrieb: > > > >> While I know that to be true in the general sense, from what I've > > >> looked at Django and other frameworks it seems that the web frameworks > > >> push the coder to use temp

Re: Web development with Python 3.1

2009-10-30 Thread erob
On Oct 28, 5:16 am, "Diez B. Roggisch" wrote: > Dotan Cohen schrieb: > > > > >> While I know that to be true in the general sense, from what I've > >> looked at Django and other frameworks it seems that the web frameworks > >> push the coder to use templates, not letting him near the HTML. > > >>

Re: Web development with Python 3.1

2009-10-30 Thread Robert Kern
On 2009-10-30 15:55 PM, Dotan Cohen wrote: It is clear and obvious. But it has the "template engine" duplicating a function that Python has built in. My goal is to learn reusable Python (reusable for non-web projects). My goal is not to find the quickest way to a website. Please correct me if I

Re: Web development with Python 3.1

2009-10-30 Thread Dotan Cohen
> I took a look a both yesterday. They are both generic text templating > systems that seem to pretty much do the same thing. I suspect you will > prefer Mako since it avoids duplicating Python's comtrol structures. But I > think it worthwhile to look at both anyway since doing so will help to > se

Re: Web development with Python 3.1

2009-10-30 Thread Dotan Cohen
>> It is clear and obvious. But it has the "template engine" duplicating >> a function that Python has built in. My goal is to learn reusable >> Python (reusable for non-web projects). My goal is not to find the >> quickest way to a website. > > Please correct me if I'm wrong, but you did learn HTM

Re: Web development with Python 3.1

2009-10-30 Thread Terry Reedy
Dotan Cohen wrote: It is clear and obvious. But it has the "template engine" duplicating a function that Python has built in. ... Then use Mako - it uses plain Python to manage the presentation logic. And if you go for Mako, then you might as well switch to Pylons. Great framework too (bett

Re: Web development with Python 3.1

2009-10-30 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Look at this "templating code": {% for entry in blog_entries %} {{ entry.title }} {{ entry.body }} {% endfor %} What's the problem ? Simple, clear and obvious. It is clear and obvious. But it has the "template engine" duplicating a function that Python has built in

Re: Web development with Python 3.1

2009-10-30 Thread Dotan Cohen
>> Look at this "templating code": >> {% for entry in blog_entries %} >>    {{ entry.title }} >>    {{ entry.body }} >> {% endfor %} > > What's the problem ? Simple, clear and obvious. > It is clear and obvious. But it has the "template engine" duplicating a function that Python has built in. My g

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : The point is that using templates allows you to express your rendering-logic in terms of the desired output language (HTML in this case). Well, for Django, Mako, Cheetah and quite a few others, this might not be _that_ true - you can use any of the templating system

Re: Web development with Python 3.1

2009-10-29 Thread Diez B. Roggisch
Dotan Cohen wrote: >> Perhaps this might better answer your questions: >> http://docs.djangoproject.com/en/dev/topics/templates/#id1 >> > > Actually, that example just proves my point! Look at this "templating > code": > {% for entry in blog_entries %} > {{ entry.title }} > {{ entry.body

Re: Web development with Python 3.1

2009-10-29 Thread Ethan Furman
Bruno Desthuilliers wrote: Dotan Cohen a écrit : I don't want to learn some "templating language" that duplicates what Python already has built in! Then use Mako - it uses plain Python to manage the presentation logic. And if you go for Mako, then you might as well switch to Pylons. Great f

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Perhaps this might better answer your questions: http://docs.djangoproject.com/en/dev/topics/templates/#id1 Actually, that example just proves my point! Which one ? Look at this "templating code": {% for entry in blog_entries %} {{ entry.title }} {{ entry.body

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : 2009/10/29 Albert Hopkins : On Wed, 2009-10-28 at 16:38 +0200, Dotan Cohen wrote: return HttpResponse(unmaintanable_html % data) That's fine for single variables, but if I need to output a table of unknown rows? I assume that return means the end of the script. Therefor

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Ok, here's a Django example without a template: # views.py def index(request): torvalds = request.GET.get("torvalds", "No torvalds here") return HttpResponse("%s" % torvalds) Allright, but what if I need to output in the middle of the page? Say, one row of a tabl

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
> Perhaps this might better answer your questions: > http://docs.djangoproject.com/en/dev/topics/templates/#id1 > Actually, that example just proves my point! Look at this "templating code": {% for entry in blog_entries %} {{ entry.title }} {{ entry.body }} {% endfor %} Why would I want t

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : What do you mean by "in the middle of the page"? Do you mean, for instance, the behavior of "middle.php" in the following PHP example: Is that what you are after? Yes, that is what I am after. Django's templating system has an "include" statement, but also something

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
>> As is, in my case. Actually, what use case is there for having Apache >> reprocess the HTML output of the script? > > compression, cache, whatever... > Thanks. I actually did think of compression. >>> It's not that it was unclear, but that it's innaccurate. "outputting to >>> stdout" is an im

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : (snip) Yes, I like to separate HTML from code. However, often I need to output something in the middle of the page. How could I do that with a template? Perhaps learning to use some templating system could help ?-) I'd personnaly suggest either Mako (possibly one of the

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Clearly. I was referring to stdout being send to the browser as the http response. s/browser/web server/ - it's the web server that reads your app's stdout and send it (as is or not FWIW) back to the client. As is, in my case. Actually, what use case is there for having

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
2009/10/29 Albert Hopkins : > On Wed, 2009-10-28 at 16:38 +0200, Dotan Cohen wrote: >> > return HttpResponse(unmaintanable_html % data) >> > >> >> That's fine for single variables, but if I need to output a table of >> unknown rows?  I assume that return means the end of the script. >> Therefore I

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
> I think you're misunderstanding how Python and the web work together. Python > is not PHP -- it was not designed to replace HTML, and it is in itself not a > templating language. If you would like to use Python code embedded in HTML, > the way PHP is typically used, you may want to look at Python

Re: Web development with Python 3.1

2009-10-28 Thread Alan Harris-Reid
Martin v. Löwis wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting "don't - start with 2.6"), but as far as I can see, none of the popular python-to-web frameworks (Django, CherryPy, web

Re: Re: Web development with Python 3.1

2009-10-28 Thread Alan Harris-Reid
John Nagle wrote: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Python

Re: Web development with Python 3.1

2009-10-28 Thread Rhodri James
On Wed, 28 Oct 2009 07:08:12 -, John Nagle wrote: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based w

Re: Web development with Python 3.1

2009-10-28 Thread Albert Hopkins
On Wed, 2009-10-28 at 16:38 +0200, Dotan Cohen wrote: > > return HttpResponse(unmaintanable_html % data) > > > > That's fine for single variables, but if I need to output a table of > unknown rows? I assume that return means the end of the script. > Therefore I should shove the whole table into a

Re: Web development with Python 3.1

2009-10-28 Thread Rami Chowdhury
On Wed, 28 Oct 2009 14:15:54 -0700, Dotan Cohen wrote: What do you mean by "in the middle of the page"? Do you mean, for instance, the behavior of "middle.php" in the following PHP example: Is that what you are after? Yes, that is what I am after. For instance, if one were to look at

Re: Web development with Python 3.1

2009-10-28 Thread Albert Hopkins
On Wed, 2009-10-28 at 15:32 +0200, Dotan Cohen wrote: > > def index(request): > >unmaintanable_html = """ > > > > > >Index > > > > > >Embedded HTML is a PITA > >but some like pains... > > > > > > """ > >return HttpResponse(unmaintanable_html) > > > > And if I need to

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> What do you mean by "in the middle of the page"? Do you mean, for instance, > the behavior of "middle.php" in the following PHP example: > > > include_once("beginning.inc.php"); > > include_once("middle.php"); > > include_once("end.inc.php"); > > ?> > > Is that what you are after? > Yes, that i

Re: Web development with Python 3.1

2009-10-28 Thread Rami Chowdhury
On Wed, 28 Oct 2009 12:42:17 -0700, Dotan Cohen wrote: I've already given you that for TG: class RootController(BaseController):   @expose()   def page(self, torwalds=None):       return "%s" % (torwalds if torwalds else "" Does return mean that this could not be used in the middle of

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> Actually, currently in the example url >> http://example.com/path/to/script.py?var1=hello&var2=world the script >> is /home/user/site-name/public_html/path/ (with no filename extension) >> and the script.py is actually page.html which is an arbitrary, >> descriptive string and not part of the sc

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> I've already given you that for TG: > > class RootController(BaseController): > >   @expose() >   def page(self, torwalds=None): >       return "%s" % (torwalds if torwalds > else "" > Does return mean that this could not be used in the middle of a page? > Of course nobody would do it that way

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> It >> did not look like I had any control over the tags at all. > > I can tell you you have full control over the whole HTTP response's content > and headers. And FWIW, this has nothing to do with templating systems. > That's good to know. Actually, it's more that good: I am looking into Django

Re: Web development with Python 3.1

2009-10-28 Thread John Nagle
Diez B. Roggisch wrote: John Nagle schrieb: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" pr

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : *Why* on earth do you think using a templating system will give you any less control on the generated HTML ? Because I am wrong. I have already come to that conclusion. I know that Python is far enough developed that if I feel that I am fighting it, then _I_ am in the wr

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> *Why* on earth do you think using a templating system will give you any less > control on the generated HTML ? > Because I am wrong. I have already come to that conclusion. I know that Python is far enough developed that if I feel that I am fighting it, then _I_ am in the wrong, not Python. How

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : >>> I insist on handling the HTML myself. >> I just don't get how embedding HTML in applicative code - a well-known >> antipattern FWIW - relates to "handling the HTML yourself". Can you *please* >> explain how a templating system prevents you from "handling the HTML" >> yo

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. Well... there must be a reason, for sure... No ? ֹYes, but I don't like

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : I have no idea what reverse url generation is. It's a mean to avoid hard-coding urls in your application code - the url is fully generated by the 'url mapping' system. I don't need that, see below. I assume that the user will call http://example.com/path/to/script.py?

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
Dotan Cohen wrote: >>> I insist on handling the HTML myself. >> >> I just don't get how embedding HTML in applicative code - a well-known >> antipattern FWIW - relates to "handling the HTML yourself". Can you >> *please* explain how a templating system prevents you from "handling the >> HTML" your

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I insist on handling the HTML myself. As for converting the request >> variables into Python variables, if a class/framework makes that >> easier then I would gladly use it. My question was serious. How can I >> do those things? > > Using a framework? In Pylons/TG2, my code looks like this: > >

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I insist on handling the HTML myself. > > I just don't get how embedding HTML in applicative code - a well-known > antipattern FWIW - relates to "handling the HTML yourself". Can you *please* > explain how a templating system prevents you from "handling the HTML" > yourself. > >From the little

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. >>> >>> Well... there must be a reason, for sure... No ? >>> >> >> ֹYes, but I don'

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I have no idea what reverse url generation is. > > It's a mean to avoid hard-coding urls in your application code - the url is > fully generated by the 'url mapping' system. > I don't need that, see below. >> I assume that the user >> will call http://example.com/path/to/script.py?var1=hello&

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
Dotan Cohen wrote: >>> I should probably expand on this: >>> >>> How can I get an array with all the GET variables in Python? >>> How can I get an array with all the POST variables in Python? >>> How can I get an array with all the COOKIE variables in Python? >>> How can I get the request URI path

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : I should probably expand on this: How can I get an array with all the GET variables in Python? How can I get an array with all the POST variables in Python? How can I get an array with all the COOKIE variables in Python? How can I get the request URI path (everything after

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. Well... there must be a reason, for sure... No ? ֹYes, but I don't lik

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : 2009/10/28 Bruno Desthuilliers : Dotan Cohen a écrit : declarative mapping of urls to code Apache does this, unless I am misunderstanding you. Using url rewriting ? Yes, fine. Then tell me how you implement "reverse" url generation (like Django or Routes do). I have no

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> How can I get an array with all the GET variables in Python? >> How can I get an array with all the POST variables in Python? >> How can I get an array with all the COOKIE variables in Python? >> How can I get the request URI path (everything after >> http://[www.?]example.com/)? >> >> That's al

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> While I know that to be true in the general sense, from what I've >> looked at Django and other frameworks it seems that the web frameworks >> push the coder to use templates, not letting him near the HTML. > > Well... there must be a reason, for sure... No ? > ֹYes, but I don't like it. >> D

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
2009/10/28 Bruno Desthuilliers : > Dotan Cohen a écrit : >>> >>> declarative mapping of urls to code >> >> Apache does this, unless I am misunderstanding you. > > Using url rewriting ? Yes, fine. Then tell me how you implement "reverse" > url generation (like Django or Routes do). I have no idea w

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I should probably expand on this: >> >> How can I get an array with all the GET variables in Python? >> How can I get an array with all the POST variables in Python? >> How can I get an array with all the COOKIE variables in Python? >> How can I get the request URI path (everything after >> http

Re: Web development with Python 3.1

2009-10-28 Thread Mikhail M.Smagin
Hello, Dotan On Wed, 28 Oct 2009 10:26:22 +0200 Dotan Cohen wrote: > I should probably expand on this: > > How can I get an array with all the GET variables in Python? > How can I get an array with all the POST variables in Python? > How can I get an array with all the COOKIE variables in Python

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
John Nagle a écrit : Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Pyth

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : A webframework is *written* in python. Your whole line of argumentation boils down to "I can write things myself in python, why use libraries/frameworks". Yes. You can also delete your standard-lib, and code everything in there yourself - with the same argument. Using a fra

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Well, yes- but it's also DRY, and while DRTW (like the acronym, btw) helps to prevent your code from being unreadable to someone else, DRY helps to ensure that when you have to change something you don't have to worry about changing it in 37 and a half other places at the sa

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : declarative mapping of urls to code Apache does this, unless I am misunderstanding you. Using url rewriting ? Yes, fine. Then tell me how you implement "reverse" url generation (like Django or Routes do). of code to templates Those who code in HTML don't need thi

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
John Nagle schrieb: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Pytho

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
Dotan Cohen schrieb: While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. For instance, I was looking for a class / framework that provided a proven

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> Even 2.6 is too bleeding-edge?  Uh oh, Fedora 12 is shipping it. > Fedora has traditionally been known as a bleeding edge distro. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> While I know that to be true in the general sense, from what I've > looked at Django and other frameworks it seems that the web frameworks > push the coder to use templates, not letting him near the HTML. > > For instance, I was looking for a class / framework that provided a > proven method of d

Re: Web development with Python 3.1

2009-10-28 Thread Paul Rubin
John Nagle writes: > Until MySQLdb gets ported to something later than Python 2.5, support > for a "data-based web site" probably has to be in Python 2.5 or earlier. Even 2.6 is too bleeding-edge? Uh oh, Fedora 12 is shipping it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> A webframework is *written* in python. Your whole line of argumentation > boils down to "I can write things myself in python, why use > libraries/frameworks". Yes. You can also delete your standard-lib, and code > everything in there yourself - with the same argument. > > Using a framework is abo

Re: Web development with Python 3.1

2009-10-28 Thread John Nagle
Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Python 2.5 or earlier.

Re: Web development with Python 3.1

2009-10-27 Thread Diez B. Roggisch
Dotan Cohen schrieb: Well, yes- but it's also DRY, and while DRTW (like the acronym, btw) helps to prevent your code from being unreadable to someone else, DRY helps to ensure that when you have to change something you don't have to worry about changing it in 37 and a half other places at the sam

Re: Web development with Python 3.1

2009-10-27 Thread geremy condra
On Tue, Oct 27, 2009 at 4:52 PM, Dotan Cohen wrote: >> Well, yes- but it's also DRY, and while DRTW (like the acronym, btw) >> helps to prevent your code from being unreadable to someone else, >> DRY helps to ensure that when you have to change something you >> don't have to worry about changing i

Re: Web development with Python 3.1

2009-10-27 Thread Dotan Cohen
> Well, yes- but it's also DRY, and while DRTW (like the acronym, btw) > helps to prevent your code from being unreadable to someone else, > DRY helps to ensure that when you have to change something you > don't have to worry about changing it in 37 and a half other places > at the same time. Espec

Re: Web development with Python 3.1

2009-10-27 Thread geremy condra
On Tue, Oct 27, 2009 at 3:11 PM, Dotan Cohen wrote: >> Using a framework helps to ensure that your code is easy to maintain. > > I see, that is a good point. With someone else (the framework > maintainers) worrying about maintaining function such as HTTP request > parsers, a lot of work won't have

Re: Web development with Python 3.1

2009-10-27 Thread Aaron Watters
On Oct 27, 10:26 am, "Diez B. Roggisch" wrote: ... > Yes, in the end of the day, it's all python. For me, in the end of the day, it's all java or PHP. But I'm working on that. For my purposes the "frameworks" don't really help much. That's why I built WHIFF :). http://aaron.oirt.rutgers.edu/my

Re: Web development with Python 3.1

2009-10-27 Thread Dotan Cohen
> Using a framework helps to ensure that your code is easy to maintain. I see, that is a good point. With someone else (the framework maintainers) worrying about maintaining function such as HTTP request parsers, a lot of work won't have to be [re]done. > DRY isn't about saving time now, its abo

Re: Web development with Python 3.1

2009-10-27 Thread geremy condra
On Tue, Oct 27, 2009 at 2:36 PM, Dotan Cohen wrote: >> declarative mapping of urls to code > > Apache does this, unless I am misunderstanding you. > > >> of code to templates > > Those who code in HTML don't need this. In any case it's not hard to > call a function in a class that writes the HTML

Re: Web development with Python 3.1

2009-10-27 Thread Dotan Cohen
> declarative mapping of urls to code Apache does this, unless I am misunderstanding you. > of code to templates Those who code in HTML don't need this. In any case it's not hard to call a function in a class that writes the HTML before the content, then write the content, then call another fun

Re: Web development with Python 3.1

2009-10-27 Thread Martin v. Löwis
> I am very much new to Python, and one of my first projects is a simple > data-based website. I am starting with Python 3.1 (I can hear many of > you shouting "don't - start with 2.6"), but as far as I can see, none of > the popular python-to-web frameworks (Django, CherryPy, web.py, etc.) > are P

Re: Web development with Python 3.1

2009-10-27 Thread Diez B. Roggisch
Dotan Cohen wrote: > Why the push to use a framework, and why the resistance from the OP? > > Does the OP need to work with cookies or other http-specific features? > In fact, other than cookies, what http-specific features exist? declarative mapping of urls to code, of code to templates, abstra

Re: Web development with Python 3.1

2009-10-27 Thread Dotan Cohen
Why the push to use a framework, and why the resistance from the OP? Does the OP need to work with cookies or other http-specific features? In fact, other than cookies, what http-specific features exist? Does Python have a built-in framework for making available GET and POST variables? Database q

RE: Web development with Python 3.1

2009-10-27 Thread Billy Earney
Alan Harris-Reid Sent: Tuesday, October 27, 2009 6:08 AM To: Python List Subject: Re: Web development with Python 3.1 Aaron Watters wrote: On Oct 25, 7:52 pm, Alan Harris-Reid <mailto:a...@baselinedata.co.uk> wrote: I am very much new to Python, and one of my first projects is a simpl

Re: Web development with Python 3.1

2009-10-27 Thread Alan Harris-Reid
Aaron Watters wrote: On Oct 25, 7:52 pm, Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting "don't - start with 2.6"), but as far as I can see, none of the popular p

Re: Web development with Python 3.1

2009-10-26 Thread Aaron Watters
On Oct 25, 7:52 pm, Alan Harris-Reid wrote: > I am very much new to Python, and one of my first projects is a simple > data-based website. I am starting with Python 3.1 (I can hear many of > you shouting "don't - start with 2.6"), but as far as I can see, none of > the popular python-to-web framew

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Hi Paul, thanks for the reply (despite the sarcasm ;-) ), >Does it occur to you that the unavailability of those frameworks is part of the REASON they say to use 2.x? Of course, but that doesn't mean that there isn't someone out there who may know of a framework that is already Python3 compati

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Anyway, for simple web programming, frameworks are not worth the hassle. Just use the cgi module. I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you th

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Exarkun - thanks for the reply > don't - start with 2.6 Thought you might say that ;-) Regards, Alan On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of

Re: Web development with Python 3.1

2009-10-26 Thread Echo
bottle (http://bottle.paws.de/) can run on python 3.1 after running the 2to3 tool on it. It is a very lightweight framework. CherryPy 3.2 also runs on python 3.x I don't know if there are any others. On Sun, Oct 25, 2009 at 7:52 PM, Alan Harris-Reid wrote: > > I am very much new to Python, and o

Re: Web development with Python 3.1

2009-10-26 Thread Chris Withers
Brendon Wickham wrote: I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you the concepts. I fail to see how starting with a framework is a good idea if you don't know

Re: Web development with Python 3.1

2009-10-25 Thread Brendon Wickham
> > Anyway, for simple web programming, frameworks are not worth the > hassle. Just use the cgi module. > > I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you the conc

Re: Web development with Python 3.1

2009-10-25 Thread exarkun
On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting "don't - start with 2.6"), but as far as I can see, none of the popular python-to-web fr

Re: Web development with Python 3.1

2009-10-25 Thread Paul Rubin
Alan Harris-Reid writes: > I am very much new to Python, and one of my first projects is a simple > data-based website. I am starting with Python 3.1 (I can hear many of > you shouting "don't - start with 2.6"), but as far as I can see, none > of the popular python-to-web frameworks (Django, Cherr