looking for a pattern to code logic shared by gui/cli

2009-04-16 Thread Andreas Balogh
thought it'd be to lengthy to have a functioning sample, especially for the gui. -- Andreas Balogh baloand (at) gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-16 Thread Andreas Otto
but got the following error > cat setup.py from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("pymsgque", ["helloworld.pyx"

howto submit documentation bugs on python V3 web-site ?

2009-04-16 Thread Andreas Otto
Hi, is an email or something else available ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-17 Thread Andreas Otto
alex23 wrote: > On Apr 17, 4:22 pm, Andreas Otto wrote: >> Question 1: Why you wall it "Pyrex" package ? > > From the first paragraph on the Cython site: "Cython is based on the > well-known Pyrex, but supports more cutting edge functionality and > opti

Re: Question to python C API

2009-04-17 Thread Andreas Otto
Andreas Otto wrote: > alex23 wrote: >> Did you unpack the Cython archive correctly? Is there a Shadow.py in >> your src/Cython-0.11.1/Cython/ folder? > > yes dev1...@linux02:~/ext/x86_64-suse-linux/thread/bin/Cython-0.11.1> ls -al Cython/Shadow.py -rw-r--r-- 1 dev1usr

best "void" return of a member function

2009-04-20 Thread Andreas Otto
se NULL is returned in the case of an "error" mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: best "void" return of a member function

2009-04-20 Thread Andreas Otto
Andreas Otto wrote: well propable found the answer by my own ... Py_RETURN_NONE should be the best -- http://mail.python.org/mailman/listinfo/python-list

Re: best "void" return of a member function

2009-04-20 Thread Andreas Otto
Stefan Behnel wrote: > Andreas Otto writes: >> I'm writing a native language binding for a library. >> >> http://libmsgque.sourceforge.net/ >> >> Every native method called by PYTHON have to return >> a PyObject* even if the f

Re: best "void" return of a member function

2009-04-20 Thread Andreas Otto
Propable you can help me with an other problem ... the following code crash with: ==31431== Process terminating with default action of signal 11 (SIGSEGV) ==31431== General Protection Fault ==31431==at 0x4EA5151: PyObject_GenericGetAttr (object.c:982) ==31431==by 0x4EF1FBD: PyEval_EvalF

who is calling the base class __new__ method

2009-04-21 Thread Andreas Otto
te instances of such subclasses without getting a TypeError.) This I don't understand because the "tp_base" of "MqS" is "Object" and if I call the "Object" tp_new from my new static PyObject * PyMqS_new(PyTypeObject *type, PyObject *args, PyObject

Re: who is calling the base class __new__ method

2009-04-21 Thread Andreas Otto
Hi, found a solution - "PyObject_GC_New" seems not to be *not* the right function to create a new Python object with a base class included - "PyType_GenericNew" is the right one ... but this one is not documented from: http://docs.python.org/3.0/c-api/type.html

Re: python setup ?

2009-04-28 Thread Andreas Röhler
environments, learning and lifting from each other, enabling distributions to select and pull for delivering. So far Andreas -- http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/ https://code.launchpad.net/s-x-emacs-werkstatt/ -- http://mail.python.org/mailman/listinfo/python-list

Nimrod programming language

2009-05-09 Thread Andreas Rumpf
Dear Python-users, I invented a new programming language called "Nimrod" that combines Python's readability with C's performance. Please check it out: http://force7.de/nimrod/ Any feedback is appreciated. Regards, Andreas Rumpf _

ANNOUNCE: libmsgque 3.1

2009-05-12 Thread Andreas Otto
mentation Entire new documentation and examples were added The Web-Site was updated: = -> http://libmsgque.sourceforge.net For a fast introduction use the following URL: -> http://libmsgque.sourceforge.net/features.htm mfg Andreas Otto -- http://mail.pyt

RE: Printing a hex character and prefixing it correctly

2009-05-15 Thread Andreas Tawn
> If I have an integer k, for instance; > > k = 32 // BASE 10 > > How do I get print to print it out in HEX and PREFIXED with 0x? What > is the PROPER WAY? > > This does not work: > > print "This is hex 32: ", int(k, 16) > > Xav k = 32 print "This is hex 32: ", hex(k) Cheers, Drea -- ht

PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
on and the pymsgque extension was done using > Microsoft Visual C++ Express Edition it seems that I missing something mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
MRAB wrote: > Andreas Otto wrote: >> Hi, >> >> I have the following problem using python on windows. >> I crated a binary extension called >> >> pymsgque.dll >> >> on windows. The same extension works fine on UNIX/Linux. >>

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
system-depend -> question: how I get an unique system independent name or just in general how I solve this kind of problem 3. why is no ".pyd" file created ? -> pyd is the extension name supported mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
was not found or could a found module not be loaded mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
Hi, I setup the PYTHONPATH environment variable too does windows use this variable ? mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-21 Thread Andreas Otto
Hi, I solved the problem ... thank you for your help mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: libmsgque 3.2

2009-05-21 Thread Andreas Otto
wile I'm now able to support python on windows The Web-Site was updated: =    -> http://libmsgque.sourceforge.net   For a fast introduction use the following URL:    -> http://libmsgque.sourceforge.net/features.htm mfg   Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

RE: While Statement

2009-05-22 Thread Andreas Tawn
> Im using 2.6 python and when running this > > class progess(): > > def __init__(self, number, total, char): > > percentage = float(number/total*100) > percentage = int(round(percentage)) > char = char * percentage > print char > > progess(1

print stream behavior

2009-05-27 Thread Andreas Kraemer
some light on what's happening under the hood (or how to make it work with "print")? Thanks, Andreas Python 2.4.2 (#1, Jan 10 2008, 17:43:47) [GCC 4.1.2 20070115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "lice

Re: print stream behavior

2009-05-27 Thread Andreas Kraemer
On May 27, 10:52 am, Peter Otten <__pete...@web.de> wrote: > This is a longstanding quirk of the CPython implementation. The > PRINT_ITEM_TO opcode triggers a PyFile_WriteObject() call which in turn does > the C equivalent of > > if isinstance(f, file): >    file.write(f, s) > else: >    write = ge

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
python mode to work for Windows A bug-report would be fine... :) In case you use python-mode.el, please refer to https://launchpad.net/python-mode Thanks Andreas Röhler -- https://code.launchpad.net/s-x-emacs-werkstatt/ > (do most of my work under Linux anyway), but other than that I

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
Rhodri James wrote: > On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: > >> My pet peeve is syntax-aware editors which get things wrong. For >> example, >> the version of emacs I'm using now doesn't parse this properly: >> >> '''A triple-quoted string. Some editors won't get this right''' >

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
Rhodri James wrote: > On Wed, 27 May 2009 16:56:12 +0100, Bruno Desthuilliers > wrote: > >> Rhodri James a écrit : >>> On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: >>> My pet peeve is syntax-aware editors which get things wrong. For example, the version of emacs I'm using

RE: file open/read/name etc, not working

2008-05-15 Thread Andreas Tawn
>import os > >print os.path.exists('C:/Python25/myPrograms/netflix/test.txt') >d=open('C:/Python25/myPrograms/netflix/flim.txt', 'r') >d.readline() > >returns true in the shell but prints no text even though the document >contains text. > >d.name returns nothing, d.name() raises an error. >-- >http

RE: exists=false, but no complaint when i open it!?

2008-05-15 Thread Andreas Tawn
>print os.path.exists('C:\Users\saftarn\Desktop\NetFlixDataSet >\training_set') returns False... > >i have thourogly checked the filename to be correct and if we assume >it is what could this mean then? >i had a problem one other time when i had renamed a file but windows >didnt rename it compeltel

Overloading __getitem__

2008-05-22 Thread Andreas Matthias
;] = 123 print foo['a'] print foo['a', crazy = True] Is it somehow possible to overload __getitem__ with an additional argument? Are there other possibilities to achiev this? Or is the only solution to this to write a normal function call `def my_get (self, key, cr

Re: Overloading __getitem__

2008-05-22 Thread Andreas Matthias
t; > and then in your dict class: > > def __getitem__(*args): Apparently, args already is a tuple, so this should be: def __getitem__(self, args): Is this documented somewhere? I couldn't find it anywhere. Thanks. Ciao Andreas -- http://mail.python.org/mailman/listinfo/python-list

RE: boolian logic

2008-06-13 Thread Andreas Tawn
if a != b and a != c and a != d: doStuff() else: doOtherStuff() Cheers, Drea >HI all, I'm a bit stuck with how to work out boolian logic. > >I'd like to say if A is not equal to B, C or D: > do something. > >I've tried > >if not var == A or B or C: >and various permutations bu

RE: isPrime works but UnBoundLocalError when mapping on list

2008-07-15 Thread Andreas Tawn
>defn noob wrote: >> isPrime works when just calling a nbr but not when iterating on a >> list, why? adding x=1 makes it work though but why do I have to add >> it? >> Is there a cleaner way to do it? >> >> >> def isPrime(nbr): >> for x in range(2, nbr + 1): >> if nbr % x == 0: >>

RE: isPrime works but UnBoundLocalError when mapping on list

2008-07-16 Thread Andreas Tawn
Terry Reedy wrote: >Wrong. Thank you. >For loop variables continue after the loop exits. This is >intentional. I never knew that and I can't find reference to it in the docs. Can you help me with the reasons for it? Drea -- http://mail.python.org/mailman/listinfo/python-list

RE: isPrime works but UnBoundLocalError when mapping on list

2008-07-16 Thread Andreas Tawn
> Andreas Tawn wrote: > > Terry Reedy wrote: > >> Wrong. > > Thank you. > > > >> For loop variables continue after the loop exits. This is > >> intentional. > > I never knew that and I can't find reference to it in the docs. >

sip.so: undefined symbol: PyUnicodeUCS4_AsWideChar

2008-08-04 Thread Andreas Hinzmann
-3.17.4 QScintilla-1.71-gpl-1.7.1 I have also tried to configure python with --enable-unicode=ucs4, but it didn't help. Does anybody have an idea, what is the problem? Is it a conflict between different versions? Thank you in advance, Andreas -- http://mail.python.org/mailman/lis

RE: Unable to lookup keys in dictionary

2008-08-12 Thread Andreas Tawn
>I am trying to run p4python API on top of python 2.5.2 and am extracting a dictionary from perforce. The following code returns the output that follows it: > > from P4 import P4, P4Exception > p4 = P4() > p4.port = "erased" #deleted > p4.us

Tremendous slowdown due to garbage collection

2008-04-12 Thread andreas . eisele
he disadvantages of such a setting would be apparent. Thanks a lot for your consideration, and best regards, Andreas -- Dr. Andreas Eisele,Senior Researcher DFKI GmbH, Language Technology Lab, [EMAIL PROTECTED] Saarland UniversityComputational Linguistics Stuhlsat

Re: Tremendous slowdown due to garbage collection

2008-04-12 Thread andreas . eisele
n do it in only a few lines of code, which is even cooler. Any approach that would touch the disk would be too slow for me, and bringing in complicated datastructures by myself would distract me too much from what I need to do. That's exactly why I use Python; it has lots of highly fine-tu

Re: Tremendous slowdown due to garbage collection

2008-04-12 Thread andreas . eisele
Sorry, I have to correct my last posting again: > > Disabling the gc may not be a good idea in a real application; I suggest > > you to play with the gc.set_threshold function and set larger values, at > > least while building the dictionary. (700, 1000, 10) seems to yield good > > results. > > py

Re: Tremendous slowdown due to garbage collection

2008-04-12 Thread andreas . eisele
for large ranges of more than a > thousand items. xrange() should be faster and it will definitely use > much less memory - and memory Python 2.5 and older will never release > again. I'm going to fix the issue for Python 2.6 and 3.0. > Thanks for this hint, and for the wor

String/Number Conversion

2008-09-06 Thread Andreas Hofmann
Hello Folks! I've got a little problem here, which which really creeps me out at the moment. I've got some strings, which only contain numbers plus eventually one character as si-postfix (k for kilo, m for mega, g for giga). I'm trying to convert those strings to integers, with this function:

Re: String/Number Conversion

2008-09-06 Thread Andreas Hofmann
Thanks a lot, I got it working now. Thanks also to the other guys, your numerous hints were really valuable! Kind regards, Andy John Machin schrieb: On Sep 7, 7:04 am, Andreas Hofmann <[EMAIL PROTECTED]> wrote: Hello Folks! I've got a little problem here, which which really creep

RE: Extracting hte font name from a TrueType font file

2008-09-18 Thread Andreas Tawn
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] g] On Behalf Of Steve Holden > Sent: Thursday, September 18, 2008 5:59 PM > To: python-list@python.org > Subject: Extracting hte font name from a TrueType font file > > Does anyone have a Python recipe for this? >

asynchat - operation could not complete w/ blocking

2006-03-07 Thread Andreas R.
ks for the help I've received with asynchat so far in this news group. - Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: asynchat - operation could not complete w/ blocking

2006-03-07 Thread Andreas R.
Fredrik Lundh wrote: > "Andreas R." wrote: > >> I'm using Python's asynchat module for networking. >> When calling the sendall() method of asynchat, >> I sometimes get the error message "the operation >> could not complete without bloc

Re: asynchat - operation could not complete w/ blocking

2006-03-08 Thread Andreas R.
Fredrik Lundh wrote: > "Andreas R." wrote: > >> I'm using Python's asynchat module for networking. >> When calling the sendall() method of asynchat, >> I sometimes get the error message "the operation >> could not complete without bloc

Re: asynchat - operation could not complete w/ blocking

2006-03-08 Thread Andreas R.
Dennis Lee Bieber wrote: > On Wed, 08 Mar 2006 08:57:53 +0100, "Andreas R." > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > > >> The problem I was having with push, is that is does not always send >> complete packages. &g

XML international characters

2006-03-10 Thread Andreas R.
t any luck so far. Thanks in advance, Andreas www.openrts.org - Python RTS game -- http://mail.python.org/mailman/listinfo/python-list

RE: From Python to c++

2006-03-22 Thread Ames Andreas
std::string, int, bool > > parsed; if your predetermined types are string, int, bool. For more info, see http://www.boost.org/. HTH, aa -- Andreas Ames | Programmer | Comergo GmbH | Voice: +49 69 7505 3213 | ames AT avaya . com -- http://mail.python.org/mailman/listinfo/python-list

Performance profiling Python code

2006-03-24 Thread Andreas Røsdal
ble to spot any solutions to improving the performance of the methods which I've indentified as bottlenecks here? Thanks in advance! Andreas R. The source code of the main faile is here: http://svn.gna.org/viewcvs/openrts/trunk/openrts/common/map.py?rev=89&view=markup Profiling output is h

SimpleXMLRPCServer

2006-03-30 Thread Andreas R.
tact all the clients? Thanks in advance. - Andreas R. www.openrts.org - Open Source RTS game -- http://mail.python.org/mailman/listinfo/python-list

How to get pyMinGW?

2006-04-04 Thread Ames Andreas
Hi all, the download link on http://jove.prohosting.com/iwave/ipython/pyMinGW.html seems to be broken. Can anybody provide another link? Is there a current version for python 2.4.3 available? TIA, aa -- Andreas Ames | Programmer | Comergo GmbH | Voice: +49 69 7505 3213 | ames AT avaya

[ANNOUNCE] OpenRTS 0.2b2 released

2006-04-06 Thread Andreas R.
OpenRTS is a cross-platform open source real-time strategy game developed in Python. Now version 0.2b2 has been released. The new release uses the Twisted networking library for multi-player games, and has graphics from the Hard Vacuum project. The game can be downloaded from http://www.openrts

wxPython - antialiased drawing

2006-04-15 Thread Andreas Ennemoser
Hello, can anybody tell me if and how I do antialiased drawing in wxPython. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: Are routine objects guaranteed mutable & with dictionary?

2009-12-05 Thread Andreas Waldenburger
On Sat, 05 Dec 2009 11:26:34 +0100 "Alf P. Steinbach" wrote: >* "function" is misleading in itself (due to the hijacking of this > term in mathematics), [...] Can you please elaborate? To me, a function is something that transforms some input to some output [1]. Which is exactly what Python

Re: How to create a docstring for a module?

2009-12-06 Thread Andreas Waldenburger
On Sat, 5 Dec 2009 23:04:42 -0800 (PST) "Dr. Phillip M. Feldman" wrote: > > If I create a module xyz.py with a docstring """xyz does everything > you could possibly want.""" at the top, the command ?xyz issued at > the IPython prompt does not display this docstring. What am I doing > wrong? St

Re: In lista infinita?

2009-12-08 Thread Andreas Waldenburger
On Tue, 08 Dec 2009 17:39:13 +0100 andrea wrote: > Ho notato che i generatori anche se infiniti non si lamentano se usati > in modo potenzialmente "pericoloso". > [...] > Altri miglioramenti/utilizzi trasversali? Maybe. But I'm sure it.comp.lang.python might help you better. And from the looks o

Re: insert unique data in a list

2009-12-13 Thread Andreas Waldenburger
On 13 Dec 2009 17:57:47 GMT mattia wrote: > Using set does'n work (i.e. the python interpreter tells me: > TypeError: unhashable type: 'list')... Convert the lists to tuples before adding them. Tuples are hashable. /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/python-list

Multithreaded python program freezes

2009-12-20 Thread Andreas Røsdal
ckets containing C struct data to JSON over HTTP. Any advice on why this Python program appears to freeze? Is there anything more I can do to find out why this problem occurs? Andreas R -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: libmsgque-4.1, PLMK-1.2, NHI1-0.3

2009-12-23 Thread Andreas Otto
> http://nhi1.berlios.de/ DOWNLOAD: > http://developer.berlios.de/projects/nhi1/ mfg Andreas Otto (aotto1968) -- http://mail.python.org/mailman/listinfo/python-list

Re: multivariable assignment

2009-12-31 Thread Andreas Waldenburger
On Thu, 31 Dec 2009 08:13:35 -0800 (PST) davidj411 wrote: > I am not sure why this behavior is this way. > at beginning of script, i want to create a bunch of empty lists and > use each one for its own purpose. > however, updating one list seems to update the others. > > >>> a = b = c = [] No, y

Re: Exception as the primary error handling mechanism?

2010-01-01 Thread Andreas Waldenburger
On Fri, 01 Jan 2010 11:34:19 +0100 "Martin v. Loewis" wrote: > Your observation is not wrong, but, as Benjamin already explained, > you are misinterpreting Michi Henning's statement. He doesn't condemn > exception handling per se, but only for the handling of *expected* > outcomes. He would consi

RE: Sleep timer but still responsive?

2010-01-29 Thread Andreas Tawn
> On Jan 28, 4:55 pm, "Gabriel Genellina" > wrote: > > Please provide more details. What do you want your program to do > while > > sleeping? What kind of actions do you want a response to? > > Do you have a GUI? A curses-based interfase? > > > > -- > > Gabriel Genellina > > My app is purely cons

accessing dictionary keys

2009-10-01 Thread Andreas Balogh
def __init__(self, **kwds): self.__dict__.update(kwds) and do it like this: points.append(Bunch(x=4, y=5)) print points[-1].x, points[-1].y With the bunch at least all the quotes go away. Is there any shortcut which allows to use point.x with a dictionary, or defining keys with tuples and

which "dictionary with attribute-style access"?

2009-10-12 Thread Andreas Balogh
orage(dict) I enclosed the three implementations below. My question to the Python specialists: which one is the most correct? Are there restrictions with regards to pickling or copy()? Which one should I choose? Regards, Andreas -- Andreas Balogh baloand (at)

ANNOUNCE: libmsgque 3.6 with perl support

2009-10-19 Thread Andreas Otto
Dear Users, = ?? I would like to announce libmsgque 3.6 and PLMK 1.1 ?? libmsgque is an infrastructure to write programming language ?? independent software using the : ?? ?? > Programming Language Micro Kernel ?? architecture. Never was it so easy to write an application server ?? by

Re: which "dictionary with attribute-style access"?

2009-10-21 Thread Andreas Balogh
def fromkeys(self, seq, value = None): return AttrDict(dict.fromkeys(seq, value)) -- Andreas Balogh baloand (at) gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: which "dictionary with attribute-style access"?

2009-10-24 Thread Andreas Balogh
sions with existing method names: 1. (easy, reduced functionality) override __setattr__ and __init__, test for keys matching existing method names, throw an exception if exists (KeyError). 2. (complex, emulates dict) override __setattr__ and __init__, test for keys matching existing method names, and s

YIELD_VALUE Byte Code

2009-11-17 Thread Andreas Löscher
e has changed, why is this reached by using another function? Such thing should be done in the OpCode. (e.a.: instead of retval = POP() --> retval = TOP(); Py_INCREF(retval); ) I am a little confused about this. Be

Re: Unexpected python exception

2009-11-17 Thread Andreas Löscher
exception is thrown. Best, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected python exception

2009-11-17 Thread Andreas Löscher
Python searches for Variables not only in local or global scoop but also in __builtins__. If you do something like __builtins__.os = os, than this variable should be accessible global. If you then write something like: def B(): os.stat("/") import os Python recognises on compile

Re: Python and Ruby

2010-02-10 Thread Andreas Waldenburger
On Wed, 10 Feb 2010 09:51:11 -0500 Steve Holden wrote: > [snip] > It's as sensible to complain about people being "*forced* to keep > perfect indentation" as it is to complain about people being *forced* > to use braces to delimit code blocks. > > This is called "syntax", and it's a part of the

Docstrings considered too complicated

2010-02-24 Thread Andreas Waldenburger
Hi all, a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and it basically looks like this: """Function that does stuff""" def doStuff(): while not wise(up): yield scorn Now my question is this: How do I kill these people

Re: Docstrings considered too complicated

2010-02-26 Thread Andreas Waldenburger
On Thu, 25 Feb 2010 12:51:00 -0800 (PST) John Roth wrote: > On Feb 24, 1:23 pm, Andreas Waldenburger > wrote: > > a company that works with my company writes a lot of of their code > > in Python (lucky jerks). I've seen their code and it basically > > looks like t

Re: Docstrings considered too complicated

2010-02-26 Thread Andreas Waldenburger
On Fri, 26 Feb 2010 15:50:25 +0100 Jean-Michel Pichavant wrote: > Andreas Waldenburger wrote: > > > And they use mixedCase function/method names. > > > and ? whatIsTheProblem ? Thanks for proving my point. ;) No seriously though: Let it go. I wasn't being serious.

Re: Docstrings considered too complicated

2010-02-26 Thread Andreas Waldenburger
On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk wrote: > On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: > > [stuff] > > Reminiscent of: > > mov AX,BX ; Move the contents of BX into AX > Well, there might be some confusion there as to what gets moved

Re: Variable definition

2010-02-27 Thread Andreas Waldenburger
On 27 Feb 2010 03:33:57 GMT Steven D'Aprano wrote: > exec "'myPrefix_turquoise' = 42" > Not quite: In [1]: exec "'myPrefix_turquoise' = 42" File "", line 1 SyntaxError: can't assign to literal (, line 1) I think you meant: exec

Re: Docstrings considered too complicated

2010-02-27 Thread Andreas Waldenburger
On Sat, 27 Feb 2010 07:29:46 -0800 (PST) John Pinner wrote: > A good way to control Python contractors is (given that firstly there > are functional specifications to comply with, and tests to pass) is to > impose the following condition: > > that all code delivered must reach a score of (say) 9

Re: Docstrings considered too complicated

2010-03-01 Thread Andreas Waldenburger
On Mon, 1 Mar 2010 05:01:49 -0800 (PST) alex23 wrote: > Andreas Waldenburger wrote: > > But as I said: a) I am (we are) not in a position to impose this (We > > don't work with the code, we just run the software). > > I personally believe that the end users ha

Re: Docstrings considered too complicated

2010-03-01 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 03:18:30 +1100 Lie Ryan wrote: > On 03/02/10 00:09, Andreas Waldenburger wrote: > > On Mon, 1 Mar 2010 05:01:49 -0800 (PST) alex23 > > wrote: > > > >> Andreas Waldenburger wrote: > >>> But as I said: a) I am (we are) not in a po

Re: Docstrings considered too complicated

2010-03-01 Thread Andreas Waldenburger
On Mon, 01 Mar 2010 11:42:16 -0600 Robert Kern wrote: > On 2010-03-01 11:22 , Andreas Waldenburger wrote: > > > Back in the software world: Those guys write code that works. It > > does what it's supposed to do. Why should we care where they put > > their comments

Re: Docstrings considered too complicated

2010-03-01 Thread Andreas Waldenburger
On Mon, 01 Mar 2010 18:42:17 +0100 Jean-Michel Pichavant wrote: > Andreas Waldenburger wrote: > [snip] > > Back in the software world: Those guys write code that works. It > > does what it's supposed to do. Why should we care where they put > > their comments? >

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Mon, 01 Mar 2010 21:09:39 + Mark Lawrence wrote: > Andreas Waldenburger wrote: > > [snip] > > We did not buy code. If it were written in C or such, we would never > > get to see it. > > > > It's not our concern. > > > > /W > > >

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 09:48:47 +1100 Ben Finney wrote: > > It's not our concern. > > Then I don't see what that problem is. There is none. I was griping about how stupid they are. That is a personal problem I have with their *code* (not software), and I thought I'd just share my superiority com

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 19:05:25 +0100 Jean-Michel Pichavant wrote: > Andreas Waldenburger wrote: > > > > I had hoped that everyone just read it, went like "Oh geez.", > > smiled it off with a hint of lesson learned and got back to > > whatever it was they were

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Wed, 03 Mar 2010 08:22:40 +1100 Ben Finney wrote: > Andreas Waldenburger writes: > > > Don't get me wrong; our whole system is more fragile than I find > > comfortable. But I guess getting 10ish different parties around the > > globe to work in complete un

Re: Docstrings considered too complicated

2010-03-03 Thread Andreas Waldenburger
On Wed, 03 Mar 2010 22:19:04 +0100 mk wrote: > For the uncouth yobs, err, culturally-challenged: > > http://www.youtube.com/watch?v=Xe1a1wHxTyo > > (Four Yorkshiremen) > http://www.youtube.com/watch?v=-eDaSvRO9xA That's the definitive version. I mean, if you're going to talk vintage, talk vi

Re: best practices: is collections.defaultdict my friend or not?

2010-03-05 Thread Andreas Waldenburger
On Fri, 5 Mar 2010 17:22:14 -0800 (PST) Pete Emerson wrote: > I've been wrestling with dicts. I hope at the very least what I > discovered helps someone else out, but I'm interested in hearing from > more learned python users. > > I found out that adding a two dimensional element without definin

Re: best practices: is collections.defaultdict my friend or not?

2010-03-05 Thread Andreas Waldenburger
On Fri, 5 Mar 2010 17:22:14 -0800 (PST) Pete Emerson wrote: > [snip] > >>> data['one'] = {} > >>> data['one']['two'] = 'three' > >>> print data > {'one': {'two': 'three'}} > > And through some research, I discovered collections.defaultdict (new > in Python 2.5, FWIW): > > >>> import collections

Re: a simple def how-to

2010-03-07 Thread Andreas Waldenburger
On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler wrote: > Hello, > > My script starts like this: > > book=readFromExcelRange('book') > house=readFromExcelRange('house') > table=readFromExcelRange('table') > read=readFromExcelRange('read') > ... > > But I would like to have something equivalent,

ANNOUNCE: Major Feature Release - NHI1-0.7, PLMK-1.6 and libmsgque-4.5

2010-03-08 Thread Andreas Otto
ped from the 'data-package' and is later added to the results again. The 'local-context-data' is added to the 'data-package' with MqSendT_START and MqSendT_END. The 'local-context-data' is read from the 'data-package' with MqReadT_START and MqReadT

Re: to create variable from dict

2010-03-13 Thread Andreas Waldenburger
On Fri, 12 Mar 2010 06:50:18 -0800 (PST) Luis M. González wrote: > The question is: should you do it? And the answer is: No. And the usual disclaimer is: (Unless you *know* it's the best possible solution to your problem.) /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/pytho

Re: building a dict

2010-03-13 Thread Andreas Waldenburger
On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler wrote: > By the way, I suppose I am the OP. Since I am not an native English > speaking person, I do not know what it stands for. Perhaps you can > tell me. > Perhaps you can find out yourself: http://www.urbandictionary.com/define.php?term=op /W

Re: building a dict

2010-03-14 Thread Andreas Waldenburger
On Sun, 14 Mar 2010 08:36:55 -0400 Steve Holden wrote: > Andreas Waldenburger wrote: > > On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler > > wrote: > > > >> By the way, I suppose I am the OP. Since I am not an native English > >> speaking person, I do n

Re: staticmethod and setattr

2010-03-15 Thread Andreas Löscher
e is the function egg1. If you now set the function as new attribute, it is no longer a static method, but a normal function. If a function is retrieved via getattr(), it is encapsuled in an method object. (func_descr_get in the same file) If you now try to call the method in you example, you call a method from a class. This results in an unbound method, which requests an instance of the class as first agument. I hope this clears some things up. Best Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Castrated traceback in sys.exc_info()

2010-03-25 Thread Andreas Löscher
> As you see, the traceback only starts from function c, which handles the > exception. > It doesn't show main(), a() and b(), which might however be (and are, in > my case) critical to diagnose the severity of the problem (since many > different paths would lead to calling c()). This results

Re: off topic but please forgive me me and answer

2010-04-02 Thread Andreas Waldenburger
On Thu, 01 Apr 2010 22:44:51 +0200 superpollo wrote: > how much is one half times one half? While everyone else is mocking you: Can you please elaborate on why you want to know and what kind of problem you're trying to solve with this? Also, don't you think you should have picked a maths forum f

Re: off topic but please forgive me me and answer

2010-04-03 Thread Andreas Waldenburger
On Sat, 03 Apr 2010 13:13:38 -0400 Steve Holden wrote: > Correct. Unfortunately, it doesn't help to use the right ones either. > In fact, that could almost be a definition of "crackpot" (and alas now > we approach territory where we risk offending the religious, so I will > cease and desist). E

<    1   2   3   4   5   6   7   >