stlib name clash when using python as ASP language

2007-02-01 Thread Joost
Hi guys, I have couple of simple python based active server pages that make use of httplib2 which uses gzip.py. IIS, however, also has a gzip.dll located at the iis/inetsrv path. When using ASP the iis/inetsrv path is placed as the first item in sys.path. Consequently importing httplib2 will caus

Re: stlib name clash when using python as ASP language

2007-02-04 Thread Joost
> You *assume* that [0] is the IIS path, but perhaps some other imported > module changed sys.path too, and now it's not the first one anymore. > If you know exactly the path, try sys.path.remove(iis_path). > > -- > Gabriel Genellina It's was a hack and definitely not meant to go in to production

Re: utcnow

2012-09-16 Thread Joost Molenaar
e/Athens') >>> datetime.now().replace(tzinfo=AMS).astimezone(ATH) datetime.datetime(2012, 9, 17, 7, 37, 38, 573223, tzinfo=tzfile('/usr/share/zoneinfo/Europe/Athens')) Voila, it seems like you're one hour ahead of me. :-) HTH, Joost On 17 Septem

Splitting large packages with distutils

2012-10-30 Thread Joost Molenaar
ion-specific code, and I hope that this way I'll be able to accurately specify and install the dependencies between projects without running ever more risk of clashing with a top-level module name. But I'm open to the suggestion that my idea is totally misguided. :-) Salutation, Joost

use a regex or not?

2005-06-21 Thread Joost Jacob
I am looking for a function that takes an input string and a pattern, and outputs a dictionary. # @param s str, lowercase letters # @param p str, lowercase and uppercase letters # @return dict def fill(s, p): d = {} return d String s has characters from the lowercase letters. Str

Re: use a regex or not?

2005-06-21 Thread Joost Jacob
Oops, the 3rd test should be fill('bb', p='Aa') resulting in the empty dict {} because no binding for A can be found. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp development with macros faster than Python development?..

2005-07-05 Thread Joost Jacob
Very hard to say. LISP has OOP too, Google for CLOS. Operator overloading is something to avoid anyway, IMHO, just like static typing is something to avoid if you need fast development, on schedule and the like. LISP has one thing that Python does not have: LISP code is LISP data. A thorough stu

Re: Odd msg received from list

2013-11-14 Thread Joost Molenaar
y I also received a warning from the debian-laptop mailing list program. Joost -- https://mail.python.org/mailman/listinfo/python-list

Re: Python TUI that will work on DOS/Windows and Unix/Linux

2013-09-10 Thread Joost Molenaar
Have you looked at Blessings? I never tried it, but the API seems much cleaner than Curses. https://pypi.python.org/pypi/blessings/ -- Joost Molenaar -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-15 Thread Joost Molenaar
Since the From address is random, it most likely doesn't exist, which could be reason for Google's smtp server to reject the message or to deliver it to spam. Also, the reverse DNS for 84.200.17.58 does not resolve to secure.superhost.gr, which could also be reason to reject the message. On Sun,

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Joost Molenaar
> Look, > > i want this to stop. > Open your own thread and discuss this if you like. > This is a thread i opened for a specific question and all i see its > irrelevant answers. Hi Ferrous, The problem is not in your Python code. You can debug it from the command line by typing the 'echo ... | ma

Re: extraction tool using CRF++

2013-10-01 Thread Joost Molenaar
Hi Ron, In the python/ subdirectory of the CRF++ source package there's a README with instructions on how to use the CRFPP python module. HTH, Joost On Tue, Oct 1, 2013 at 4:24 PM, Vlastimil Brom wrote: > 2013/10/1 cerr : >> Hi, >> >> I want to write an extraction

Re: How to streamingly read text file and display whenever updated text

2013-10-05 Thread Joost Molenaar
A bit of googling found me this: http://www.linux-support.com/cms/implementation-of-tail-in-python/ import time import sys def tail_f(file): interval = 1.0 while True: where = file.tell() line = file.readline() if not line: time.sleep(interval) file.seek(where) els

Re: The Modernization of Emacs

