Re: Python / Apache / MySQL

2006-02-14 Thread Kalle Anke
On Tue, 14 Feb 2006 12:04:45 +0100, Peter Hansen wrote (in article <[EMAIL PROTECTED]>): > SQLite. (As but one option, but "just basic selects" is certainly > included in the set of suitable conditions for SQLite use.) I've considered to use SQLite for an application but for completely differen

Re: Python / Apache / MySQL

2006-02-14 Thread Kalle Anke
On Tue, 14 Feb 2006 11:19:11 +0100, bruno at modulix wrote (in article <[EMAIL PROTECTED]>): > The reason is mostly that either you need a real, full-blown, rock-solid > RDBMS - which MySQL is definitively not - or you dont - in which case > SQLite is probably a much more lightweight and agile so

Re: Python / Apache / MySQL

2006-02-14 Thread Kalle Anke
On Tue, 14 Feb 2006 10:32:34 +0100, Sybren Stuvel wrote (in article <[EMAIL PROTECTED]>): > I second Bruno: swap MySQL in favour of PostgreSQL. And the reason is ?? (apart from PostgreSQL being larger and more complete, what are the differences for "simple" usage?) jem -- http://

Re: getting the path in a cgi script

2005-10-14 Thread Kalle Anke
On Fri, 14 Oct 2005 18:20:10 +0200, Fredrik Lundh wrote (in article <[EMAIL PROTECTED]>): > import os > path_info = os.environ.get("PATH_INFO") Tackar ... det var nåt enkelt det mindes jag :-) -- http://mail.python.org/mailman/listinfo/python-list

getting the path in a cgi script

2005-10-14 Thread Kalle Anke
I know I've done this once before ... I think ... but now I can't figure out how to do it I've set my web server to use an alias similar to this ScriptAlias /xx/ "/Library/WebServer/CGI-Executables/xxx.cgi/" which makes it possible for me to write http://127.0.0.1/xx/some/kind/of/path m

What documentation "standard" to use

2005-10-05 Thread Kalle Anke
I'm confused of how I should document my code, I've always liked being able to document my code directly in my source file and then to use some tool to extract the documentation to some other format. My problem with Python is that there are so many tools and formats ... I don't know which one I

Java pretty formatter

2005-10-05 Thread Kalle Anke
Does a Java "pretty formatter" exist? I would like to use a Python based web building tool but would like to pretty format Java code (for example adding color to keywords, etc). I haven't managed to find one but have probably been looking in the wrong places. -- http://mail.python.org/mailma

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Kalle Anke
On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote (in article <[EMAIL PROTECTED]>): > OK... your post seems to indicate a belief that everyone else is > somehow incompetent. Sounds a bit like the "I am sane, it is everyone > else who is crazy" concept. Can you suggest a technology or > technologist w

Re: New-style classes questions

2005-09-25 Thread Kalle Anke
On Sun, 25 Sep 2005 15:24:29 +0200, Gerrit Holl wrote (in article <[EMAIL PROTECTED]>): > I like this. However, perhaps other people reading my source code won't > like it, because when they see 'class Foo:', they might expect an > old-style class. But it's so much better to type and to read, that

New-style classes questions

2005-09-25 Thread Kalle Anke
I'm confused by the concepts of old-style vs new-style classes, I've read most of the documents I found about this but it doesn't "click". Probably because I wasn't around before 2.2. Anyway, the reason for new style classes are to make the whole type/object thing work better together. There ar

Re: parsing a date

2005-09-24 Thread Kalle Anke
On Sat, 24 Sep 2005 16:06:06 +0200, Peter Hansen wrote (in article <[EMAIL PROTECTED]>): > Kalle Anke wrote: >> On Fri, 23 Sep 2005 23:01:18 +0200, Larry Bates wrote: >> >>> but I'm not sure it is "better". I guess it depends >>> on what y

Re: parsing a date

2005-09-24 Thread Kalle Anke
On Fri, 23 Sep 2005 23:01:18 +0200, Larry Bates wrote (in article <[EMAIL PROTECTED]>): > but I'm not sure it is "better". I guess it depends > on what you want to do with them after parsing. Sorry, I should have been clearer. I want to parse the date and create a 'date object' that is a part

parsing a date

2005-09-23 Thread Kalle Anke
I want to parse a date string, for example '2005-09-23', and since I haven't done this before I would like to ask what is the best way to do it. I've looked around and the dateutil seems to be what most people use, but unfortunately I only get an empty file when I try to download it. I also tri

What XML lib to use?

