subscribe

2019-05-17 Thread Matthias Weckbecker
-- https://mail.python.org/mailman/listinfo/python-list

spurious BadDrawable error when running test_tk

2018-05-14 Thread Matthias Kievernagel
ven't found anything on b.p.o. about this. Thanks for any insights, Matthias Kievernagel -- https://mail.python.org/mailman/listinfo/python-list

Method to know if object support being weakreferenced ?

2016-12-12 Thread Matthias Bussonnier
Hi all, I was recently had to use weakreferences, using the weakref module, and came across the fact that some object cannot be weakreferenced. If you try to do so you get greated by a TypeError, which is a totally expected and documented behavior. As I tend to prefer the "Look before you le

Re: [Python-ideas] Wheels For ...

2015-09-06 Thread Matthias Bussonnier
Hi Sven, Just adding a few comments inline: On Sun, Sep 6, 2015 at 7:33 PM, Sven R. Kunze wrote: > 3) more than one way to do (upload, wheel, source/binary etc.) it (sigh) And most are uploading/registering over http (sight) > nope: what a pity for wheels; example: > https://github.com/simple

Re: Python ORM library for distributed mostly-read-only objects?

2014-06-23 Thread Matthias Urlichs
actually load all the data into memory beforehand would be prohibitive (so I'd still need a way to load referred data on demand), and the update problem remains. -- -- Matthias Urlichs -- https://mail.python.org/mailman/listinfo/python-list

Re: Python application for rpm creation

2013-11-27 Thread Matthias Runge
;generator" for Sphinx documentation: > https://github.com/amitsaha/sphinx_doc_packaging > > It's written in Python, so perhaps may help with you a starting point. > > Best, > Amit. > > In Fedora (and IMHO in EPEL, too) there is a package named pyp2rpm. This is qui

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Matthias Felleisen
scheme for complex systems involving hiding of details, and the small scale one was to find a more flexible version of assignment, and then to try to eliminate it altogether." At least for me, this quote sends a signal to language designers that is still looking for a receiver -- Matth

Pygtk entry readline

2013-02-02 Thread Matthias Fulz
an gtk gui inside an entry or textbox, etc. Thanks, Matthias -- Wer A sagt, der muss nich B sagen, Er kann auch erkennen, dass A falsch war. GPG key: 1814DA35 -- http://mail.python.org/mailman/listinfo/python-list

Re: Easiest framework to develop simple interactive web site in python?

2011-09-12 Thread Matthias Huening
Am 12.09.2011 16:03, schrieb John Reid: I don't have much experience writing web sites or applications. Can anyone recommend a python framework that will allow me to easily write a few pages? You want a simple framework? Try Bottle: http://bottlepy.org/ Matthias -- http://mail.pytho

Re: how to do random / SystemRandom switch

2011-04-30 Thread Matthias Kievernagel
Peter Otten <__pete...@web.de> wrote: > Matthias Kievernagel wrote: > >> In my top-level script I want to select if my program >> is to use random.xxx functions or the random.SystemRandom.xxx >> ones. All the other modules shouldn't know about that >&g

how to do random / SystemRandom switch

2011-04-30 Thread Matthias Kievernagel
do a similar thing in the Makefile using Compiler-/Link-Options (DEBUG/FINAL Build) switching between two libraries. Any hints are welcome, especially a search term would be very helpful :) Thanks in advance, Matthias Kievernagel. -- http://mail.python.org/mailman/listinfo/python-list

Re: Location of data files