2007-06-22 Thread Joost Kremers
avigate deep directory trees -- if you're already in the directory > where the file is, it'd be fewer keystrokes to specify the file than > opening it in emacs. even with tab-completion. well, ok, typing `emacsclient ' requires more keystrokes than `vi ', but that's w

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-25 Thread Joost Kremers
right plug-ins emacs can do this too? :-) because emacs exposes its lisp system to the user, allowing one to add basically any functionality one can come up with? ;-) -- Joost Kremers [EMAIL PROTECTED] Selbst in die Unterwelt dringt durch Spalten Licht

FM synthesis using Numpy

2007-08-14 Thread Joost Molenaar
so this seems wrong too - the problem is not related to Numpy, because the effect also happens in pure-Python implementations of my bug As you can see, I'm at a loss and am even trying incorrect bugfixes. Any help would be very welcome. Thanks for your time, Joost Molenaar [I left out a wri

Re: FM synthesis using Numpy

2007-08-16 Thread Joost Molenaar
Thanks/bedankt Bas for the educative reply. I think I got misleaded by Max/MSP's tutorial[1], because MSP seems to automatically adjust the phase when you combine two oscillators in the way that I did. Joost [1] page 112 of http://www.cycling74.com/download/MSP45TutorialsAndTopics.pdf --

Strange generator problem

2007-10-05 Thread Joost Cassee
(range(3))) [0, 1, 2] Can anyone explain the difference? The python version is 2.5.1. Regards, Joost -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange generator problem

2007-10-05 Thread Joost Cassee
On 05/10/2007 11:34, Paul Hankin wrote: > Lists aren't copied when they're yielded, Duh! Thanks for your sharp eye. -- Joost Cassee http://joost.cassee.net -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-08 Thread Joost Kremers
. the word "man" is related to (though not directly derived from) "mind", and the latin word "mens", which means "mind". -- Joost Kremers [EMAIL PROTECTED] Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) -- http://mail.python.org/mailman/listinfo/python-list

Re: pop langs website ranking

2008-02-11 Thread Joost Diepenmaat
org apparenly also contains an index to 3rd party libraries, you may want to compare it to cpan.org (currently at 9,199) for instance. -- Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/ -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse/argparse for cgi/wsgi?

2010-12-14 Thread Joost Molenaar
called, else a 'Method Not Allowed' response code is returned. HTH Joost On 10 December 2010 17:36, samwyse wrote: > Has anyone ever built some sort of optparse/argparse module for cgi/ > wsgi programs? I can see why a straight port wouldn't work, but a > module that

Re: optparse/argparse for cgi/wsgi?

2010-12-14 Thread Joost Molenaar
To aid your googling, the problem is also commonly called 'Dispatching' instead of 'Routing'. Joost On 14 December 2010 12:19, Joost Molenaar wrote: > Many people have. :-) > > In the context of WSGI you're basically talking about routing > middlewar

Re: if the else short form

2010-09-29 Thread Joost Molenaar
Hi Nico, it's converting fill==True to an int, thereby choosing the string "False," or "True," by indexing into the tuple. Try this in an interpreter: >>> ['a','b'][False] 'a' >>> ['a','b'][True] 'b&

Re: how to scrutch a dict()

2010-10-21 Thread Joost Molenaar
Using a 2.7/3.x dictionary comprehension, since you don't seem to mind creating a new dictionary: def _scrunched(d):     return { key: value for (key, value) in d.items() if value is not None } Joost On 21 October 2010 06:32, Phlip wrote: > > Not Hyp: > > def _scrunch(**d

Descriptors and decorators

2010-10-25 Thread Joost Molenaar
r.__get__: create a new instance of the decorator, with a bound version of the decorated method, and call that without needing a 'self' parameter. Is this in fact the easiest way to explain it? Joost Molenaar -- http://mail.python.org/mailman/listinfo/python-list

Re: Descriptors and decorators

2010-10-25 Thread Joost Molenaar
On 25 October 2010 15:20, bruno.desthuilli...@gmail.com wrote: > So, your decorator is applied to a function, and wraps it into a > Decorator object. Or more exactly, the function is defined, then the > Decorator class is called so a new Decorator object is instanciated > with the function as argu