2005-09-13 Thread Kalle Anke
I'm confused, I want to read/write XML files but I don't really understand what library to use. I've used DOM-based libraries in other languages, is PyXML the library to use? -- http://mail.python.org/mailman/listinfo/python-list

Python on Palm??

2005-08-19 Thread Kalle Anke
Is there some implementation of Python that runs on Palm OS? I've found "Python to Palm Pilot Port" and Pippy which both seem to be based on Python 1.5 Is there some implementation that implements later ve

Re: Migrating from Windows to OS X

2005-06-18 Thread Kalle Anke
On Sat, 18 Jun 2005 17:07:04 +0200, [EMAIL PROTECTED] wrote (in article <[EMAIL PROTECTED]>): > How are the development tools for the Mac? I'll use IDLE if it's > available, but I like Scintilla better. Don't know ... I think that MacPython is perhaps what you're looking for. Personally, I use

Re: Python documentation problem

2005-06-18 Thread Kalle Anke
On Sat, 18 Jun 2005 11:49:38 +0200, Xah Lee wrote (in article <[EMAIL PROTECTED]>): > the problem is that the page essentially says nothing. Nothing that is > relevant to programing, and such nothingness occupies a significant > portion of the python doc. (at least a quarter) It is like reading a

Re: Migrating from Windows to OS X

2005-06-18 Thread Kalle Anke
On Sat, 18 Jun 2005 09:26:23 +0200, [EMAIL PROTECTED] wrote (in article <[EMAIL PROTECTED]>): > I am sitting in front of a nice new PowerBook portable which has OS > 10.4 installed. The Python.org web site says that Apple has shipped OS > 10.4 with Python 2.3.5 installed. How exactly do I access

Re: Hopefully simple regular expression question

2005-06-14 Thread Kalle Anke
On Tue, 14 Jun 2005 13:01:58 +0200, [EMAIL PROTECTED] wrote (in article <[EMAIL PROTECTED]>): > How do I modify my regular expression to match on expressions as well > as just single words?? import re def createStandaloneWordRegex(word): """ return a regular expression that can find 'peter'

Re: How to get/set class attributes in Python

2005-06-14 Thread Kalle Anke
On Tue, 14 Jun 2005 06:40:51 +0200, Terry Hancock wrote (in article <[EMAIL PROTECTED]>): > I find the biggest problem coming to Python from a language > like C, C++, or Java is that you overthink things and try to > do them the hard way. A lot of times, you find out that the > "Python way" to do

Re: How to get/set class attributes in Python

2005-06-13 Thread Kalle Anke
On Mon, 13 Jun 2005 20:41:48 +0200, Terry Hancock wrote (in article <[EMAIL PROTECTED]>): > 1) Assume the variables are of a sensible type (not > necessarily the one you expected, though), and provide > exception handling to catch the case where their interface > does not match what you expect.

Learning more about "The Python Way"

2005-06-12 Thread Kalle Anke
Those who have read my posts today have probably understood that I'm not a "true" Python programmer ... but I want to learn more (I think that Python is rather fun). I've read "Learning Python" pretty thoroughly, I've looked at some of the tutorials, some of online documentation, etc. But I sti

Re: How to get/set class attributes in Python

2005-06-12 Thread Kalle Anke
On Sun, 12 Jun 2005 15:35:15 +0200, John Machin wrote (in article <[EMAIL PROTECTED]>): > OTOH, I beseech you to consider an attitude transplant :-) ;-) > I.e. put your effort into writing code that allows people to do useful > things, rather than opaque guff full of __blahblah__ that stops the

Re: How to get/set class attributes in Python

2005-06-12 Thread Kalle Anke
On Sun, 12 Jun 2005 13:59:27 +0200, deelan wrote (in article <[EMAIL PROTECTED]>): > the pythonic way is to use "property" (as others have already explained) > only when is *stricly necessary*. this may clarify things up: Thanks for the link (although Java was only one of the languages I was thi

Re: How to get/set class attributes in Python

2005-06-12 Thread Kalle Anke
On Sun, 12 Jun 2005 12:20:29 +0200, tiissa wrote (in article <[EMAIL PROTECTED]>): > You can 'hide' you getsetters using a property attribute[1]: > > [1]http://docs.python.org/lib/built-in-funcs.html Thanks, this is exactly what I was looking for -- http://mail.python.org/mailman/listinfo/py

How to get/set class attributes in Python

2005-06-12 Thread Kalle Anke
I'm coming to Python from other programming languages. I like to hide all attributes of a class and to only provide access to them via methods. Some of these languages allows me to write something similar to this int age( ) { return theAge } void age( x : int ) { theAge = x } (I usually do m