2011-04-01 Thread Matthias-Christian Ott
On Fri, Apr 01, 2011 at 08:37:35PM +0200, Matthias-Christian Ott wrote: > I want to include data files with a python package. With distutils it > seems common to specifiy these files in the data_files argument with a > non-portable location (e.g. data_files=[('share/examp

Location of data files

2011-04-01 Thread Matthias-Christian Ott
packaging (e.g. data files are installed to /usr/share when requested), portability and customisation (i.e. data files can be replaced by the user or alternative locations can be specified)? Regards, Matthias-Christian -- http://mail.python.org/mailman/listinfo/python-list

Raw Sockets - IP-Encapsulation

2010-09-24 Thread Matthias Guentert
this and even better could provide some examples on the usage. Thanks in advance, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Raw Sockets - IP-Encapsulation

2010-09-23 Thread Matthias Guentert
this and even better could provide some examples on the usage. Thanks in advance, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: py3 tkinter acceps bytes. why?

2010-05-07 Thread Matthias Kievernagel
for display, i.e. not a string. If bytes pass unnoticed, I'll sooner or later have a surprise. Just to make sure I decode all bytes (coming from a socket) before I pass them on to the GUI. Regards, Matthias Kievernagel -- http://mail.python.org/mailman/listinfo/python-list

Re: py3 tkinter acceps bytes. why?

2010-05-06 Thread Matthias Kievernagel
ust the type names >swapped. If I don't want bytes to get passed to tkinter I just have to raise an exception in AsObj, no? Or is it even sufficient to just remove the bytes case? Regards and thanks for your answers. Matthias Kievernagel. -- http://mail.python.org/mailman/listinfo/python-list

py3 tkinter acceps bytes. why?

2010-05-04 Thread Matthias Kievernagel
From: Matthias Kievernagel Subject: py3 tkinter acceps bytes. why? Newsgroups: comp.lang.python Summary: Keywords: In a recent thread named "py3 tkinter Text accepts what bytes?" (google groups link: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b75ed6

Re: py3 tkinter Text accepts what bytes?

2010-04-23 Thread Matthias Kievernagel
eb303 wrote: > On Apr 23, 2:00 pm, Matthias Kievernagel > wrote: >> Hello, >> >> I stumbled upon this one while porting some of my programs >> to Python 3.1. The program receives messages from a socket >> and displays them in a tkinter Text. Works fine in Pyth

py3 tkinter Text accepts what bytes?

2010-04-23 Thread Matthias Kievernagel
this magic is done? Is it tcl magic or did I miss something in the python sources? Is this somewhere documented? Thanks for any hints, Matthias Kievernagel -- http://mail.python.org/mailman/listinfo/python-list

incrementing string/hex value from file and write back

2009-08-20 Thread Matthias Güntert
Hello guys I would like to read a hex number from an ASCII file, increment it and write it back. How can this be performed? I have tried several approaches: my file serial.txt contains: 0C -- f = open('serial.txt', 'r') val = f.read() val = val.encode('hex') p

Re: difference between 2 arrays

2009-08-19 Thread Matthias Huening
Pierre (19.08.2009 10:48): Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] What about set()? >>> a = set([1,2, 3,2,5,2]) >>> b = set([1,2]) >>> a.differenc

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-10 Thread Matthias Güntert
-> OKAY I really would be happy if someone could have a look at my code [1] as this extensions are important for verifying the trust chain. Please let me know if there is anything I can do with my limited knowledge about OpenSSL to get this working... Regards, Matthias [0] https

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-10 Thread Matthias Güntert
Now I have this patch applied to the M2Crypto SVN branch -- http://mail.python.org/mailman/listinfo/python-list

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-05 Thread Matthias Güntert
Is there another workaround to set this extension? How can I provide more information to get this fixed? Working with the latest SVN version is no option for me at the moment. Thanks in advance, Matthias -- http://mail.python.org/mailman/listinfo/python-list

M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-04 Thread Matthias Güntert
Hello I am trying to add the extensions "subjectKeyIdentifier" and "authorityKeyIdentifier" to a x509v3 certificate. Regarding rfc5280, section 4.2.1.2 the key identifier is composed of the 160-bit SHA-1 hash of the BIT STRING subjectPublicKey http://tools.ietf.org/html/rfc5280#section-4.2.1.2

Re: M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-04 Thread Matthias Güntert
> > cert_extension_2 = X509.new_extension("keyUsage", "10100") > > Maybe your OpenSSL is too old. keyUsage needs to be defined in OpenSSL > obj_dat.h file for this to work. I am using OpenSSL version 0.9.8k-fips which is the latest version. I replaced: cert_extension_2 = X509.new_ext

M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-03 Thread Matthias Güntert
Hello python-list members Why is the following code snippet throwing an AssertionError? Is that behavior a bug within X509.X509_Extension_Stack()? How would you suggest popping every element from the stack? Regards, Matthias Güntert - from

M2Crypto: AttributeError: 'CSR' object has no attribute 'pkey'

2009-08-01 Thread Matthias Güntert
assing to it, or not? I really would be happy if someone could give me a helping hand on this and maybe could comment every style / ... mistake I made to accelerate my learning experience. Thanks, Matthias $ cat csr.py from config import * from keypair import * from M2Crypto import X509, EVP class

Re: multi-core software

2009-06-10 Thread Matthias Blume
e of the product in question. That being said, there are plenty of situations where performance obviously does matter a great deal -- as you correctly pointed out. (It all depends on the above mentioned "product in question" and the nature of its life cycle.) Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: find sublist inside list

2009-05-04 Thread Matthias Gallé
Oh well, I have done a mistake, it seems. Another solution then: 'acaccgac'.replace("ac", chr(6)) '\x06\x06cg\x06' Bye, bearophile Thanks bearophile and John for your quick answers. Unfortunately, the int that can replace a sublist can be > 255, but J

find sublist inside list

2009-05-04 Thread Matthias Gallé
d like to work with lists straightforward, but I could not found anything to search a sublist inside a list. Any propositions for a simple solution? Thanks in advance, -- Matthias Gallé Project Symbiose Centre de Recherche INRIA Rennes - Bretagne Atlantique, Campus de Beaulieu, 35042 Rennes cedex, France tel: (33|0) 2 9984 7523 http://www.irisa.fr/symbiose/matthias_galle -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread Matthias Klose
(diversions) - replicating the current behaviour of setuptools simply overwriting the file conflicts. Following this proposal (downstream) packaging of namespace packages is made possible independent of any manual downstream packaging decisions or any downstream specific packaging decisions. Mat

Re: optimizing large dictionaries

2009-01-16 Thread Matthias Julius
ef __str__(self): > return "%s-%s-%s" %(self.field1, self.field2, self.field3) > > def __repr__(self): > return str(self) > > def __hash__(self): > return hash(str(self)) Maybe it would be faster to numerically combine the three fields instead of hashing the stri

Re: [Python-Dev] Python 2.5.3: call for patches

2008-11-11 Thread Matthias Klose
Martin v. Löwis schrieb: >> I would like to apply fixes for some CVE's which are addressed in 2.5 but not >> yet in 2.4. this would include >> >> CVE-2007-4965 >> CVE-2008-1679 >> CVE-2008-1721 >> CVE-2008-2315 >> CVE-2008-3144 >> CVE-2008-1887 >> CVE-2008-4864 > > Can you identify the revisions t

Re: [Python-Dev] Python 2.5.3: call for patches

2008-11-11 Thread Matthias Klose
changes that > are already released in Python 2.6 but may apply to 2.5 are of > particular interest. I would like to apply fixes for some CVE's which are addressed in 2.5 but not yet in 2.4. this would include CVE-2007-4965 CVE-2008-1679 CVE-2008-1721 CVE-2008-2315 CVE-2008-3144 CVE-2008

Re: how to acess mplayer with slavemode in python?

2008-10-11 Thread Matthias Bläsing
ith a pipe opened. HTH Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite

2008-10-03 Thread Matthias Huening
anges disabled, but rowcount seems to work anyway. Are there any pitfalls? Matthias -- http://mail.python.org/mailman/listinfo/python-list

SQLite

2008-10-03 Thread Matthias Huening
othing deleted' This seems not to work with sqlite3. How can I test whether deletion was sussessful or not? Thanks, Matthias -- http://mail.python.org/mailman/listinfo/python-list

tkFileDialog and locale under Linux

2008-09-23 Thread Matthias Huening
2.5/lib-tk/tkCommonDialog.py", line 48, in show s = w.tk.call(self.command, *w._options(self.options)) TclError: expected floating-point number but got "0.0" Switching back to the C-locale solves the problem: locale.setlocale(locale.LC_ALL, 'C') tkFileDialog will work again. Any ideas? Best, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP's str_replace ?

2008-09-10 Thread Matthias Huening
Matthias Huening (10.09.2008 16:07): Anjanesh Lekshminarayanan (10.09.2008 15:50): In PHP, if I do str_replace(array('a', 'e', 'i', 'o', 'u'), '-', $str) it'll replace all vowels with a hyphen in string $str. Is there some eq

Re: PHP's str_replace ?

2008-09-10 Thread Matthias Huening
g like this: import re new_str = re.sub('([aeiou])-', r'\1', str) Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] pysqlite 2.5.0 released

2008-09-08 Thread Matthias Huening
I haven't found any Makefile, so I it myself using this gcc command: $ cd .../ext/fts3 $ gcc -shared -o ~/src/gh/pysqlite/build/lib.linux-i686-2.5/fts3.so *.c -lsqlite3 Thanks! Will fts3 be integrated in the Python 2.6 release? Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] pysqlite 2.5.0 released

2008-09-07 Thread Matthias Huening
gebene Modul wurde nicht gefunden. Where should I look for the module? Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating two arrays at once

2008-08-29 Thread Matthias Bläsing
at you want. If you deal with big lists, you can use izip from itertools, which returns a generator. from itertools import izip for a,b in izip(A,B): print a,b HTH Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: Dropping privileges in python daemon

2008-08-18 Thread Matthias Bläsing
no - python offers the posix function setuid. Have a look here: http://www.opengroup.org/onlinepubs/95399/functions/setuid.html Without any further knowledge this should do everything you want from it and it is available from the posix and/or the os module. HTH Matthias -- http://mail.pytho

Re: convert string number to real number - ValueError: invalid literal for int() with base 10: '"2"'

2008-05-28 Thread Matthias Bläsing
t numbers. For your usage you want 10-based numbers. Have a look at the decimal module: >>> from decimal import Decimal >>> a = Decimal("11.45") >>> a Decimal("11.45") >>> str(a) '11.45' >>> a + 1 Decimal("12.45&qu

Problem using Idle under Linux - mouse not working well

2008-05-28 Thread Matthias Sommer
ied with a tiny Tk program with a single text field - there the positioning does work too. So it seems to be a bug in the distro(s) and regarding only Idle not Tkinter in total. Where could I look? Thanks in advance Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloading __getitem__

2008-05-22 Thread Andreas Matthias
[EMAIL PROTECTED] wrote: > actually i ddin't think about the fact that you're overloading dict, which > can already take multiple values in getitem Oh, I didn't know that. I totally misinterpreted the error message. > so how about > > class crazy: pass > > and then in your dict class: > > d

Overloading __getitem__

2008-05-22 Thread Andreas Matthias
The following code doesn't run but I hope you get what I am trying to do. class my_dict (dict): def __getitem__ (self, key, crazy = False): if crazy == True: return 5 * self.get(key) else: return self.get(key) foo = my_dict() foo['a'] = 123 print fo

Problem with complex numbers

2008-03-22 Thread Matthias Götz
Hello python fans, I have a small problem using python and complex math. The pow(complex,complex) function in the windows python version doesn't have the same semantic as the source version. (I have downloaded : - Python 2.5.2 compressed source tarball

ANN: Python cgkit v2.0.0alpha8

2008-02-25 Thread matthias . baas
Various smaller fixes and additions (see the changelog for a full list) For more information, visit: http://cgkit.sourceforge.net - Matthias - -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting stdout from other processes

2008-02-23 Thread Matthias Vogelgesang
o as > Diez suggested and have a thread > read the client output and propagate it to the main loop (maybe using > Queue.Queue) Thanks both of you for your explanations. In fact, it did the trick. -- Matthias -- http://mail.python.org/mailman/listinfo/python-list

Getting stdout from other processes

2008-02-22 Thread Matthias Vogelgesang
Hello, as I found out, it is possible to get the output of other programs using os.popen() and read from it. However this method is blocking for server processes and programs that don't stop immediately. Has anyone an idea how to get the output of such programs? -- http://mail.python.org/mailman/l

Re: Naming a file

2008-01-19 Thread Matthias Bläsing
Am Sat, 19 Jan 2008 14:14:30 -0800 schrieb snoylr: > For example if the variable is 105Markum > > What statement do I need to create a file name 105Markum.txt? filename_base = '105Markum' filename = '%s.txt' % filename_base f = open(filename, 'w') f.write(http://mail.python.org/mailman/listinfo/

Re: error ...1 value to unpack

2007-11-02 Thread matthias
On Nov 2, 2:32 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Nov 2, 2007 3:04 PM, Beema shafreen <[EMAIL PROTECTED]> wrote: > > > > > hi everybody, > > i have a file: > > > A_16_P21360207#304 > > A_14_P136880#783 > > A_16_P21360209#795 > > A_16_P21360210#173 > > A_16_P03641959#1177 > > A_16_P0

Re: Assertion for python scripts

2007-11-02 Thread matthias
On Nov 2, 1:29 pm, "Bart." <[EMAIL PROTECTED]> wrote: > Friday 02 of November 2007 20:53:12 matthias napisa (a): > > > > > On Nov 2, 12:12 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote: > > > On 11/2/07, matthias <[EMAIL PROTECTED

Re: Assertion for python scripts

2007-11-02 Thread matthias
On Nov 2, 12:12 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote: > On 11/2/07, matthias <[EMAIL PROTECTED]> wrote: > > > > > Howdy ! > > > I started using the assert() stmt and found it quite useful :-) I > > have only one problem: I don'

Assertion for python scripts

2007-11-02 Thread matthias
release builds that allow me to switch debug stmts, like assert, on / off ? Thanx, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Cantankerous trolliness ad infinitum, was: Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-10 Thread Matthias Buelow
[EMAIL PROTECTED] wrote: ^ Is this some sport of yours to constantly create new gmail accounts and spam Usenet? > So you assert, but "man" bears a much closer resemblance to "manus" > than it does to "mens". This is irrelevant. Consult an etymological dictionary. F'up-to: c

Re: The fundamental concept of continuations

2007-10-09 Thread Matthias Blume
[EMAIL PROTECTED] writes: > Matthias, thanks for the reference, but I dont have access to an > engineering library. I would appreciate, if you have access to paper/ > scanner or electronic copy to help many of us out, you are > not just helping me but many will thank you. Given that

Re: The fundamental concept of continuations

2007-10-09 Thread Matthias Blume
ctions" paper. (It has been re-published in 1998 in HOSC.) The paper also explains how to perform defunctionalization, which can be seen as a way to compile (and even hand-compile) higher-order programs. Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: The fundamental concept of continuations

2007-10-09 Thread Matthias Benkard
ython syntax, there's http://www.ps.uni-sb.de/~duchier/python/continuations.html -- and even if you aren't, you may want to have a look at it, as simple Python code is ridiculously easy to read. ~ Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-30 Thread Matthias Benkard
is a political one. How does that make any sense? ~ Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-23 Thread Matthias Buelow
In comp.lang.lisp Bikal KC <[EMAIL PROTECTED]> wrote: > I used usenet years ago then stopped for couple of years. I remember > seeing him/her on c.l.perl I believe doing the same thing he/she is > doing atm. I'd say the ultimate usenet superstar. Wow! I think it's some (probably mild) form of aut

Re: Using eggs or py2exe to distribute apps

2007-07-20 Thread Matthias Vodel
Hey, Use pyInstaller ;) http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi Easier to use in comparison to py2exe ... very good tool - try it! Bye, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-07-08 Thread Matthias Buelow
Twisted wrote: > I, for one, have a strong preference for interfaces that let me see > what the hell I'm doing and make it easy to find commands, navigate > the interface, navigate the help, and so forth, while making me resort > to reaching for that help as infrequently as reasonably achievable.

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Matthias Buelow
Bjorn Borud wrote: > I was told by a lot of people I consider to be intelligent that this > book would change how I think about writing software. it didn't. I > didn't really know what to expect, but after reading it I did feel > that its importance was greatly exaggerated. I think it's basical

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Matthias Buelow
Twisted wrote: [...] Hey dude, get back to selling used cars and leave us computer geeks alone, will ya? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-23 Thread Matthias Buelow
Tim Roberts wrote: > Editors are like underwear. We each have our own favorite brand, and > nothing you say will convince me to change mine. You really should have stopped here :) -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs

2007-06-22 Thread Matthias Buelow
Twisted wrote: > I find these anecdotes liberally sprinkled into this thread frankly > unbelievable. If you'd spent as much time learning the software as you're ranting about it, you could actually use it _and_ would get the additional benefit of having avoided making a fool of yourself on Usenet

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Matthias Buelow
Kaldrenon wrote: > I don't think anyone can make the argument that any (past or current) > graphics-based editor is as efficient when being used to its fullest > as a text-based editor. Actually, I think the argument can be made: ``We’ve done a cool $50 million of R & D on the Apple Human Inter

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-20 Thread Matthias Buelow
Twisted wrote: > Emacs does have documentation. The problem is you have to already know > a load of emacs navigation oddities^Wkeyboard commands to get to and > use it. Yes, like hitting the F1 key. > Yeah, and I abhor the elitist systems that are designed with the > philosophy that anyone who h

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-20 Thread Matthias Buelow
Twisted wrote: > That's a joke, right? I tried it a time or two. Every time it was > rapidly apparent that doing anything non-trivial would require > consulting a cheat sheet. The printed-out kind, since navigating to > the help and back without already having the help displayed and open > to the

Re: The Modernization of Emacs

2007-06-19 Thread Matthias Buelow
David Kastrup wrote: > My favorite killing offence is /* vi:set ts=4: */. This is apparently the default setting in many of the so-called "IDE"s today.. I think it's another unwelcome poison gift from the ignorant M$FT world (I suspect some primitive Windoze IDE which couldn't differentiate betwe

Re: Is numeric keys of Python's dictionary automatically sorted?

2007-03-08 Thread Matthias Julius
e keys themselves are ordered in the > dictionary. > > part of my code is like this: > radix={} > for i in range(256): > radix[i]=[] I wonder why nobody has suggested the use of a list: redix = [[] for i in range(256)] Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Read Bytes from a file

2007-03-06 Thread Matthias Julius
>> lambda, which I doubt. I suspect it actually might be slower. > > Dictionary access is highly optimized in Python. In fact, using a > precomputed dictionary is about 12 times faster: Why using a dictionary and not a list? Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe, library.zip and python.exe

2007-02-28 Thread Matthias Vodel
Hey, [Offtopic:] Use PyInstaller...very easy to use - better than py2exe!! see here: http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi Bye, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: Change coords of a canvas.line item

2007-01-05 Thread Matthias Vodel
Very nice :) Thank you, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Change coords of a canvas.line item

2007-01-05 Thread Matthias Vodel
Hi all, I want to change the beginning/end-coordinates of a canvas.line item. Something like: self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new)) I don't want to delete and repaint a new line item. Is this possible? Thanks Matthias -- http://mail.pytho

