Re: usage of file separator

2007-12-31 Thread Thomas Wittek
[EMAIL PROTECTED]: > for x in imagefilenames: > imgfile=folder+"/"+x > newimgfilenamelist.append(imgfile) > > [..] how do i make it work on other os? from os.path import join #.. imgfile=join(folder, x) -- Thomas Wittek Web: http://gedankenkonstrukt.de/

Re: Python web frameworks

2007-11-20 Thread Thomas Wittek
Jeff: > I don't know much about the others. Turbo gears uses Mochikit, which > hasn't had a new stable release in some time. I prefer jQuery myself. You can use jQuery with TurboGears if you develop custom widgets (I do so). No problem here. -- Thomas Wittek Web: http://geda

Re: A Python 3000 Question

2007-10-30 Thread Thomas Wittek
be a *property*, say `object.len`. It doesn't do something on the object, but rather gives some information about its "state". -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheriting automatic attributes initializer considered harmful?

2007-10-17 Thread Thomas Wittek
ames? Generellay, it does. But it also generates some additional attributes dynamically that are not directly defined as columns. So, restricting the attributes to the columns would be too strict. Thanks! -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231

Inheriting automatic attributes initializer considered harmful?

2007-10-17 Thread Thomas Wittek
I feel very unsafe about that, because I've not seen this (in the few lines from some tutorials) before. Regards -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Automatically organize module imports

2007-10-16 Thread Thomas Wittek
pendencies right on Win XP) Thank you! -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Automatically organize module imports

2007-10-15 Thread Thomas Wittek
Jean-Paul Calderone: > On Mon, 15 Oct 2007 20:52:11 +0200, Thomas Wittek > <[EMAIL PROTECTED]> wrote: >> Is there a tool that can organize my import section? > > Pyflakes will tell you which imports aren't being used (among other > things). I don'

Automatically organize module imports

2007-10-15 Thread Thomas Wittek
a tool that can organize my import section? Shall I fall back to ambiguous imports like *? Shall I write out the module name for every class/function that I use (quite unhandy)? Thank you! -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail

Re: Library for crawling forums

2007-10-11 Thread Thomas Wittek
mbination of mechanize [1] and BeautifulSoup [2]? [1] http://wwwsearch.sourceforge.net/mechanize/ [2] http://www.crummy.com/software/BeautifulSoup/ -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet another comparison of Python Web Frameworks

2007-10-06 Thread Thomas Wittek
Michele Simionato: > At work we are shopping for a Web framework, so I have been looking at > the available options > on the current market. At least, you missed Turbo Gears :) http://turbogears.org/ For me, it feels more integrated than Pylons. -- Thomas Wittek Web: http://gedankenkon

Re: Simple Python Spider

2007-08-23 Thread Thomas Wittek
luca bertini schrieb: > 1) ask google a query http://code.google.com/apis/ http://code.google.com/apis/ajaxsearch/ But you probably have to reverse engineer the JavaScript lib. > 2) parse the data http://blog.hill-street.net/?p=7 -- Thomas Wittek Web: http://gedankenkonstrukt.de/

Re: IDE for Python

2007-08-21 Thread Thomas Wittek
Joel Andres Granados schrieb: > I have tried various times to use an IDE for python put have always been > disapointed. > I haven't revisited the idea in about a year and was wondering what the > python people > use. Did you try Eclipse + PyDev? I'm quite happy with tha

Re: LRU cache?

2007-08-11 Thread Thomas Wittek
from the source and) add it on top and remove the last one, if the list exceeds N entries. So you need to do two things: 1) Maintain a list: Use a (linked) list. 2) Random access to that list: Use a dict (hash), that also has to be updated on removal/addition of objects. -- Thom

Re: Distributing python apps

2007-07-09 Thread Thomas Wittek
requiring a Python installation." -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Pretty Printing Like Tidy for HTML

2007-07-07 Thread Thomas Wittek
t's relatively common that you have some "legacy" code (e.g. from (ex-)colleages) that doesn't conform to your style preferences/your companys coding guidelines. In such a case those tools can be very helpful. -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROT

Re: Matrix Multiplication

2007-06-17 Thread Thomas Wittek
[EMAIL PROTECTED]: > Is there any direct function for matrix multiplication in Python or > any of its packages? or do we have to multiply element by element? First hit on google for "python matrix": http://matpy.sourceforge.net/ -- Thomas Wittek http://gedankenkonstrukt.de

Re: for web application development

2007-06-14 Thread Thomas Wittek
ary/l-turbogears/ > I am avoiding to learn > template language as much as possible. You will need a templating language to put out your HTML. Of course that will not be a full programming language like PHP. -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] -- http://m

Re: stealth screen scraping with python?

2007-05-12 Thread Thomas Wittek
ear that > they probably monitor for this type of activity, and will soon ban my > IP. Use anonymizing proxies: http://www.google.com/search?q=proxies+OR+proxy+anonymous+OR+anonymizing -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list