Hi all,
when I've got a string, say:
URL="http://xyz/blah?session=%(session)s&message=%(message)s"
is it possible to fill in only 'session' and leave "%(message)s" as is
when it isn't present in the values dict?
For example:
URL % { 'session' : 123 }
raises KeyError because of missing 'message'
Chris Rebert wrote:
> On Mon, Dec 29, 2008 at 4:06 AM, Michal Ludvig wrote:
>> Hi,
>>
>> in my script I have sys.stdout and sys.stderr redefined to output
>> unicode strings in the current system encoding:
>>
>>encoding = locale.getp
Hi Omer,
> I'm seeing this on fc8 with a custom built python2.6. Not happening
> with any other packages (e.g. boto). Workaround of course was just to
> copy the S3 dir to /usr/local/lib/python2.6/site-packages.
I've found it. The culprit was a pre-set install prefix in setup.cfg - I
can't reme
Hi,
in my script I have sys.stdout and sys.stderr redefined to output
unicode strings in the current system encoding:
encoding = locale.getpreferredencoding()
sys.stdout = codecs.getwriter(encoding)(sys.stdout)
However on some systems the locale doesn't let all the unicode chars
/Python.framework/Versions/2.5/lib/python2.5
While this directory *is* in sys.path, the .../site-packages one isn't,
see below in my original post.
So why did Python decide to put the modules there? Why not one of the
directories that are in sys.path? Is this configurable somewhere?
Thanks!
Michal
M
Hi,
I have recently seen some reports from users of my s3cmd script [1] who
installed the package using the provided distutils-based setup.py and
immediately after installation the script failed to run because it
couldn't find its modules.
Here's an example session from Mac OS X, but similar beha
Hi all,
is there any way to determine what's the charset of filenames returned
by os.walk()?
The trouble is, if I pass argument to os.walk() I get the
filenames as byte-strings. Possibly UTF-8 encoded Unicode, who knows.
OTOH If I pass to os.walk() all the filenames I get in
the loop are alrea