Simple question to split

2006-11-09 Thread Matthias Winterland
Hi, I have a simple question. When I read in a string like: a='1,2,3,4,5 6 7,3,4', can I get the list l=[1,2,3,4,5,6,7,3,4] with a single split-call? Thx, Matthias -- http://mail.python.org/mailman/listinfo/python-list

yEnc

2006-08-15 Thread Kairo Matthias
How can i encode with yEnc? -- http://mail.python.org/mailman/listinfo/python-list

Re: languages with full unicode support

2006-07-02 Thread Matthias Blume
this. Stay alive! >> And the Japanese might beat him up, too. For butchering their >> language. :-) > > OK, back to ISO-8859-1 :) no one needs so much symbols, > this is enough: äöüÄÖÜß :) There are plenty of people who need such symbols (more people than those who need ß, btw). Matthias PS: It should have been こんにちは. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Matthias Blume
"Marshall" <[EMAIL PROTECTED]> writes: > Matthias Blume wrote: >> >> How does this "create" such a problem? The problem is there in either >> approach. In fact, I believe that the best chance we have of >> addressing the problem is by

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Matthias Blume
Pascal Costanza <[EMAIL PROTECTED]> writes: >> And I am convinced that updating a running system in the style of, >> e.g., Erlang, can be statically typed. > > Maybe. The interesting question then is whether you can express the > kinds of dynamic updates that are relevant in practice. Because a >

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Matthias Blume
Pascal Costanza <[EMAIL PROTECTED]> writes: > Whether you consider something you cannot do with statically typed > languages a bad idea or not is irrelevant. You were asking for things > that you cannot do with statically typed languages. The whole point of static type systems is to make sure tha

