x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
e "no". They don't use
Latin-1, instead, they use Unicode and just drop the row byte, sending
only the cell byte (independent on whether the input was Latin-1).
RFC 2617 specifies userid as *TEXT, without ever specifying what TEXT
is. Most likely, the authors of that specifi
-ASCII characters must be MIME-header-encoded. So
0BA4 should be encoded as '=?utf-8?b?4K6k?=', according to
the specification. No browser currently implements that.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
nd it isn't predefined by Python.
So it must be something that you have defined, and apparently
incorrectly. How did you define it?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
type. More generally: always use the type
documented in
http://docs.python.org/api/arg-parsing.html
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
s for Python,
PHP, and Perl.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
, line 1, in
> File "/usr/local/lib/python2.5/subprocess.py", line 401, in
> import select
> ImportError: No module named select
> "
The select module should certainly be present on Solaris. If it isn't,
something went wrong in the installation.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
etters, that's different: For example, for u'\xf6',
the UCS-2 representation (big-endian) is '00F6', for UTF-8, it is
'C3B6'. For u'\u20AC', the UCS-2 is '20AC', the UTF-8 is 'E282AC'
(i.e. three bytes).
You should use Unicode objects in your program always, and encode
to or from UCS-2 or UTF-8 only when interfacing with the
network/database.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Tzury schrieb:
> Yet,
> 'utf_16_be' is not 'ucs-2'.
That's not true. They are virtually identical.
> How would I get ucs-2 encoding and decoding functionality with python?
Use the UTF-16 codec.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
d to httplib.HTTPSConnection (i.e. keyfile=
and cert_file=).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Is there any simple way to fix this damned bug??
Sure: just fixed your damned code!!
Regards,
Marttin
--
http://mail.python.org/mailman/listinfo/python-list
or AIX
and Solaris.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ntioned, sys.maxint is just fine:
AIX and Solaris both use LP64, and Windows is 32-bit only for
Python 2.2.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
t Linux on ARM also uses ELF, so dynamic
lookup of symbols from the executable should be possible.
Do "nm -D --defined-only python" to see whether the symbols
are in the *dynamic* symbol table. If not, use the proper
linker flag to make them so.
Regards,
Martin
--
http://mail.python.org
ammar/Grammar. You need to edit
this file, then recompile.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
x27;)
Exception raised:
Traceback (most recent call last):
File "doctest.py", line 1248, in __run
compileflags, 1) in test.globs
File "", line 1, in ?
html = HTML('''
NameError: name 'HTML' is not defined
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Python keywords.
So he should make them additional in the grammar, too.
It is entirely beyond me *why* the OP wants to do that, but changing
the compiler would be the proper way of implementing that change.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
4. Explicitly encode it, such as
h = Header(u'(Some Chinese characters inserted here'.encode('GB2312'),
'GB2312')
If you are *not* inserting the characters from the Python source
code directly, go back to my original question: What are the
characters encoded in?
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
he DVD cover, open it, and
remove the DVD. Push the "open" button on your DVD drive, put the
DVD into the tray, and put the "open" button again. When done,
ask for further instructions.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
f the URI is missing and certain path
# components ("." and "..") have a special meaning when, and only when,
# interpreting a relative path.
Notice the "and only when": the browsers who modify above
URL before sending it seem to be in clear violation of
RFC 2396.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
y
the variable in the caller.
When you show what precisely you want to achieve, it should be easy
to say how to do that in C.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
not acceptable,
recompile Python for Cygwin to use WinSock2.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
revent is
a malicious user getting at your data, or spreading a virus
through your files, then chroot is perfectly adequate.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> It _is_ down. Probably server maintenance.
No, it's a bug. For some reason, the server restart after log
rotation failed. I'm uncertain why - the manual restart
right now worked without problems.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
- as in
"root directory"). The "jailed" process can perform all networking
that a similarly-privileged process outside the jail could.
To prevent network access, you would need additional system
features, as the ones provided by SELinux.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
d be easy to break out of).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ess
> in C/C++ I use an array[64] or bigger of int or char for the pieces.
> What data structure or type would be useful in Python when the
> performance ist most important? Is it list or string or an array
> from a library or what else?
Depends on whether and how you want to modify th
eant to ask "Can I make
it write an XML prolog, and if so, how?", then the anwser is:
use an output encoding different from utf-8 or us-ascii.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ave
to be root.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin schrieb:
> "Martin v. Löwis" <[EMAIL PROTECTED]> writes:
>> Amortized O(1) for inserting into lists.
>
> I think you mean amortized O(1) for appending to lists.
Indeed so; insertion is O(n).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
which produce
some output values only for a finite number of inputs)
So: what are your input data, and what is the
distribution among them?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Don't you think it would be more convenient for glob.glob to return
> file names only in any case, like os.listdir do?
No. Use glob.glob1 if you want a list of files.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
,..]
>
> ie a bunch of lists of strings which are eventually joined together and
> written out with a template to make the postscript definition.
And the UniqueID should be unique within this file, right?
Why don't you just use a serial number then?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ll glyphs. However, it seems
that today's printers have advanced caching, making the mechanism
irrelevant.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
; """
>
> I have set python.exe to run under admin but that do not fix the problem.
>
> Any ideas ?
193 means ERROR_BAD_EXE_FORMAT. Could it be that you are using a
32-bit extension DLL? How precisely did you "install" wx 2.8? Did
you rebuild it from source?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
eed back the fixes you make to the respective authors
of the open source software.
Notice that you won't just need a 64-bit version of wxpython,
but also such versions of all underlying libraries wxpython
happens to be build on.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> There was no need for me to use 64 so I have switched back to 32 and works
> fine.
>
> Python is not ready for the 64 world yet ;)
It's a matter of standpoint. 64 bit is not ready for the world, yet.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
is is clean depending on the package being installed;
a package may perform additional actions which don't get
recorded in the --record option; in such a case, you need
to study setup.py and find out what these additional
actions are and how to revert them.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ng the dbm directly to shelve.Shelf. It's
probably slower than bsddb, however, updating a single key should be
faster than pickling an entire dictionary.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ff-topic for comp.lang.python;
please ask on comp.windows.x instead.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
hat it takes.
No, it's not Python that fails to support that - it's the operating
system. See above for solutions that avoid one such copying in
the first place.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> b) use a single Python server (possibly shared with the database
>process), and connect this to Apache through the
>reverse proxy protocol.
Following up to myself: Instead of using a reverse proxy, you can
also implement the FastCGI protocol in the server.
Regards,
Martin
operating system selects an arbitrary one for the next request.
That process returns from accept, so for the next incoming
connection, one of the remaining processes will be selected.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
830
which means I can transmit 8.3MB in 76ms, which is a lot less than
15s.
My guess is that you sum up the incoming data with
total_data += received_data
That is O(n**2).
Regards,
Martin
import socket,time,cStringIO
t1 = time.time()
s = socket.socket()
s.connect(('localhost
te). For a backslash, Python could have
generated \x5c or \134 as well, which are all different spellings
of "backslash in a string literal". Python chose the most legible
one, which is the double-backslash.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> ooops. I mean is that the same as print calling
> u_str.encode(sys.stdout.encoding)?
Almost. It's rather
u_str.encode(sys.stdout.encoding or sys.getdefaultencoding())
(in case sys.stdout.encoding isn't set)
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ll run at their "top speed".
Of course, for two processes running at a single CPU, the top speed
won't be the MIPs of a single processor, as they have to share the CPU.
So when you say it leads to very poor throughput, I ask: compared
to what alternative?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
forth and back between
consumer and producer is the overhead for context switching, which
is typically negligible, compared to everything else that is going
on.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ame _ into
the __builtins__. Apparently, the trac code relies on that.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gert schrieb:
> tried reseting password but i can not login anymore to upload my new
> source code ?
Please try again. It was a misconfiguration which should be fixed now.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ct you run into other problems trying
to do so.
To change root.tk.call, you need to modify the implementation of the
_tkinter module.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Python codec certainly
never would do such a thing.
Are you sure it was latin-1 and \x27, and not windows-1252 and \x92?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
mingw32" to
> setup.py.
>
> It gives me the above error message. Any way to fix this?
Do what the message tells you. Either install Visual Studio 2003,
or MingW32.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
oding= parameter in toxml().
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
>> 2**19937 being a really huge number, it's impossible to exhaust the
>> Mersenne twister by running it in sequence.
>
> "Impossible"?
Unfeasible.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> (a) Running 'stat' is *not the same* as a system call.
Why do you say that? It is *exactly* the same, at least
on a POSIX system (on Windows, there is no stat, so the
implementation has to map that to several system calls).
Regards,
Martin
--
http://mail.python.org/mailman/li
and os.lstat; entirely unlike libraries in other
languages that attempt to also change the programming API in
the process of wrapping the system API.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
on. Now it's all clear.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
appen when written into a single line. My guess would
be that methods are particularly puzzling, more so than
functions (which make it somewhat more obvious that they
entirely wrap their arguments, and are entitled to return
whatever they want to).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Martin Drautzburg schrieb:
> I am using UTF-8 and assembling the string expression
> manually works okay and the umlaute appear correctly in the browser (so
> I could probably write my own serializer and it would work).
That's what you should do. Or you can use one that peopl
ing".
You may want to use the builtin intern function, or your can
come up with your own interning:
interns = {}
def local_intern(s):
return interns.setdefault(s, s)
Then, instead of
a[k1][k2] = value
do
a[local_intern(k1)][local_intern(k2)] = value
then all strings occur only once as keys, as long as the interns
dictionary isn't cleared.
> Any ideas?
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
d operation,
as that won't affect the keys stored in the dictionary. However,
performing the lookup with the interned key gives you speed
back, as then dictionary lookup won't need to compare the tuples,
but will find that the search key is identical to the stored
key, so the keys
rds,
Martin
(*) I don't fully understand your proposal. You say that you
want "gaps in [the string's] index", but I'm not sure what
that means. If you have a surrogate pair on index 4, would
it mean that s[5] does not exist, or would it mean that
s[5] is the character foll
ding acceptance (in comparison).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> functions so that i can monitor the whole filesystem but at lesser
> expense of cpu n memory
On Windows W2k+, you can use the USN journal:
http://msdn2.microsoft.com/en-us/library/aa364586.aspx
You may have to use ctypes or write an extension module to access that
journal.
Regards,
Ma
se
(such as ConfigParser or StringIO). I can personally accept that as
a necessary evil, although I would prefer if all modules were
lower case.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
put (input methods). As Python has no "native"
GUI library, we currently defer that main challenge to external
libraries already.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
lements level 3, as it is
capable of representing all Unicode characters (but, of course, so
does Python 1.5.2, if you put UTF-8 into byte strings).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I have the impression that tradition will change in 3.0 and your preference
> realized.
> Wrong? or have you not been following?
I have not been following, so this might be the case.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
statement,
> especially I dislike the redundancy "Datafile.readline()".
d=Datafile.readline()
if Print_info: print d
It's still two lines, but only has a single call to .readline().
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
common to either apply the conventions
for functions to them, or the conventions for classes.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gorithm. For small blocks, glibc releases
topmost memory through sbrk when it gets more than
M_TRIM_THRESHOLD bytes (defaults to 128kiB as well).
This algorithm isn't used when MORECORE_CANNOT_TRIM
is defined, which it would only on systems where
sbrk does not support negative arguments.
Rega
most likely, references to objects which you should release in
order to be able to reuse the memory.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
lent command-line option to the python binary or a
> command-line version of PYTHONPATH?
To rephrase James Stroud's remark: The equivalent to
#/usr/bin/perl -I
TEXT
is
#/usr/bin/python
import sys
sys.path.append(path_to_my_modules)
TEXT
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
>> Why not just modify sys.path within the actual script?
>
> Maybe because he has multiple versions of modules he wants to test his
> script against.
See the original post: 'I can use it as "#!/usr/bin/perl
-I"' so clearly his intention is modify
the script.
rosoft Visual Studio .NET 2003"
and "Microsoft Visual Studio 2005". I.e. the .NET particle was only
present with the 2003 release; the common abbreviation is "VS", not
".NET". Indeed "a newer version of .NET" would commonly refer to
a version of the Microsoft
ow the line of source code
> below it, like it would for an exception in a physical file. Is this
> possible?
Yes. You will need to print the traceback yourself; see
traceback.print_tb for an example.
Regards
Martin
--
http://mail.python.org/mailman/listinfo/python-list
framework that you currently use.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ions
> atomic before I shoot myself in the foot;-)
Function objects were not copyable because they were immutable. For
an immutable object, a copy cannot reasonably be distinguished from
the original object. See copy.py, around line 105.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
the present
> ummutable copy symantics?
The answer is really really simple. The implementation of copy predates
mutability. When the copy code was written, functions *were* immutable.
When functions became mutable, the copy code was not changed, and
nobody noticed or complained.
Regards,
ibuteError: 'function' object has no attribute 'value'
py> foo.value=100
py> foo.value
100
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Likely scenario, but not true.
Interesting. I (clearly) missed that part of the defaultdict discussion
(that was a long thread).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ly for binary
releases. If you compile Python yourself, you are free to
integrate Python with Tcl 8.5a4 if you so desire.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e of ival?
- where does that number come from?
The first two questions are best answered with a C debugger.
Depending on the answer, the third question may nor may not
need an answer.
Good luck,
Martin
P.S. If you are asking in the more abstract sense "why is that
happening to me?", th
[EMAIL PROTECTED] schrieb:
> How to check if a string is empty in python?
> if(s == "") ??
Exactly so. "not s" works as well.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
error message? That error is never produced
in Python. Instead, it may print an OverflowError with
signed integer is greater than maximum
(i.e. no period, no "the").
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
caller of convertsimple is,
and what line of Python code precisely was triggering that call.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ributed *yet*.
Do you have plans for such features in re?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
't know how to fix it,
but if you retry, it should work.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Dustan wrote:
> On May 6, 8:20 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> On Sun, 06 May 2007 04:53:23 -0700, Dustan wrote:
>>> SPAM!
>>> SPAM!
>>> SPAM!
>>> SPAM!
>>> SPAM!
>>> SPAM!
>>> SPAM!
>>> SPAM!
>> Gosh, you think so? I'm glad we had you around to tell us, otherwise we
>> might ha
> Is this a bug?
Why don't you read the responses posted earlier? John Machin
replied (in <[EMAIL PROTECTED]>)
that you are mistaken: There is NO difference between the outcome
of os.path.getmtime between Py2.5 and Py2.4. It always did return
UTC, and always will.
Regards,
M
t;> import os
>>> os.path.getmtime(r"c:\temp\test_os.diff")
1175704875.1825342
Is your file system FAT, by any chance?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
h
the system reports the correct time stamp, the CRT will
return the wrong one.
Python 2.5 fixes this, bypassing the CRT.
So yes: the time stamps returned in 2.4 and 2.5 may differ.
But still: they were always UTC, and always will be. It's
just that 2.4 had a bug which 2.5 has fixed.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
, the UTC time reported by
2.4 may have been off by one hour (it wasn't local time - just off
by one hour). This was due to DST issues. They have been fixed in 2.5,
which now reports the correct UTC value.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ytes. However, the two system code pages
(OEM CP and ANSI CP) are not so easy to tell apart.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> In a python Tk shell in Windows, what is the equivalent of unix's pwd?
os.getcwd()
> In a python Tk shell in Windows, is there an easy way to reoeat an
> earlier command, similar to Tcl/Tk's hist?
Press the cursor-up key.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Are there any function to get windows handle of file which is already
> opened with built-in file-function.
mscvrt.get_osfhandle
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e one for whom it is failing:
What does "file /usr/local/psql/lib/libpq.so.5" say?
> The postgreSQL lib is in ld.so.conf and ldconfig has been run:
>
> What is wrong?
So what does "/sbin/ldconfig -p" say, when run as the user for whom
it is failing?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
= [1,2,3,4,5,6,7,8,9,0]
py> b = itertools.islice(a, 7)
py> b
py> b.next()
1
py> b.next()
2
py> b.next()
3
py> b.next()
4
py> b.next()
5
py> b.next()
6
py> b.next()
7
py> b.next()
Traceback (most recent call last):
File "", line 1, in ?
StopIteration
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
s spam, but I guess the author is willing to take that risk.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
2601 - 2700 of 4331 matches
Mail list logo