want to unescape references, you can use the code in
http://effbot.org/zone/re-sub.htm
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
o write a
> little more code to make an integer such as 0xff into '\0\0\0\377' than
> it would need to just print the integer. Well, unless there's already a
> python function that does just that and I didn't know about. It's was
> just an example on how writtin
s/*.
If you eliminate the copy_reg references from os.py, you can also drop
copy_reg.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
nts?
>
> Try the htmlentitydefs module.
That won't help: this is a character reference, not an entity reference.
htmlentitydefs only contains the definitions of entities.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
they consume 12000kB together. Instead, they consume 4172kB
together, as all data are shared across all threads.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
tainly
change from release to release).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
getwriter('utf-8')(sys.stdout)
Make sure that you then that *all* strings that you print
are Unicode strings.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
go away than being enhanced.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
r dynamic embedding of pythonxy.dll, no.
> 4. Are the registry entries necessary?
No.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ty as
the original user.
In turn, it's not easy to forward the identity of the authenticated
user, either: even though Apache will know who he is, it has no
way of telling on the forwarded request.
So you would have to use CGI or mod_python in this case.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
003
1. Install vsextcomp
2. open VS 2003
3. open the project files in PCbuild
4. select the AMD64 target
5. run build
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
.5, you don't have to hunt around anymore for all
these add-on libraries: they are all checked into the Python subversion
repository (of course, earlier releases would give precise URLs, too,
except that the hosting sites would sometimes break these URLs).
Regards,
Martin
--
http://mail.pyth
ory with file names in it that
cannot be converted to Unicode strings, using the file system
encoding. If you can't fix the file system, you have to make
search_path a byte string.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ension module (for example, numarray.ieeespecial will do
> it).
Use the struct module to pack/unpack a double value. On an IEEE 754
system, this should work - on a non-IEEE-754 system, it's not clear
that +/-inf and NaN actually exist.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
file for backup,
then use BackupRead/BackupWrite.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
svcr8.dll, whereas Python is
linked with mscvr71.dll; Microsoft does not support mixing CRTs.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> (Note the absence of a demonstration on Windows.) Can't the above be
> blessed as the One True Way and wormed around in floatmodule.c for those
> platforms where float'ing "NaN" or "Inf" doesn't currently work?
How would you do the worming-around?
ary
already supports strtod("inf") and even if you then special-case
Windows - what do you do with platforms where neither approach works?
In short, I cannot think of a way to do that portably on all platforms
in C. If there was such a way, it probably would have been implemented
long
ively, you can implement a skippedEntity callback in
the SAX content handler.
In ElementTree, the XMLTreeBuilder has an attribute entity
which is a dictionary used to map entity names in entity references
to their definitions. Whether you can make the parser download
the DTD itself, I don't know.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
istency, the .index method should be removed
from lists, as well, IMO. If you find yourself doing a linear
search, something is wrong.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
bal variables and object attributes.
I think there is a fairly low chance that such a request will be
considered. It's a big change (implementation-wise, and
documentation-wise), and likely controversial. So one would have
to write a PEP first (see PEP 1 for details).
Regards,
Martin
--
http://m
e this code:
option base
import sys
print sys.path[1]
So should the be 0-based (because path is in module sys), or should
it be one-based (because the access occurs in a module that uses
1-indexing)?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
r clarification.
>
Please see PEP 355.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
r8.dll.
You either would have to create a import library for mscvr71.dll
by hand, or you have to copy one from VS 2003 (breaking its license).
Regards,
Martin
P.S. Why does the subject say "VS 2008", anyway? That product has
not been released yet, and Microsoft is still hoping that it w
gt; By looking at the code I notice that pyopenssl package is used and
> that a certificate file is required. Why do I need to use pyopenssl
> and how do I generate the cert file?
You can generate certificate files using the openssl command line
tool; see the openssl documentation for details.
M
Tuple(args, "O!", SillyStringType, &o))
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
specific error message is printed, you would have
to debug what values are passed on the stack at what point.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e also for wider codepoints.
See PEP 261. This is by design.
> Currently, I'm using a kind of parallel database for some unicode
> ranges above , but I don't think, this is the most effective way.
Just use a wide Unicode build instead.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
es that have 2.5 in their name, plus any links to them. In
/lib, it's python2.5. In /include, it's python2.5. Plus
a few things that I probably forgot.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> 1>py_dyn_test.obj : error LNK2001: unresolved external symbol
> _Py_NoneStruct
Could it be that py_dyn_test.obj is a x86 (not AMD64) object
file? Run dumpbin.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gt;
Creating this expression is fairly expensive, however, once compiled,
it has a compact representation in memory, and matching it is
efficient.
Contributions to support categories directly in re are welcome. Look
at the relevant Unicode recommendation on how to do that.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> It doesn't look like these are x86, though.
Ok. Can you then check symbol lists also?: undefined
symbols in the object file, and defined symbols in the
library, wrt. PyExc_IndexError (say).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
u.
> But how can I tell my Python program to trust my SSL certificate?
Why do you want to tell it that? The SSL module will trust *any*
server certificate, no need to tell it explicitly which ones to
trust.
> When I tried before I received the error 503
That must be an independent
marshal.c
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I heard that python 2.6 will include full "server-side SSL
> support" (whatever this means).
> Is it true?
Yes, that's true.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
his server certificate. I was not proposing any judgment on
whether that's a good thing or not. In fact, I have no idea whether
security was of any concern to the OP.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
an exception, does it crash,
does it erase your hard disk?
I'm not aware of a 3gb Python build, but you should be able to build it
yourself.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
n that is 3gb enabled as well
I'm not so sure about that, with your description right now. There might
be other reasons that cause that error (but they are hard to guess as
still still don't know exactly what the error is).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
>> No, as Martin points out, Python trusts EVERY certificate, which of
>> course misses the whole point of certificates. Whatever is making
>> your program fail is something different.
>
> Paul, are you sure for 100%. It is hard to belive.
Not sure how many confirmations
a HTTP error, not an SSL
one (unless he made up that error code, of course).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
itory? What's Tk's secret weapon?
The trick is very simple. Tkinter just *doesn't* get much focus. Very
few of the core developers actively work on it; I do so only once
every two years or so to merge all the patches that get contributed.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
o maintain a list of root CAs, and what
code does it execute to find out that a certificate is not in this
list?
Are you sure this is related to Python at all?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ceive an error.
What error do you receive precisely? Please copy it literally from
the terminal, don't rephrase it.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
hat does it mean?
Technically, it means that OpenSSL does not support the version of
the SSL protocol that the proxy uses.
Practically, it more likely means that the proxy does not use SSL
at all at the port you are connecting to.
What host/port are you connecting to?
Regards,
Martin
--
http:/
hat is definitely simplistic. CDATA has no significance on formatting.
> Should I file this as a bug to be solved? I have my workaround now,
> but I read online that more people seem to have ran into this.
Feel free to come up with a patch. It is questionable whether a bug
report will help; there is a good chance that it stays open for several
years.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Jim wrote:
> On Sep 30, 6:16 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>> On Sun, 30 Sep 2007 07:42:56 -0700, Jim <[EMAIL PROTECTED]>
>> declaimed the following in comp.lang.python:
>>
>>> What else could be wrong?
>>> Thanks,
>> Possibly those associations are only defined for your
> Are all the real ( ;-) ) developers using ssh+svn and not noticing
> this?
As Terry said, some noticed. But yes, many use svn+ssh, plus we live
in different time zones, so we may be asleep when it breaks.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Java, I recommend to use java.lang.Character.getType.
If that returns java.lang.Character.UNASSIGNED, return "Cn".
Regards
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I'd like to experiment with Tk 8.5 (now in beta) in my Python
> application, but Python 2.5 requires Tk 8.4.x.
Why do you say that? AFAIK, that's not the case.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ter.c does *not* hard-code Tk 8.4. As you
refer to _tkinter.so, it appears you are talking about a precompiled
version - did you try to build Python yourself?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ll prototypes, and it was specifically cleaned up (ten years ago)
to work with C++.
This API does not make use of many of the C++ features, including
classes, templates, or overloading.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
n C API available.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ode.
> You also mentioned that there are "multiple C++ wrappers arround the
> Python C API Available"... could you provide names for a few of the
> popular ones?
The most popular ones are Boost.Python, CXX, and PySTL.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ong the core properties of object-orientation. The
C API (although not these three functions) also supports inheritance,
which is the core property missing in the previous list.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
4, the byte code files may be different
from the byte code files on Sparc, if the source code contains
integer literals above 2**31. Such literals would be marshaled
as TYPE_LONG (l) on Sparc32, but as TYPE_INT64 (I) on Sparc64.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ith Python 2.4.4 on Debian).
What Python version are you using, and what is the precise string that
you want to encode? (use "print repr(var)" to report that exact value)
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ameter Entity (PE), not
as an element. Look for definitions that start with
then the name of the root element would not be MyMessage, but
Envelope.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Will the "stock" Windows version of Python install on a Samsung Q1U-EL
> UMPC running Vista and with an Intel A110 processor?
Certainly. This is an Pentium M class processor; the Python binaries
will run on any Pentium-or-better processor (probably actually
486-or-better).
disk.
In addition, Windows considers V:foo as a relative path; relative
to the current directory on drive V. So V:foo is a short-hand
for V:\foo, which, as a Python string, reads 'V:\\foo'. As you
have the director '\risk oversight' specified (which starts
with CR), the full normal
string
Notice that you get a *decoding* error, so you are not testing
Unicode characters, but byte strings.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
that they still
interpret \u escapes. And yes, your notation is one way to get what
you want; another is u"\\"+r"universe", although I'm unsure whether
that meets your requirements.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
vious,
> I'm a recovering perl programmer.
Ok, I now see why you can appreciate the comprehension-based one :-)
Again, much of Python's strength comes from it being readable. Simple
is better than complex, and sparse is better than dense, and readability
counts (import this).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e of the functions that don't return one in the
first place, the module itself will wait for the child processes
"regularly".
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
nts has finished
downloading or not, where the file is located etc. This way you can
also, for the sake of persistence, keep partially downloaded files
separate from the completely downloaded files, as per a previous
suggestion, so that you won't start serving half files after a crash,
an
t when setup.py runs, _tkinter will get built
automatically. If you don't have the header files of Tk installed,
no amount of fiddling with setup.py, or getting alternative sources
of tkinter, will actually get you a _tkinter module.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
en uncertain).
So at that time, Tcl would have been the obvious (because only)
choice. Now these products are stuck with Tcl, and redoing all
the work (including the existing extension modules!) in a different
programming language would be a lot of work.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> however make still complains of the non existance of the the Tcl/Tk
> libs and/or headers
So where it tk.h located?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I don't know why they chose to make the sf tracker private. Maybe that
> was the only way to remove write access.
That, plus removing it means that people won't browse outdated information.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> There are bug reports in the SourceForge tracker that aren't in the
> "bugs.python.org" tracker, so that move was botched.
Which one in particular?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
al try and
> locate the file names it's failing on I'm at a loss to see where to go
> next.
tk.h is searched-for in detect_tkinter. Check whether tklib, tcllib,
tcl_includes and tk_includes all get set. This should take only
a single print statement.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
I believe most people had little or no problems finding the new bug
tracker, in particular if they had seen the announcement.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
None, if yes, report what it returns. Otherwise,
annotate compiler.find_library_file. Print compiler.find_library_file
to see what specific function it is; likely something in
unixccompiler.py.
If so, print out shared, dylib, static, and os.path.exists of each one.
HTH,
Martin
--
http://mail.py
> but no tcllib !!!
> perhaps that's the problem? Did I assume that it was installed by the
> tk mandriva module ?
I see. I would have never guessed that you can manage to install
Tk but not Tcl on Mandriva...
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ds has never been a good way of getting things done. :-)
Martin
--
http://mail.python.org/mailman/listinfo/python-list
distinct impression that you're trying to replace simple shell
scripting with Python. While it's possible, you're probably making
things much more complicated than they need to be. Unless you're
actually doing something with all that data of yours, don't use Pyth
.execute() is for executing SQL commands, and this is not an SQL
command, but rather a shell command.
Abandoned> And how can i copy the database with python ? Note: The
Abandoned> database's size is 200 GB
If you want to do this from Python, run it as a separate process.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
My main concern with ctypes is that you have to duplicate
information from the header files, which is error-prone,
especially when the header files may change (either across
versions or across target systems).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
does the symbol visibility (hidden/internal/protected).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
through the Python documentation to see if
> they offer any work arounds to this problem.
There is sys.setdlopenflags, but I would use it with caution.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
root root 906285 Jan 10 16:08
> /usr/local/lib/libtk8.4.so
>
> I need Tkinter for sure, and I'll like to have dbm.
> How should I proceed?
Did you add /usr/local/lib to /etc/ld.so.conf?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Sorin Schwimmer schrieb:
>> Did you add /usr/local/lib to /etc/ld.so.conf?
>
> It's there
It is it also listed with "ldconfig -p"?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
fscked schrieb:
> How do I go about creating the XML prologue like I want it to be?
print " % (version, encoding)
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki wrote:
> [EMAIL PROTECTED] wrote:
>> Got a note about a new page on the Python Wiki:
>>
>>> "Wade" == Wade McDaniel <[EMAIL PROTECTED]> writes:
>>
>> http://wiki.python.org/moin/Selcuk_Altun
>>
>> I suspect it's junk since it doesn't seem to mention Python and the
>> website
>
Stef Mientki wrote:
> [EMAIL PROTECTED] wrote:
>> Got a note about a new page on the Python Wiki:
>>
>>> "Wade" == Wade McDaniel <[EMAIL PROTECTED]> writes:
>>
>> http://wiki.python.org/moin/Selcuk_Altun
>>
>> I suspect it's junk since it doesn't seem to mention Python and the
>> website
>
ing object, and passes that to method_x.
Creating a string object does indeed create a copy. The string object
will be refcounted, so it exists as long as there is a reference to it.
Likely (unless the method_x implementation somehow stores the string),
it gets deallocated before PyObject_Call returns.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I've been toying with python for about two years now. Not every day,
just when I encounter something in my job (sysadmin) repetitively dull.
The amazing thing is that like any other language (natural or not)
learning it more gives you power to express your thoughts better and
create som
Mem_DEL(pqp) should read PyObject_DEL(pqp), as the object was
allocated with PyObject_NEW. Because this was a common error once,
Python up to 2.4 detected that error and silently corrected it (at some
runtime cost); Python 2.5 now has removed this work-around.
I'll contact the author.
Regards,
is
msvcr71.dll. The "Licensee Software" is "a software application product
developed by you that adds significant and primary functionality to the
Redistributables", i.e. python25.dll.
IANAL; this is not legal advise.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
or different types, or even may not exist
> anymore.
Actually, the libraries *are* binary-compatible (on the ABI level). You
just can't mix two libraries in a single program easily.
> (And what about any symbol exported by ordinal?)
That doesn't happen for msvcrt, as the import l
ince they started to support
32-bit code. So if you had problems, they might have had a different
source.
It's a different thing for the C++ libraries, though.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
vary across compilers, even if all
these compilers implement C99.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e are several values that can be called "memory
usage" (such as the size of the committed address space, the working
set size, etc); you don't mention which of these values grows several
hundreds MB.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
gt; anyway).
As a starting point, try understanding better what is really happening.
Turn on "Virtual Memory Size" in "View/Select Columns" also, and perhaps
a few additional counters as well. Also take a look at the "Commit
Charge", which takes into account swap fi
all).
You need to display the virtual address space in the task manager
to determine how much address space the application is using.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
its swap file (because of other activities in the system),
so Python occasionally manages to exhaust the swap file, through
regular allocations (memory-mapped files don't contribute to
swap file usage, as they have their own disk-backing, namely in the
file being mapped).
Regards,
Martin
--
ht
lf with VS 2005, you should be able to
build extension modules as well with distutils, by setting MSSdk and
DISTUTILS_USE_SDK appropriately.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
ring_Check(obj)) { // would this be true for any string
>type?
>...
>}
>if(PyFloat_Check(obj)) {
>...
> with a switch?
Not easily. Also, PyString_Check is true only for the byte string
type (and its subtypes).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
e links extracted from the page I get this error.
>
> This is bad, since some links do contain strings with non-ascii
> characters.
Please try answering the exact question that Marc asked:
what is an example for unicode string that triggers the
exception?
Regards,
Martin
--
http://mail
t;wikipedia.org".encode("idna")
'wikipedia.org'
The exception is certainly misleading; I'll have to find out
whether there is a bug beyond that (i.e. whether host names
with empty labels should be accepted).
Regards,
martin
--
http://mail.python.org/mailman/listinfo/python-list
dn't be able to call Context.__init__(): that should
raise a type error, indicating that an object is needed
for the method __init__. That should hold whether Context
is a new-style or an old-style class.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
2801 - 2900 of 4331 matches
Mail list logo