Re: languages with full unicode support

2006-06-27 Thread Matthias Blume
Tin Gherdanarra <[EMAIL PROTECTED]> writes: > Oliver Bandel wrote: >> こんいちわ Xah-Lee san ;-) > > Uhm, I'd guess that Xah is Chinese. Be careful > with such things in real life; Koreans might > beat you up for this. Stay alive! And the Japanese might beat him up, too. For butchering their language

Re: What is Expressiveness in a Computer Language [off-topic]

2006-06-26 Thread Matthias Blume
David Hopwood <[EMAIL PROTECTED]> writes: > Matthias Blume wrote: >> I agree with Bob Harper about safety being language-specific and all >> that. But, with all due respect, I think his characterization of C is >> not accurate. > [...] >> AFAIC, C is C-u

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Matthias Blume
27;t really blame the compiler if the program does not print 0, or if it even crashes. AFAIC, C is C-unsafe by Bob's reasoning. --- Of course, C can be made safe quite easily: Define a state "undefined" that is considered "safe" and add a transition to "undefined" wherever necessary. Kind regards, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: Saying "latently-typed language" is making a category mistake

2006-06-24 Thread Matthias Blume
David Hopwood <[EMAIL PROTECTED]> writes: > Patricia Shanahan wrote: >> Vesa Karvonen wrote: >> ... >> >>> An example of a form of informal reasoning that (practically) every >>> programmer does daily is termination analysis. There are type systems >>> that guarantee termination, but I think tha

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Matthias Blume
Pascal Costanza <[EMAIL PROTECTED]> writes: > Matthias Blume wrote: >> Pascal Costanza <[EMAIL PROTECTED]> writes: >> >>> Patricia Shanahan wrote: >>>> Vesa Karvonen wrote: >>>> ... >>>>> An example of a form of

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Matthias Blume
Pascal Costanza <[EMAIL PROTECTED]> writes: > Patricia Shanahan wrote: >> Vesa Karvonen wrote: >> ... >>> An example of a form of informal reasoning that (practically) every >>> programmer does daily is termination analysis. There are type systems >>> that guarantee termination, but I think that

