Description:
The Python computer language.
|
|
|
Illegal seek error with seek() and os.lseek()
|
|
I am trying to use os.open() and os.lseek() methods to operate on a device file in Linux. My code goes something like this -
# first, open the file as a plain binary
try:
self.file = open(/dev/relpcfpga, "r+b", buffering=0)
except IOError:
raise IOError ('Failed to open.')
# Figure out file size... more »
|
|
First post
|
|
Hi guys! This is my first post on this list. I'd like have your opinion on how to safely implement WSGI on a production server. My benchmarks show no performance differences between our PHP and Python environments. I'm using mod_wsgi v3.4 with Apache 2.4. Is that ok or can it get faster? Thanks in advance.... more »
|
|
PDF generator decision
|
|
Hi folks,
This questions may be asked several times already, but the development of relevant software continues day-for-day. For some time now I've been using xhtml2pdf [1] to generate PDF documents from HTML templates (which are rendered through my Django-based web application. This have been working for some time now but I'm constantly adding new templates and they are not looking like I want it (sometimes bold text is bold, sometimes not, layout issues, etc). I'd like to use something else than xhtml2pdf.... more »
|
|
weave and 64 bit issues
|
|
Hi everyone,
I am facing a strange problem using weave on 64 bit machine.
Specifically with weave's inline function. It has something to do with
weave's catalog. Similar issues I found in the past (very old)
[link]... more »
|
|
Writing a blog post on the new Enum.
|
|
I have followed the process of the new PEP closely, and as such I know
that there is a repository containing the reference implementation, a
link to which was posted on the python-dev list. Is it okay to link to
this repository in my new blog post about the Enum, so my readers can
try it out? I will warn my readers about it not being final and not to... more »
|
|
Getting ASCII encoding where unicode wanted under Py3k
|
|
I have a Py3k script, pasted below. When I run it I get an error about
ASCII codecs that can't handle byte values that are too high.
The error that I am getting is:
UnicodeEncodeError: 'ascii' codec can't encode character '\u0161' in
position 1442: ordinal not in range(128)
args = ('ascii', "Content-Type: text/html\n\n<!DOCTYPE... more »
|
|
Software epigrams
|
|
My, it's been a long time since I've seen these:
[link]
They pre-date the Zen of Python by at least a decade, and quite frankly I think many of them miss the mark. But whether you agree or disagree with them, they're worth reading.... more »
|
|
How to make shutil.make_archive support symbol links?
|
|
Hi comp.lang.python group,
I'm trying to make a zip archive with shutil.make_archive, but it seems that it doesn't support symbol links, after creating a archive with shutil.make_archive, all the symbol links would be lost.
What I want is something like `zip -y`, which "stores symbolic links as the link instead of the referenced file", is it possible to do in pure python? I also looked into the zipfile module, but it mentions no symbol links.... more »
|
|
|