> I have a large (gigabytes) file which is encoded in UTF-8 and then
> compressed with gzip. I'd like to read it with the "gzip" module
> and "utf8" decoding.
You didn't specify the processing you want to perform. For example,
this should work just fine
fd = gzip.open(fname, 'rb')
for line in
> I'd like to install Python 3000 on my computers (Mac, and possibly
> Windows), without messing up the existing versions. So far, I've
> always relied on using ".msi" on Windows and ".dmg" on the Mac.
>
> From the Python site, I read (different version, but still...):
>
> Unpack the archive
> * When I say "# -*- coding: utf-8 -*-" and confirm my IDE is saving
> the source file as UTF-8, do I still need to prefix all the strings
> constructed in the source with u as in myStr = u"blah", even when
> those strings contain only ASCII or ISO-8859-1 chars? (It would be a
> bother for me to
> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
> madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -
> DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o
> ./Modules/posixmodule.c: In function 'posix_setpgrp':
> ./Modules/posixmodule.c:3769:
> sorry for a newbie question. I have unicode string (or better say
> latin2 encoding) containing non-ascii characters, e.g.
>
> s = "Ukázka_možnosti_využití_programu_OpenJUMP_v_SOA"
That's not a Unicode string (at least in Python 2); it is
a latin-2 encoded byte string; it has nothing to do with
> I'm lost here. When I put this line
>
> from xml.sax.handler import ContentHandler
>
> in a .py file and run it, I get the ImportError. When I execute it in
> shell, there is no error.
>
> Why?
Because you have another module called xml in your path that is found
first and has no sax package
> New to mac. I have leopard. What's the difference between python and
> pythonw? So far (which isn't very far) I can't tell the difference.
IIUC, pythonw is linked with the WindowManager library, so it can do
GUI operations; python can't.
> I have a small application using TKinter that I was
> The strange thing is, it worked fine locally on my two machines (32bit
> running python 2.3.5 and 64bit running python 2.4.1), but when run by a
> 64bit machine on the network, it would fail every time in the following
> manner:
It may not that much be an issue of 32-bit vs. 64-bit, but of Pytho
> This would work and not be too terribly inefficient but I was thinking
> it would be much better generate the getLine method at runtime and
> dynamically add it to the class so I wouldn't have to pass the columns
> around and loop through them every time;
I would advise against that. Generating
> I would like to know if such function would be correct for verifying
> if a link is broken and/or circular.
>
> def isvalidlink(path):
> assert os.path.islink(path)
> try:
> os.stat(path)
> except os.error:
> return 1
> return 0
You meant to flip the result value
> I create a folder test under e:
>
> then os.access('e:\\test', os.W_OK) returns True. Everything's ok.
>
> Now I move My Documents to this e:\test folder
>
> Then os.access('e:\\test', os.W_OK) returns False !!
This description is, unfortunately, too imprecise to allow reproducing
that effect
> http://support.microsoft.com/kb/326549
>
> Goodness knows what we're supposed to do with that.
Just in case it's not clear what Tim is getting at:
if a folder is marked read-only on Windows, it doesn't mean
that you can only read from it. The read-only bit is a legacy
thing, anyway, since you
> I am trying to build python from scratch under VC8. The build process
> runs and completes succesfully in debug mode resulting in
> python_d.exe. But when i try to run this exe it returns an assertion
> error and application crashes.
What Python version are you trying to compile? This sounds li
> Here's the code I presently use in a Bash Shell script:
>
> /bin/mkdir -p /Volumes/A_Share
> /sbin/mount_afp "afp://username:[EMAIL PROTECTED]/A_Share"
> "/Volumes/A_Share"
>
> Can something similar be done with Python?
You can always use os.system to do what the shell does, ie.
os.sy
> Martin. Could you confirm that the outline below correctly
> describes the behaviour of the os.access function under
> Windows, please?
It's correct for Python 2.5.2 and 2.6; for 2.5.1 (as discussed)
the test "if directory:return True" was not implemented.
Notice that the first sentence:
"If t
> Now, ironically, I'm confused by your recap :) What I meant to say was
> that the os.access function as implemented under Windows returns False
> if the path in question (say, "x:\someones-private-docs\diary.doc") was
> inaccessible to the process invoking os.access by virtue of file
> system per
> Up to a point: this meets the case where we fail to access
> the file at all (for read or write or whatever). But what
> about where we can read the directory entry, and the
> read-only attribute isn't set? At present, we'll return
> True to a W_OK access check in these circs, but this user
> mig
> * R_OK: A process with bypass-traversal-check priv. enabled
> doesn't need any access to intervening directories in order
> to get the attributes of a file within them. This means that
> our existing R_OK result is accurate for any file: if we can
> get its attributes then you can open the file f
> Are there any command line option for telling python what encoding to
> use for stdout?
Not a command line option. However, you can wrap sys.stdout with a
stream that automatically performs an encoding. If all your print
statements output Unicode strings, you can do
sys.stdout = codecs.getwrite
> One proposed fix is to make the endian variable code dynamically change
> at run time.
I would advise against that. Endianness depdency should be resolved at
compile time, with appropriate conditional compilation. Endianness won't
change at run-time (and no, not even for a fat binary - the x86 c
>> A user reports problems with one of our extensions when running the
>> intel compiled extension on ppc and vice versa. He is building the
>> extension as a universal binary. Although the intel compiled version
>> runs fine it displays a known bug when run on a ppc.
>
> Have you reported the
> #ifdef __BIG_ENDIAN__
> #define WORDS_BIGENDIAN 1
> #else
> #ifndef __LITTLE_ENDIAN__
> #undef WORDS_BIGENDIAN
> #endif
> #endif
>
>
> I'm puzzled why WORDS_BIGENDIAN is undefined if both __BIG_ENDIAN__ and
> __LITTLE_ENDIAN__ are undefined. Surely in that case WORDS_BIGENDIAN
> should be left
> PIL may also have a similar problem as the 1.1.6 setup.py script also
> defines WORDS_BIGENDIAN like this
>
> if struct.unpack("h", "\0\1")[0] == 1:
> defs.append(("WORDS_BIGENDIAN", None))
>
> probably I borrowed/stole this as we have something very similar in our
> setup.p
> OK I need to use something a bit more complex then; I figure this should
> work
>
> #if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)
> #ifdef __BIG_ENDIAN__
> #ifdef WORDS_BIGENDIAN
> #undef WORDS_BIGENDIAN
> #endif
> #define WORDS_BIGENDIAN 1
> #
> I prefer to continue using WORDS_BIGENDIAN so fewer changes need to be
> made to the code. It just makes resynching with the upstream code
> easier. If neither are defined we get to use the definition from
> setup.py if it's needed.
Ok. Still, I would write it as
#if defined(__LITTLE_ENDIAN__)
> My problem is more complex than this, but how about I boil down one sticking
> point for starters. I have a file with a Spanish word in it, "años", which I
> wish to read with:
What is the encoding of that file? Without a correct answer to that
question, you will not be able to achieve what yo
> No what? YES, the "decode error" is complaining that the data supplied
> is NOT valid utf-8 data. So it's not utf-8, it's windows-1252, so stop
> lying to browsers: like I said, use charset="windows-1252"
I think weheh can manage to resist good advise for a long time.
Regards,
Martin
--
http:/
> How do i build python 2.5.1 from source using MSVC 2005?
> Are there instructions on doing this.
See PCbuild8/readme.txt.
The instructions may not be correct, and the project files
may not work out of the box, so you are on your own wrt.
anything that goes wrong - unless you ask here for specif
> Is there a module available in the standard library, for Python 2.4
> running on Windows, like "crypt" for Python 2.4 running on *nix
> machines?
I can't try right now, but I would expect that the Cygwin python
distribution has a crypt implementation.
If you want a crypt implementation for the
> I was able to build the subversion source using the PCbuild8/
> readme.txt instructions. However how do i install the compiled
> interpreter and libraries so it can be used with swig or wxpython
> (win32).
I'm not sure why you want to install it - just run it from where
it was built.
If you w
> Thanks for your help and kind words of encouragement. Still, what you have
> suggested doesn't seem to work, unless I'm not understanding your directive
> to encode as 'windows-1252'.
Please read John's message again. Nowhere he said you should "encode as
'windows-1252'". Instead, he said 'use
> It looks like your suggestions to change charset were incorrect. My example
> works equally well with charset=utf8 as it does with charset=windows-1252.
It rather looks like that you didn't follow the suggestions carefully.
In my very first message, I wrote
# Sending "Content-type: text/html"
>> On a 64-bit machine, that's 16 bytes for PyObject_HEAD and 8 more
>> bytes for the value, 24 bytes total. Changing long to int won't
>> decrease the struct size to 20 because the compiler will pad it to
>> 24, the nearest multiple of 8. (Forcing the compiler to pack the
>> struct won't help
> This brings up another question. If I run some Python code that
> starts off with 'os.system('cp869')' so it will change to the correct
> code page, then when it starts printing the Greek characters it
> breaks. But run the same Python code again and it works fine. Is
> there another way to do
> I'm trying to link python statically with qt and pyqt. I've tried this in
> several ways but never succeeded. At the moment the final make runs without
> errors but I get import errors when accessing pyqt.
> How can I solve this problem?
You'll need to include QtCore into Modules/config.c, pre
> I'm searching a maneuverable python bytecode decompiler. There is one
> named 'decompyle', but it doesn't support Python2.5 and too hard to
> use. And the 'depython'(http://www.depython.net/) is good enough
> except it cannot process file more than 5kb.
>
> Is there some else available?
I don't
>>> having a lot of trouble installing 2.5 (without affecting my stable
>>> 2.4),
>>> I wonder why there's only a msi installer for windows users ?
>>
>> What's your problem? I have five versions installed (2.1, 2.3, 2.4,
>> 2.5 and svn) and they coexist peacefully. Just make sure when
>> installin
> I just want the qt libs linked to the interpreter without accessing them by a
> module. I tried the configure option '--with-libs='lib ...''. The make did
> fine but the executable is too small and the qt symbols are not known by it.
> How can I just link qt statically?
Why do you want to do t
> I need an environment that can be delivered to our customers without
> installing python, qt and pyqt. We want to provide the complete package.
> In order to do so I need to link at least python and qt. How can this be done?
You should link all extension modules into the Python executable,
thro
> For the word "Pure", I mean it is not a C/C++/Z++.. extension, so that
> we can use it under pythons of different version. Is it possible?
The python-xlib project provides such a module. It implements the X11
protocol directly.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python
> However, the situation is still unacceptable to me because I often make
> mistakes and it is easy for me to miss places where encoding is necessary. I
> rely on testing to find my faults. On my development environment, I get no
> error message and it seems that everything works perfectly. Howe
> I'm writing a program that requires specifically Unicode regular
> expressions http://unicode.org/reports/tr18/ to be loaded in from an
> external file and then interpreted against the data. if I use Python
> Regular expressions is there a flag I can set to specify that the
> regular expressions
> Is there any plan of implementing real (lightweight) fiber in Python?
I have no such plan, and I don't know of anybody else's plan, either.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Indeed, pywin32 stops working :( I installed Python "just for me",
> then I installed pywin32-210, and now Pythonwin.exe is not able to
> start. So for this scenario it seems to be necessary, that the Python
> DLL is installed into the system32 folder.
>
> Maybe the Python installer should iss
André wrote:
> In trying to parse html files using ElementTree running under Python
> 3.0a1, and using htmlentitydefs.py to add "character entities" to the
> parser, I found that I needed to create a customized version of
> htmlentitydefs.py to make things work properly.
Can you please state what
> Any help in tracking down the source of this problem
> would be appreciated.
You could try installing a debugger on machine H, hoping
that the debugger gets entered when pythonw crashes. The
stack trace may provide some insight on what precisely fails.
HTH,
Martin
--
http://mail.python.org/m
> .read() returns the bytes exactly how it downloads them. It doesn't
> interpret them. If those bytes are GB-2312-encoded text, that's what
> they are. There's no need to reencode them. Just .write(page) (of
> course, this way you don't verify that it's correct).
Alternatively, if the page is *no
> Without an additional parser, I was getting the following error
> message:
[...]
> xml.parsers.expat.ExpatError: undefined entity é: line 401, column 11
To understand that problem better, it would have been helpful to see
what line 401, column 11 of the input file actually says. AFAICT,
it must
Caleb Hattingh wrote:
> So: I would like to query the package index with a short name (perhaps
> wildcarded), and retrieve either the full name (from which to strip the
> ver.) or version number, and compare it with what I have on disk. At
> this stage, just reporting the differences is fine.
>
>
[EMAIL PROTECTED] wrote:
> Hi all, I have created a XML-RPC model (with server and client)
> written in Java. I want to call the methods in another XML-RPC model
> written in Python. I know that in Java, I can use like
> "xmlrpc_client.excute("handler_name.method", param)" to call the
> methods i
Alex Martelli wrote:
> Can anybody suggest where to get a Framework SDK 1.1., or any other
> legal way to get "the core msvcrt.lib for msvcr71.dll against which to
> link your extensions. This is critically important"...???
From
http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3
Alex Martelli wrote:
> As suggested to me by David Rushby 10 hours ago,
>
> http://www.microsoft.com/downloads/details.aspx?FamilyId=272BE09D-40BB-4
> 9FD-9CB0-4BFA122FA91B&displaylang=en
>
> does work.
Can you please try this again: I'm also getting the error message
that AIM is getting.
Regar
Srijit Kumar Bhadra wrote:
> Is there any specific reason for not using MinGW to build the official
> distribution of Python for Win32?
What could be the reasons to use MinGW?
As for reasons not to do that:
- there is no build process available to do that
- people building extensions to Python mu
Robert Kern wrote:
> Oh, that's right, you need an import library for Python24.dll .
That shouldn't be a problem: that library is included with Python.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Benzinger wrote:
> How exactly should the directories be updated? Should it just be made
> sure that the demos and examples are working or should they be updated
> to use the newest applicable Python features (e.g. the new any/all
> functions)?
That's all your choice. The Demo directory sho
Robert Kern wrote:
>>> Oh, that's right, you need an import library for Python24.dll .
>> That shouldn't be a problem: that library is included with Python.
>
> For mingw, too? I.e. a .a not a .lib?
Right.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Brian Elmegaard wrote:
> What I don't understand is that it is not possible to distribute a
> python compiled with gcc for windows. The main reason I saw in this
> thread is that python uses mfc. So python requires api access, I
> guess.
You misunderstood. Python does not use MFC. PythonWin (for
Fredrik Lundh wrote:
> however, note that the FAQ entry says that you can use an existing
> LIB file as well, so Python's standard import library should work.
Right. MingW (GNU ld) was (apparently) changed to support that shortly
after I started including libpython24.a files with the Windows
distr
Brian Elmegaard wrote:
>> That is simply not true.
>
> Actually, you answered me then too. I misunderstood after reading
> http://sebsauvage.net/python/mingw.html.
>
> Is the information on that page not correct? Has it never been?
It's not correct, to the best of my knowledge. However, since
Edward Elliott wrote:
> Thanks for that very informative post! To clarify, mingw (aka gcc
> -mno-cygwin) has no POSIX layer like cygwin. Because your post could also
> be (incorrectly) interpreted to mean mingw removes the cygwin dll
> dependency by just linking it in statically. But I googled a
sturlamolden wrote:
>> - there is no build process available to do that
>
> In MSYS:
>
> $ ./configure --prefix=/c/mingw
> $ make
> $ make install
>
> This should be obvious to any with Unix experience.
>
> MinGW actually distribute precompiled Python binaries as well (in
> MSYS-DTK).
So how d
Edward Elliott wrote:
>> Well, there is no native C library on Microsoft Windows: the system
>> simply doesn't include an official C library (I know there is crtdll.dll
>> and msvcrt.dll, but these aren't "endorsed" system C libraries).
>
> don't know what you mean by "endorsed". does it lack fea
Ross Ridge wrote:
> MSVCRT.DLL has been a standard system compent of Windows since at least
> Windows 98. Many other system components depend on it. Essentially,
> MSVCRT.DLL is an "undocumented" part of the Windows API. It's not
> exactly "endorsed", Microsoft would rather you use it's current
Ross Ridge wrote:
> Not exactly. They're both GCC, but the MinGW compiler that you can
> download from MinGW WWW site is a native Win32 appliction, while the
> "MinGW" compiler included with Cygwin and invoked by "-mno-cygwin" is a
> Cygwin application.
Any Cygwin application is a native Win32 ap
Caleb Hattingh wrote:
> How up-to-date does Debian keep its package list for python addons,
> or are you running Unstable?
I'm running unstable indeed.
> My big problem, being in South Africa, is that I have to get any
> distros on cover CDs or order from distro-resellers, and they never
> have T
Anton Vredegoor wrote:
> The encoding that gives me the least problems seems to be cp1252,
> however it's not completely perfect because there are still characters
> in it like \93 or \94. Has anyone handled this before? I'd rather not
> reinvent the wheel and start translating strings 'by hand'.
Pramod TK wrote:
> Is this new function getaddrinfo() of IPv6 is supported in Win32 Extensions
> for python.
Yes, since Python 2.4 (actually, not in the Win32 extensions, but in the
standard Python socket module for Win32).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Anton Vredegoor wrote:
>> Not sure I understand the question. If you process data in cp1252,
>> then \x94 and \x94 are legal characters, and the Python codec should
>> support them just fine.
>
> Tell that to the guys from open-office.
Ok, I'll rephrase: Can you please explain your problem again,
Ross Ridge wrote:
> Martin v. Löwis wrote:
>> http://msdn2.microsoft.com/en-us/library/abx4dbyh(VS.80).aspx
>>
>> 'The msvcrt.dll is now a "known DLL," meaning that it is a system
>> component owned and built by Windows. It is intended for fut
Ross Ridge wrote:
> Nonetheless, Cygwin applications are not generally considered native
> Win32 applications because of the dependency on CYGWIN1.DLL and the
> related environment. While what you're saying a strictly true, the
> term "native Win32" is used to make a distinction between a port of
Ames Andreas wrote:
> There remains one technical issue that isn't a killer but would
> be inconvenient, IMHO: Can pywin32 be made working with a
> mingw-python (I'm quite sure it can't be made building on it)?
> I'd appreciate any datapoints about that ...
It all depends on what CRT version you
Ross Ridge wrote:
> I think that having current versions of Python also linked MSVCRT.DLL,
> whether compiled with MinGW or MSVC 6, 7 or 8, could be over all be a
> better solution than using a CRT DLL specific to one version of
> Microsoft's compiler. It would make it possible to build extentions
Anton Vredegoor wrote:
>> So if that is the case: What is the problem then? If you interpret
>> the document as cp1252, and it contains \x93 and \x94, what is
>> it that you don't like about that? In yet other words: what actions
>> are you performing, what are the results you expect to get, and
>>
Mark Harrison wrote:
> I've got an API that deals with 64 bit int values. Is there
> any way of handling this smoothly? Right now I'm casting
> the values into and out of strings for the API.
In XML-RPC, everything is transmitted as a string, so I
don't think that choice is really that bad - exc
manstey wrote:
> 1. I have # -*- coding: UTF-8 -*- as my first line.
> 2. In Wing IDE I have set Default Encoding to UTF-8
> 3. I have imported codecs and opened and written my file, which doesn't
> have a BOM, as encoding=UTF-8
> 4. I have written a dictionary for translation, with entries such as
Dave Benjamin wrote:
> Why is PythonWin (win32all) still a separate download from a third
> party? Is it legal, technical, or what? I think it's about time it be
> part of the standard distribution.
Both legal and technical. The PythonWin author and maintainer (Mark
Hammond) hasn't contributed thi
Dave Benjamin wrote:
> Sure. I wasn't proposing that this be done behind Mark's back. I wasn't
> even proposing a fork; rather, just two installers bundled into one. The
> user, upon running the .msi file, would simply be asked if they'd like
> PythonWin also. PythonWin could be automatically combi
manstey wrote:
> input_file = open(input_file_loc, 'r')
> output_file = open(output_file_loc, 'w')
> for line in input_file:
> output_file.write(str(word_info + parse + gloss)) # = three
> functions that return tuples
>
> (u'F', u'\u0254') are two of the many unicode tuple elements returned
manstey wrote:
> a=str(word_info + parse + gloss).encode('utf-8')
> a=a[1:len(a)-1]
>
> Is this clearer?
Indeed. The problem is your usage of str() to "render" the output.
As word_info+parse+gloss is a list (or is it a tuple?), str() will
already produc
manstey wrote:
> Thanks very much. Your def comma_separated_utf8(items): approach raises
> an exception in codecs.py, so I tried = u", ".join(word_info + parse +
> gloss), which works perfectly. So I want to understand exactly why this
> works. word_info and parse and gloss are all tuples. does st
John Machin wrote:
> 1. *By definition*, you can encode *any* Unicode string into utf-8.
> Proves nothing.
> 2. \u00a0 [no-break space] has no equivalent in gb2312, nor in the
> later gbk alias cp936. It does have an equivalent in the latest Chinese
> encoding, gb18030.
Also, *by definition*, thou
[EMAIL PROTECTED] wrote:
> Learn something every day. I take it "646" is an alias for "ascii" (or vice
> versa)?
Usage of "646" as an alias for ASCII is primarily a Sun invention. When
ASCII became an international standard, its standard number became
ISO/IEC 646:1968. It's not *quite* the same a
Petter Haggholm wrote:
> Any help, thoughts, or advice would be vastly appreciated.
After changing PyObject_HEAD, I would run "make distclean".
Most likely, some object files were not recompiled and still
using the old layout.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-lis
[EMAIL PROTECTED] wrote:
> Hmmm. After reading
> http://kofoto.rosdahl.net/trac/wiki/UnicodeInPython I tried:
>
> system(cmd.encode(getfilesystemencoding()))
>
> which works (nothing else changed). But that seems odd - is this a bug
> (the asymmetry - I read files with os.listdir with n
Duncan Smith wrote:
> chris brat wrote:
>> Doesnt this do what the original poster is try accomplish?
>>
>
> Not what the OP asked for, no. Clearing a list implies that list1
> should still be bound to the same list (which might be important if
> there are other names bound to the same list). If
> entity_map = htmlentitydefs.entitydefs.copy()
> for name, entity in entity_map.items():
> if len(entity) != 1:
> entity_map[name] = unichr(int(entity[2:-1]))
>
> (entitydefs is pretty unusable as it is, but it was added to Python
> before Python got Unicode strings, a
> Sorry for the top posting - I found out that the problem I encountered
> was not something new in Python 3.0.
See Fredrik's message. The problem is not with htmlentitydefs, but with
your usage of ElementTree - in ElementTree, the .entity dictionary
values are not again parsed, apparently causing
> Whatever you want to call it, the Python DLL is not part of the operating
> system, it's not a driver and doesn't belong in the system directory.
Is that just your personal opinion, or a guideline from the operating
system vendor?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/pyth
>> Instead of being upset about cutting your word (which was not my
>> intention, sorry about that), it would be nice if you could make a
>> statement concerning the problem I mentioned: Having an object being
>> created by one MSVC runtime, msvcr80.dll and passing it to another
>> one, msvcr71.dll
>> I would not write it this way, but as
>>
>> for name,codepoint in htmlentitydefs.name2codepoint:
>> entity_map[name] = unichr(codepoint)
>
> has dictionary iteration changed in 3.0? if not, your code doesn't
> quite work.
Right - I forgot to add .items().
> and even if you fix that, it doe
> Given no UnicodeErrors, are there any cases for the following not to
> be True?
>
> unicode(s, enc).encode(enc) == s
Certainly. ISO-2022 is famous for having ambiguous encodings. Try
these:
unicode("Hallo","iso-2022-jp")
unicode("\x1b(BHallo","iso-2022-jp")
unicode("\x1b(JHallo","iso-2022-
> Is there some way to get a list of "impure" Python modules/extensions
> from PyPI?
Not easily. To create a full list, you will have to download all
packages, and check their respective setup.py files for occurrences
of Extension.
A subset can probably be found by looking at all packages classif
> It's one of Microsoft guidelines. The "'Designed for Microsoft Windows
> XP' Application Specification" only allows DLLs to be installed in the
> system directory if it's required for backwards compatiblity.
I guess you are referring to 2.6 here. I think Python perfectly meets
the specification
> No, that doesn't follow from the requirements given. The only exception
> for something that isn't a service or device driver is for backwards
> compatibility. Also, pretty much any DLL supports side-by-side
> installation.
Hmm. How do I have to build and install python25.dll exactly to make
t
> As I said before, I know how futile it is to argue that Python should
> change it's behaviour. I'm not going to waste my time telling you what
> to do. If you really want to know how side-by-side installation works,
> you can try reading the Windows SDK documentation.
I did, and determined tha
> Wow, that's not easy to see why would anyone ever want that? Is there
> any logic behind this?
It's the pre-Unicode solution to the "we want to have many characters
encoded in a single file" problem.
Suppose you have pre-defined characters sets A, B, C, and you want text
to contain characters f
> There is at least one actual problem I came across in an application
> linked with MSVCR 8.0, loading the Python DLL linked against MSVCR
> 7.1. When running a Python file using one of the PyRun_File[1]
> functions, the passed file handle has to be created from the embedding
> application. This h
> Is this functionality intended?
Google for "Python mutable default arguments" (you can actually
leave out Python).
It's part of the language semantics, yes.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> I started using python at work in the summer 2007. I think I know the
> stuff, but I need to expand my understanding of the more complex
> programming techniques.
There are various materials on Python and design patterns; just google.
I particularly recommend the talk by Alex Martelli. He gave t
[ Terry Jones ]
[ ... ]
> Also consider this solution from O'Reilly's Python Cookbook (2nd Ed.) p705
>
> def chop(iterable, length=2):
> return izip(*(iter(iterable),) * length)
Is this *always* guaranteed by the language to work? Should the
iterator returned by izip() change the i
1401 - 1500 of 2483 matches
Mail list logo