Re: What is Expressiveness in a Computer Language

2006-06-22 Thread Matthias Blume
Pascal Bourguignon <[EMAIL PROTECTED]> writes: > Matthias Blume <[EMAIL PROTECTED]> writes: > >> Pascal Bourguignon <[EMAIL PROTECTED]> writes: >> >>> Moreover, a good proportion of the program and a good number of >>> algorithms don't ev

Re: What is a type error?

2006-06-22 Thread Matthias Blume
Pascal Costanza <[EMAIL PROTECTED]> writes: > Chris Smith wrote: > >> While this effort to salvage the term "type error" in dynamic >> languages is interesting, I fear it will fail. Either we'll all >> have to admit that "type" in the dynamic sense is a psychological >> concept with no precise te

Re: What is Expressiveness in a Computer Language

2006-06-22 Thread Matthias Blume
Pascal Bourguignon <[EMAIL PROTECTED]> writes: > Moreover, a good proportion of the program and a good number of > algorithms don't even need to know the type of the objects they > manipulate. > > For example, sort doesn't need to know what type the objects it sorts > are. It only needs to be giv

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Matthias Blume
Darren New <[EMAIL PROTECTED]> writes: > [ ... ] As far as I know, LOTOS is the only > language that *actually* uses abstract data types - you have to use > the equivalent of #include to bring in the integers, for > example. Everything else uses informal rules to say how types work. There are *to

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Matthias Blume
"Marshall" <[EMAIL PROTECTED]> writes: > Torben Ægidius Mogensen wrote: >> >> That's not true. ML has variables in the mathematical sense of >> variables -- symbols that can be associated with different values at >> different times. What it doesn't have is mutable variables (though it >> can get

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Matthias Blume
"Rob Thorpe" <[EMAIL PROTECTED]> writes: >> >> > No it doesn't. Casting reinterprets a value of one type as a value of >> >> > another type. >> >> > There is a difference. If I cast an unsigned integer 20 to a >> >> > signed integer in C on the machine I'm using then the result I will get

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Matthias Blume
Joachim Durchholz <[EMAIL PROTECTED]> writes: > Matthias Blume schrieb: >> Joachim Durchholz <[EMAIL PROTECTED]> writes: >> >>> Matthias Blume schrieb: >>>> Perhaps better: A language is statically typed if its definition >>>> includes

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Matthias Blume
"Rob Thorpe" <[EMAIL PROTECTED]> writes: > Matthias Blume wrote: >> "Rob Thorpe" <[EMAIL PROTECTED]> writes: >> >> > I think we're discussing this at cross-purposes. In a language like C >> > or another statically typed lan

  1   2   >