Steve Howell wrote:
> Does anybody have any links that points to the rationale for ignoring
> instance definitions of __getitem__ when new-style classes are
> involved? I assume it has something to do with performance or
> protecting us from our own mistakes?
Most magic methods are implemented as
Dave Angel wrote:
> Worse, even if the exception cannot be thrown on a non-Windows
> environment, leaving it undefined makes it very awkward to write
> portable code. An except clause that can never happen in a particular
> environment is pretty innocent. Or somebody can use a base class for
John Guenther schrieb:
> This is Mac related. I am running snow leopard. I am using Python 2.6.3.
>
> I had a lot of difficulty figuring out how to add a directory to sys.path
> that would be there every time I launched Idle. I have a directory called
> PythonPrograms in my Documents folder. Whe
Gregory Ewing wrote:
> ntpath.join('d:\\foo', '\\bar')
>> '\\bar'
>
> This does seem like a bug, though -- the correct result
> should really be 'd:\\bar', since that's what you would
> get if you used the name '\\bar' with 'd:' as your current
> drive.
No, it's not a bug. Since \bar is an ab
cjblaine wrote:
> Where/how can I configure the appropriate portion of our Python
> install to do 100% the right thing instead of just 50% (-L)?
Python's distutils doesn't alter the library search path unless you tell
it explicitly.
> A specific example -- note the -L and lack of -R (Solaris buil
Terry Reedy wrote:
> Currently, as far as I know, -0 just removes asserts.
-O (not -0) also sets __debug__ to False.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Martin Drautzburg wrote:
> The first case does what I expected, i.e. it iterates over whatever f()
> yields. In the second case nothing is printed. I have the impression
> that it still calls the original __iter__() method (the one defined at
> the class level).
>
> Why is that so?
> How can I repl
duncan smith wrote:
> Hello,
>I'm trying to find a clean and reliable way of uncovering
> information about 'extremal' values for floats on versions of Python
> earlier than 2.6 (just 2.5 actually). I don't want to add a dependence
> on 3rd party modules just for this purpose. e.g. For
Steven D'Aprano schrieb:
> I am pleased to announce the first public release of obfuscate 0.2.2a.
>
> http://pypi.python.org/pypi/obfuscate/0.2.2a
>
> obfuscate is a pure-Python module providing classical encryption
> algorithms suitable for obfuscating and unobfuscating text.
>
> obfuscate inc
Stef Mientki wrote:
> sorry I don't,
> unless Python is only meant for the very well educated people in encryption.
All algorithms in obfuscate are obsolete, insecure and only interesting
for people *that* want to get well educated in the history of encryption.
> I neither did look at the code,
>
Gregory Ewing wrote:
> Actually I gather it had a lot to do with the fact that
> the Germans made some blunders in the way they used the
> Enigma that seriously compromised its security. There
> was reportedly a branch of the German forces that used
> their Enigmas differently, avoiding those mista
Terrence Cole wrote:
-0.1 ** 0.1
> -0.7943282347242815
a = -0.1; b = 0.1
a ** b
> (0.7554510437117542+0.2454609236416552j)
-abs(a ** b)
> -0.7943282347242815
>
> Why does the literal version return the signed magnitude and the
> variable version return a complex?
The binary po
hjebbers wrote:
> The message on the screen is (I typed it over):
>
> **
> python.exe
>
> python.exe has encountered a problem and needs to close.
> We are sorry for the inconvenience.
>
> If you were in the midd
Lloyd Zusman wrote:
> The -T and -B switches work as follows. The first block or so
> of the file is examined for odd characters such as strange control
> codes or characters with the high bit set. If too many strange
> characters (>30%) are found, it's a -B file; otherwise it
mk wrote:
> Hmm how about "call by label-value"?
Or "call by guido"? How do you like "call like a dutch"? :]
--
http://mail.python.org/mailman/listinfo/python-list
Echavarria Gregory, Maria Angelica wrote:
> Dear group:
>
> I am developing a program using Python 2.5.4 in windows 32 OS. The amount of
> data it works with is huge. I have managed to keep memory footprint low, but
> have found that, independent of the physical RAM of the machine, python
> alw
Mr.John wrote:
> Below is a test case that demonstrates this. Tests 1 & 2 concatenate the
> command and the argument, Tests 3 & 4 mimic the python docs and use the form
> Popen(["mycmd", "myarg"], ...), which never seems to work.
It doesn't work with shell=True because the shell is not able to
int
News123 wrote:
> Hi,
>
>
> How can I kill my own process?
>
> Some multithreaded programs, that I have are unable to stop when ctrl-C
> is pressed.
> Some can't be stopped with sys.exit()
You have to terminate the XMP-RPC server or the manager first. Check the
docs!
You can terminate a Python
Karjer Jdfjdf wrote:
> I'm pretty new at programming and want some advice on mixing Jython and
> Python.
>
> I want to use Jython to access some Java libraries, but I want to keep
> developing in normal Python. Some modules I use a lot are not available in
> Jython.
>
> The bulk of my programm
Steve Holden schrieb:
> Barak, Ron wrote:
>> Hi,
>>
>> I'm trying to add a library path to my pythonpath, but seems it is not
>> accepted -
>>
>> On Windows DOS window:
>>
>> C:\>echo %PYTHONPATH%
>> c:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\
>>
> That looks like it should work. The only t
Jordan Apgar wrote:
> Hey all,
> I'm trying to convert a string to a date time object and all my fields
> convert except for month which seems to default to january.
>
> here's what I'm doing:
> date = "2010-03-16 14:46:38.409137"
> olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f")
>
> pr
Wes Santee wrote:
> I am very new to Python, and trying to figure out how to create an
> object that has values that are accessible either by attribute name,
> or by index. For example, the way os.stat() returns a stat_result or
> pwd.getpwnam() returns a struct_passwd.
>
> In trying to figure it
Tim Daneliuk schrieb:
> On older 32 bit Windows systems, sys.platform returns: 'win32'
>
> What does it return on 64-bit Windows systems? I'd check myself, but
> I don't have access to 64-bit Windows.
Do you want to know if the current build of Python is a 32 or 64bit build?
>>> import struct
Steve Holden wrote:
> You may well find that namedtuple is faster than what you put together
> yourself, as the collections module is implemented in C.
But namedtuple isn't, Steve. Namedtuple is a class generator that
creates fast and efficient classes.
--
http://mail.python.org/mailman/listinfo
Martin P. Hellwig schrieb:
> What I don't understand why in the second test, the last boolean is True
> instead of (what I expect) False.
> Could somebody enlighten me please as this has bitten me before and I am
> confused by this behavior.
Hint: TEST2.one is not a reference to TEST2.__instance
Am 17.11.2010 09:16, schrieb Brett Bowman:
> Good ideas, but I've tried them already:
> -No del command, or replacing it with a set-to-null, neither solve my file
> access problem.
> -PdfFileReader has no close() function, and causes an error. Weird, but
> true.
> -pdf_handle.close() on the other
Am 03.12.2010 14:53, schrieb Jean-Michel Pichavant:
> Next time I promise to look at the doc before actually asking the
> question here :)
You are misinterpreting the excerpt. You are right that the id of an
object doesn't change during the lifetime of a Python process and as
long as it stays ins
Am 07.12.2010 16:35, schrieb Ale Ghelfi:
> (i'm under Ubuntu 10.10 amd64 and python 2.6 and kinterbasdb 3.2 )
> I try to connect my database of firebird 2.5 by kinterbasdb.
> But python return this error :
>
> >>> c =
> kinterbasdb.connect(dsn="/media/VINACCIA.FDB",user="user",password="password
Am 08.12.2010 19:05, schrieb astar:
> Hi,
>
> I recently got caught on tempfiles with respect to
> urllib.urlretrieve, which can create a tmpfile. Ah, but the file
> simply could not be found on the file system, even as root. But
> within the program that created the tmpfile, you could do usefu
Am 08.12.2010 10:31, schrieb Alex Willmer:
> 2. When you say "I am unable to access". Do you mean another script/
> process is unable to access? If so, that is the point of mkdtemp() -
> to make a temporary directory that _only_ the creating process can
> access. If you want to share it then tempfi
Am 11.12.2010 18:04, schrieb Roy Smith:
> if os.access("file", os.F_OK):
>os.unlink("file")
>
> but that's annoying too. What would people think about a patch to
> os.unlink() to add an optional second parameter which says to ignore
> attempts to remove non-existent files (just like "rm -f"
Am 12.12.2010 15:14, schrieb Max Countryman:
> I'm sure this has been brought up many times, but a quick Googling didn't
> yield the decisive results I was hoping for, so I apologize if this has
> already been addressed in great detail somewhere else.
>
> I am wondering what the rationale is beh
Am 12.12.2010 19:31, schrieb Steve Holden:
> Would you care to quantify how much CPU time that optimization will
> typically save for a loop of fair magnitude (say, a billion iterations)?
The difference is minimal but measurable for very tight loops.
$ python -m timeit -n20 -- "i = 0" "while 1:"
Am 13.12.2010 11:20, schrieb Darshak Bavishi:
> Hi Experts ,
>
> I am using python 2.6 and i had installed paramiko module which needs
> pycrypto but ,
> when i am installing pycrypto in windows its giving error as follows:
>
[...]
> can u suggest any source to get pycrypto to avoid such events?!
Am 13.12.2010 12:41, schrieb Darshak Bavishi:
> Hi,
>
> I have downloaded paramiko and installed it now it needs Pycrypto . So i
> tried to install pycrypto but its giving error of vcvarsall.bat
> so from christian suggestion i downloaded MinGW . But i have no idea how to
> install it in windows m
Am 14.12.2010 17:52, schrieb Arnaud Delobelle:
> You also need to initialise False to False for it to be really
> robust. So something like this will do.
>
> True = not 0
> False = not True
> while True:
> ...
> True = False
Tres Seavers once told me a joke like this:
Am 19.12.2010 09:24, schrieb Paul Rubin:
> Deques are not linked lists. They're just like regular Python lists
> (i.e. resizeable arrays) except they can grow and shrink at both ends
> rather than just one. The amortized complexity of an append or pop
> operation (at either end) is O(1) but occas
Am 20.12.2010 09:45, schrieb mechtheist:
> I am no programmer, but know the rudiments [the rudi'est of rudiments]
> of working with Python. I have a simple need, to have a simple
> script/app I can run that will crash my PC. On my desktops, I can
> always hit the reset, but that is not an opt
Am 26.12.2010 18:53, schrieb kj:
> It means that, for both subclasses, del fails to trigger the
> dynamically installed instance method __delitem__.
Magic methods like __delitem__ are looked up on the type, not on the
instance. You can't change the behaviour on instances.
> If I replace dict with
Am 26.12.2010 19:49, schrieb kj:
> How do you know this? Is this documented? Or is this a case of
> Monday-night quarterbacking?
Please stop bitching around. You know that by carefully reading the
documentation:
http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-
Am 28.12.2010 15:11, schrieb Steven D'Aprano:
> # Untested
> class InternedTuple(tuple):
> _cache = {}
> def __new__(cls, *args):
> t = super().__new__(cls, *args)
> return cls._cache.setdefault(args, t)
> def __eq__(self, other):
> return self is other
> de
Am 28.12.2010 21:16, schrieb Hrvoje Niksic:
> Christian Heimes writes:
>
>> Also this code is going to use much more memory than an ordinary tuple
>> since every instance of InternedTuple has a __dict__ attribute. This
>> code works but I had to move the cache outs
Am 23.01.2011 22:05, schrieb CM:
> In Python, is there a recommended way to write conditionals of the
> form:
>
> "if A and B but not C or D in my list, do something." ?
>
> I may also have variations on this, like "if A but not B, C, or D".
>
> Do I have to just write out all the if and elifs
Am 24.01.2011 04:05, schrieb Ian Kelly:
> On Sun, Jan 23, 2011 at 2:34 PM, Christian Heimes wrote:
>> your_set = set(your_list)
>>
>> if your_set.issuperset(set([A, B])) and your_set.isdisjoint(set([C, D])):
>
> if your_set.intersection([A, B, C, D]) == set([A, B]
Am 14.02.2011 00:12, schrieb rantingrick:
> False! There IS harm in using super when super not needed. The
> difference is readability! And don't downplay that aspect. You
> yourself have said this in the past. It seems *some* of us have very
> short memories.
Of course you are entitled to have yo
On 06.04.2010 15:58, booncw wrote:
Hi,
I am running a simulation where the python module has already been
imported. Could you please tell me how to load it?
I've been doing this (importing everytime), but it is too slow:
pModule = PyImport_Import(pName);
You can cache the module object in a
On 14.04.2010 13:22, Alex Hall wrote:
I tried both vcredist_x86.exe and vcredist_x64.exe, with no result; I
still do not have the required dll (I have 32-bit python, so the _x86
should have done the trick). I will try another poster's suggestion of
installing vcpp express 2005 and hope that will
On 14.04.2010 14:25, Alex Hall wrote:
I notice that I do not have the dll when py2exe says it cannot locate
the dll. If I need vs2008, then what good is vcredist_xxx.exe? It does
not seem to give me the dll, but the py2exe tutorial says that it
will. What am I missing?
Do you have the correct v
Almar Klein wrote:
Ah, it does exist! I wish I knew that two months ago, it would've saved me
some precious time ;)
The trick works only for objects that are tracked by CPython's garbage
collector. Simple and non-containerish objects like str, int, unicode
and some other types aren't tracked
Mirko Vogt wrote:
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that python26.dll could not be
s = "12345678901234"
assert len(s) == 14
import sys
sys.getsizeof(s)
38
So a single 14 char string takes 38 bytes.
Make that at least 40 bytes. You have to take memory alignment into account.
So a set with 83000 such strings takes approximately 1 MB. So far fairly
trivial. But that's just th
I'm interested in gathering some statistics on this, and to do so I need
a way of measuring the list's logical size versus its actual size. The
first is easy: it's just len(list). Is there some way of getting the
allocated size of the list?
With Python 2.6 and newer you can use sys.getsizeof() t
Laszlo Nagy wrote:
However, it won't work for temporary files. Temporary files are just
file-like objects, and their name is ''. I guess I could open a
temporary file with os.open, and then use os.dup, but that is low level
stuff. Then I have to use os.* methods, and the file object won't be
iter
pyt...@bdurham.com wrote:
Is there a way to exclusively lock a file to prevent other
processes from reading it while we have it open?
I need to cache some overflow data to disk in a temp file and I
want to make sure no other processes can read the contents of
this file while I'm using it.
I tri
Joe Riopel wrote:
On Wed, May 5, 2010 at 8:56 AM, Massi wrote:
but this does not work, since the two threads share the same pid. Can
anyone give me a suggestion?
Have you looked at os.fork ?
http://docs.python.org/library/os.html#os.fork
Fork on Windows XP? Have a lot of fun ... The NT Kern
Am 05.05.2010 17:59, schrieb Benjamin Kaplan:
Multiprocessing wasn't added until Python 2.6.
http://www.python.org/dev/peps/pep-0371/
In Python 2.5, it was still a 3rd party package.
http://pypi.python.org/pypi/processing
The project's website appears to be down right now though.
http://develop
Am 05.05.2010 19:26, schrieb Pietro Campesato:
Hi,
recently I've been wondering how to roll my own portable python 3.1
(since there seems to be no portable app specifically for this
version). Thinking you can just copy your install folder (+ python's
dll), I've noticed that there seems to be no p
AON LAZIO wrote:
As subject says, what is the differences of 'is not' and '!='. Confusing..
"is not" checks if two objects are not identical. "!=" checks if two
objects are not equal.
Example:
Two apples may be equal in size, form and color but they can never be
identical because they are m
Johan Förberg every:
That's interesting. Are there any more numbered pseudofiles? I suppose
its mainly an excellent way to confuse people when you open(0).read(),
but it would be interesting to know.
All opened files (and on Unix even network sockets, epoll queues,
inotify handlers etc) have a
First, I've looked a fair bit and can't find how one can find the base
classes of a subclass? isinstance and issubclass sort of do the
opposite of what I want. Surely somewhere there is something like
MyThingee.something.orOther.baseClasses()
You can get the direct parents of a class with the
Or if you do need to override it for some reason, you
need to accept the extra args and pass them on:
class nThread(threading.Thread):
def __init__(self, *args, **kwds):
threading.Thread.__init__(self, *args, **kwds)
# your other stuff here
Since Thread is a
mk wrote:
I wonder if there is a way to load C extension from in-memory object,
not from the file on the disk?
No, that's not possible since Python depends on the operating system. A
lot of operating systems require a physical file to load the shared
library from. Python uses dlopen() on most
MRAB wrote:
I think you need to 'commit' any changes to do to the database.
Yeah, you are right.
Also some RDBMS don't support DDL and DML statements inside one
transaction. You may need to commit and begin after the create table DDL.
Christian
--
http://mail.python.org/mailman/listinfo/pyt
Am 21.05.2010 04:56, schrieb Alex Hall:
Hi all,
I am now trying to allow my classes, all of which subclass a single
class (if that is the term), to provide optional arguments. Here is
some of my code:
class Craft():
def __init__(self,
name,
isAircraft=False,
id=helpers.id(),
hits=0,
Am 22.05.2010 12:06, schrieb timo verbeek:
Is there not an other way to create a fast addon system?
A module or something like that
How fancy are your requirements? People have written numerous plugin
systems, from simple to use ones like CherryPy's tool system up to a
complex component archi
A lister recently responded to my post concerning mysl commands of the
following type:
cursor.execute('insert into foo values (%s, %s)' % (bar, something))
stating that I need to eliminate the "%" to prevent injection attacks, thus:
cursor.execute('insert into foo values (%s, %s)', (bar, someth
Am 22.05.2010 18:09, schrieb Adam Tauno Williams:
On Sat, 2010-05-22 at 18:06 +0200, Christian Heimes wrote:
A lister recently responded to my post concerning mysl commands of the
following type:
cursor.execute('insert into foo values (%s, %s)' % (bar, something))
stating that
Actually, no. The names of tables are not quoted in SQL.
One writes
SELECT ID FROM mytable;
not
SELECT ID FROM "mytable";
nit picking mode:
Some RDBMS support case sensitive table names. You have to quote the
table name if you using the feature. Yeah I know, it's prett
Do I miss something?
Is this the way to do it, or is there a better one?
A better way was introduced in Python 2.6. See
http://docs.python.org/library/functions.html?highlight=property#property
I have a Python only version around if you are still using Python 2.5.
Christian
--
http://mail.p
Finally, are these SQL databases? The best way of getting information
is with SQL.
SELECT * FROM NumberOfPets
WHERE name IN (SELECT name FROM CatLovers) OR
name IN (SELECT name FROM DogLovers)
ORDER BY name;
A good way is to use SQL with JOINs instead of horrible nested selects.
Although S
Am 28.05.2010 11:31, schrieb eb303:
> On May 27, 3:24 pm, Christian Heimes wrote:
>>> Do I miss something?
>>> Is this the way to do it, or is there a better one?
>>
>> A better way was introduced in Python 2.6.
>> Seehttp://docs.python.org/library/functio
> i'm reading bytes from a serial port, and storing it into an array.
>
> each byte represents a signed 8-bit int.
>
> currently, the code i'm looking at converts them to an unsigned int by
> doing ord(array[i]). however, what i'd like is to get the _signed_
> integer value. whats the easiest way
> You're asking, it seems, for the equivalent of a UNIX softlink...
> Normal Windows doesn't support those (I think they are in the OS
> somewhere but not made visible to the user).
Actually NTFS supports hard links, soft links and junction points since
Windows 2k. [1]
Christian
[1] http:/
Am 04.06.2010 14:38, schrieb Spyder42:
> I hope this is the right place to ask this, and appologise if it's
> not. I'm trying to install 2.6.5 in Win98 se final. It says "a
> required dll could not be run". Do I have to upgrade my whole OS just
> to install this, or is there a fix I can apply to 98
> So your response is either, you don't know if there is a fix, or 'No
> way in h377.' You couldn't figure out by my post that I already knew
> that?
Let me paraphrase my answer:
You can't run Python 2.6 on Windows 98 because we have dropped support
for any Windows older than Windows 2000 SP4. I
Am 11.06.2010 10:39, schrieb Mahmood Naderan:
> Hi,
> I am new to python so my question may be very basic.
> Suppose I have a file (sc_1.sh) which the path to that file is in system path:
> SOMETHING=/home/mahmood/scripts
>
> Now I want to open that file with respect to the environment variable:
> There aren't any; modules do not follow the class object protocol. They
> are simple types with a __dict__ (which you can't change, either, so no
> replacing it with a dict that implements __setattr__).
You are wrong, my friend. :)
Modules follow the new style class and instance protocol. Modul
> I will only have one IP address and only port 443.
>
> 1.) What alternatives would exist compared to apache / mod_python
You can use a combination of mod_proxy and mod_rewrite to set up a
forwarding proxy in your Apache server. Let Apache deal with SSL,
virtual hosting etc. Then bind your appli
Am 22.06.2010 19:18, schrieb Terry Reedy:
> On 6/22/2010 5:44 AM, Daniel Fetchinson wrote:
>>> how can i simply add new functions to module after its initialization
>>> (Py_InitModule())? I'm missing something like
>>> PyModule_AddCFunction().
>
> in Python, for modules written in python
>
> imp
> The InstanceCounted.count is 1 at the end. If I omit the call to
> "self.method = print_exception_decorator(self.method)" then the instance
> count goes down to 0 as desired. I thought that the decorator might be
> holding a reference to the instance through the bound method, so I added
> t
Am 24.06.2010 14:39, schrieb Michel Claveau - MVP:
> Hi!
>
> With PIL-1.1.7.win32-py2.6 and Windows 7, I have this traceback:
> raise ImportError("The _imagingft C module is not installed")
> ImportError: The _imagingft C module is not installed
>
> I tested "import _imaging" and several othe
> I am attempting to install the GDAL bindings (GDAL-1.7.1) on a
> Windows XP Desktop with Python 2.6 and GDAL. During install, the
> script finishes with "error: Unable to find vcvarsall.bat".
>
> What dependencies am I missing?
Visual Studio 2008
Christian
--
http://mail.python.org/mailman/
> I'll try my luck with Cygwin's ggc before I look into another C/C++
> compiler.
Better grab a recent build of MinGW32. Python's build system has native
support for mingw32. IIRC Cygwin's GCC is only supported for Cygwin
builds of Python.
Christian
--
http://mail.python.org/mailman/listinfo/p
Am 26.06.2010 17:59, schrieb Stefan Reich:
> The main problem is that Python 3 is incompatible with almost all
> scripts written for Python 2 (if they use print). And it gets worse:
> Python 3 scripts are incompatible with Python 2! (If they use print
> variants, like writing to a file.)
Seems
> >>> i.__add__ = __add__
> >>> i+1
> 6
> >>>
>
> Was this in reference to a specific python version?
This doesn't work with new style classes and thus not in Python 3.x.
Subclass from object and you'll see the difference.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
> Actually i wrote some scripts in python that are working as gateway
> controlling scripts iptables/tc/squid-proxy, and i want to execute
> them as cgi. Protection of source code is also important. These
> scripts works fine with ubuntu 9.10 and ubuntu 10.04, trying to
> eleminate this execution e
> I'm using Ubuntu 10.04, i try to install Python 2.4.2 & Python 2.4.3 got
> error message while doing make command. anybody can tell tell, How to
> overcome this error
Perhaps somebody is able to help you if you provide the full error
message and describe all steps that lead to the error mesa
> my question is, therefore, how do i specify a ctypes wrapper around
> the standard int main(int argc, char *argv[]) which i am (obviously)
> going to move to a (new) c library?
Maybe I missing something here but libraries don't have a main()
function. The main() function is the entry point of a
Am 06.07.2010 18:21, schrieb Thomas Jollans:
> mingw gcc should work for building C++ extensions if it also works for C
> extensions. There's no difference on the binding side - you simply have
> to include everything as extern "C", which I am sure the header does for
> you.
You need unofficial ve
>> You need unofficial version of MinGW with gcc 4.x for several C++
>> extension like PyLucene's JCC. Some project like pywin32 don't work with
>> MinGW, too.
>
> aha - why is that?
>
> But - if you write code that builds with [whatever gcc version you
> have], the compiler Python is built with
> That's nice to know, but I personally don't have an MSDN subscription.
> Many scientists don't have access to development tools like VS2008.
> Many hobby developers don't have access expensive MSDN subscriptions.
> Many don't develop C personally, but just "needs a compiler" to build
> an extensi
> can anybody tell me how python internal represent a float number??
It's an IEEE 754 double precision float on all hardware platforms that
support IEEE 754 semantics. Python follows the C99 standards for double
and complex numbers.
Christian
--
http://mail.python.org/mailman/listinfo/python-li
> Yeah, but then we're down to file descriptors, C library locales and such as
> the
> remaining problems.
Don't forget errno! Every CRT might have its own errno thread local. I
don't know how its handled on Windows but I suspect it suffers from the
same problem.
Christia
--
http://mail.pytho
> The main problem that the required MSVC redistributables are not necessarily
> present on the end user's system.
It's not a problem for Python anymore. It took a while to sort all
problems out. Martin and other developers have successfully figured out
how to install the CRT for system wide and
> Really? I wasn't entirely aware of this effect of the "io" module.
> Somehow, without at all paying attention (because certain third party
> modules blocking me for awhile, I never looked close enough), I just
> sort of thought the "io" module was mostly thin wrappers around stdio
> primitives, i
> my python project crashes in a non reproducible way. With gdb I got
> the backtraces given below.
> How can I possibly figure out the reason for the segfaults that occur
> under Linux and Windows, using Python 2.6 in both cases.
One of your third party C extension has a reference count bug. It l
> oh, I take back my words, it's still there, just I need to
> reload(sys).
Just don't. If you change the default encoding you are going to break
important data structures like dicts in a subtle and hard to detect way.
If your application needs to change the default encoding, it's broken.
The func
> It's strictly for windows platform. I would like to know from expert
> python users and linux programmers, how we can achieve similar
> functionality on linux platform? I do have limited c/c++ skill sets
> but I would love to give a try.
I don't know any way to load a shared library from somethi
> but none of this has anything to do with Python itself. i am sure python
> servers have been running reliably for long periods of time, but i've
> never had to deal with a two-month guarantee before. is there something
> else i am missing here that i should be concerned about on the
> pure-P
> Hi all, I'm using py3k and the urllib package to download web pages. Can
> you suggest me a package that can translate reserved characters in html
> like "è", "ò", "é" in the corresponding correct
> encoding?
I think the html parser of LXML can convert the entities, too.
Christian
--
http:
801 - 900 of 1052 matches
Mail list logo