Re: Documentation - which format

2008-02-27 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > Definitely ReST. See http://rst2a.com/ > Hey, this is sweet! Thanks for that. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: The big shots

2008-02-20 Thread Wildemar Wildenburger
Dotan Cohen wrote: >> French and Spanish have impersonal pronouns: "on" and "se", >> respectively. In English, they often come out as, "we", "they", and >> "you" a lot, on occasion a "one", and sometimes, even, I. > > In Hebrew, we have 8 different words for "you". That does not affect > my En

Re: Double underscores -- ugly?

2008-02-19 Thread Wildemar Wildenburger
Jason wrote: > Hmm. I must be the only person who doesn't think the double > underscores are ugly. Nope. I like them too. :) Frankly, I think it's just a matter of adaption. I too found it rather "ugly" in the beginning, but with anything, I've gotten used to it. (And I wholeheartedly support

Re: Why does list have no 'get' method?

2008-02-07 Thread Wildemar Wildenburger
Arnaud Delobelle wrote: > Personally, between > > * foo if foo else bar > * foo or bar > > I prefer the second. Maybe it could be spelt > > * foo else bar ? > How about val = foo rather than bar If that is not clear and obvios, I don't know what is. ;) /W -- http://mail.python.org/mailman/

Re: Project naming suggestions?

2008-02-05 Thread Wildemar Wildenburger
Neil Cerutti wrote: > On Feb 3, 2008 1:17 PM, <[EMAIL PROTECTED]> wrote: >> I'm considering writing a little interpreter for a python-like >> language and I'm looking for name suggestions. :-) >> >> Basically, I don't want to change a whole lot about Python. In fact, >> I see myself starting with

Re: Project naming suggestions?

2008-02-03 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > I'm considering writing a little interpreter for a python-like > language and I'm looking for name suggestions. :-) > How about "Whython"? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: What should I use under *nix instead of freeze?

2008-02-02 Thread Wildemar Wildenburger
Martin v. Löwis wrote: >> That being the case, what is the preferred/best replacement for freeze >> on a *nix platform? > > I don't think that there is one, or that there should be one. > So haven't I understood what freeze does? Isn't pyinstaller just that? /W -- http://mail.python.org/mailma

Re: What should I use under *nix instead of freeze?

2008-02-01 Thread Wildemar Wildenburger
Mike Kent wrote: > That being the case, what is the preferred/best replacement for freeze > on a *nix platform? Don't know about best or preferred, but pyinstaller seems to do that. http://pyinstaller.python-hosting.com> good luck /W -- http://mail.python.org/mailman/listinfo/python-list

Re: dict comprehension

2008-02-01 Thread Wildemar Wildenburger
Arnaud Delobelle wrote: >> I believe both set and dict comprehensions will be in 3.0. > > Python 3.0a1+ (py3k:59330, Dec 4 2007, 18:44:39) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. {x*x for x in range(10)} > {0, 1

Re: Naive idiom questions

2008-02-01 Thread Wildemar Wildenburger
Carl Banks wrote: > Not a big expert on docstrings (they seem so superfluous...) > Say wht?! /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing Pubic Hair Methods

2008-01-30 Thread Wildemar Wildenburger
Gerardo Herzig wrote: > I will use genital().extend(), thats for shure ^^ Well, you never go wrong with apply(genital(), females), do you? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: optional static typing for Python

2008-01-30 Thread Wildemar Wildenburger
Kay Schluehr wrote: > On Jan 30, 12:38 am, Wildemar Wildenburger > <[EMAIL PROTECTED]> wrote: >>> Python has a JIT right no >> You mean in the Java-sense (outputting native machine code)? >> >> /W > > Sure. > > http://psyco.sourceforge.net/ &g

Re: optional static typing for Python

2008-01-29 Thread Wildemar Wildenburger
> Python has a JIT right no > You mean in the Java-sense (outputting native machine code)? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Python noob SOS (any [former?] Perlheads out there?)

2008-01-29 Thread Wildemar Wildenburger
kj wrote: > Is there any good reading (to ease the transition) for Perl > programmers trying to learn Python? > www.diveintopython.org While it is a bit dated by now (Python 2.2), that thing worked wonders for me. Shows you Python in action and presents a fair amount of its philosophy along th

Re: Python Genetic Algorithm

2008-01-28 Thread Wildemar Wildenburger
Blubaugh, David A. wrote: > Have you ever worked with Gene Expression Programming > No. Why? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Genetic Algorithm

2008-01-28 Thread Wildemar Wildenburger
Steven D'Aprano wrote: >> I'm not sure I'm following you here. So a "chromosome" is bit of >> functionality, right? So basically it is a function. So my advice would >> be to write these functions and store it to the "indivuals"-list like >> so: > > No, a chromosome is a bit of *data*: a noun, not

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Wildemar Wildenburger
Ben Finney wrote: > "André" <[EMAIL PROTECTED]> writes: > >> Personally, I like the idea you suggest, with the modification that I >> would use "." instead of "@", as in >> >> class Server(object): >> def __init__(self, .host, .port, .protocol, .bufsize, .timeout): >> pass > > -1. >

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Wildemar Wildenburger
Dustan wrote: >> Well, you save one or two lines per class. Not enough in my >> opinion. > > Are you referring to the alternate syntax or to the decorator? Either > way, you could be saving 4 or 5 or more lines, if you have enough > arguments. OK, but then again, every decent IDE should give you

Re: Python Genetic Algorithm

2008-01-27 Thread Wildemar Wildenburger
Max wrote: > In GAs, you operate on a Population of solutions. Each Individual from > the Population is a potential solution to the problem you're > optimizing, and Individuals have what's called a chromosome - a > specification of what it contains. For example, common chromosomes are > bit strings

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Wildemar Wildenburger
Diez B. Roggisch wrote: > Just for the fun of it, I implemented a decorator: > > from functools import * > from inspect import * > > def autoassign(_init_): > @wraps(_init_) > def _autoassign(self, *args, **kwargs): > argnames, _, _, _ = getargspec(_init_) > for name, valu

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Wildemar Wildenburger
André wrote: > Personally, I like the idea you suggest, with the modification that I > would use "." instead of "@", as in > > class Server(object): > def __init__(self, .host, .port, .protocol, .bufsize, .timeout): > pass > I like :) However, you can probably cook up a decorator for

Re: Exceptions on delete in pysqlite

2008-01-27 Thread Wildemar Wildenburger
Gabriel Genellina wrote: > En Fri, 25 Jan 2008 22:12:57 -0200, Wildemar Wildenburger > <[EMAIL PROTECTED]> escribi�: > >> Using pysqlite, I'd like to check if some dataset that I removed has >> been in the database at all. Ideally I'd like pysqlite to r

Bash the Bush [WAS: Re: translating Python to Assembler]

2008-01-27 Thread Wildemar Wildenburger
Grant Edwards wrote: > On 2008-01-27, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> The Dunning-Kruger effect is the phenomenon wherein people who have >> little knowledge think that they know more than others who have much >> more knowledge. >> [snip] > [snip as well] > ... must res

Re: basic output question

2008-01-25 Thread Wildemar Wildenburger
John Deas wrote: > Hi, I am very new to Python (1 evening...) > I need to process a series of files (toto-1.txt toto-2.txt toto-3.txt > toto-4.txt), and as such I created a small program to go through the > files in a directory. I want to call the script with arguments, like > > python script.py t

Exceptions on delete in pysqlite

2008-01-25 Thread Wildemar Wildenburger
Hi there, Using pysqlite, I'd like to check if some dataset that I removed has been in the database at all. Ideally I'd like pysqlite to raise an Exception if deleting does nothing. Is that possible? Codewise, I'd like the following, but without me checking for and raising the exception myself

Re: question

2008-01-22 Thread Wildemar Wildenburger
Hi there :) A little tip upfront: In the future you might want to come up with a more descriptive subject line. This will help readers decide early if they can possibly help or not. [EMAIL PROTECTED] wrote: > def albumInfo(theBand): > def Rush(): > return ['Rush', 'Fly By Night', 'C

Re: is it possible to set namespace to an object.

2008-01-21 Thread Wildemar Wildenburger
glomde wrote: > Hi, > > is it somehow possible to set the current namespace so that is in an > object. > [snip] > set namespace testObj > Name = "Test" > > Name would set testObj.Name to "Test". > > [snip] > > Is the above possible? > Don't know, sorry. But let me ask you this: Why do you want

Re: bags? 2.5.x?

2008-01-17 Thread Wildemar Wildenburger
Dan Stromberg wrote: > The author of the bag class said that he was planning to submit bags for > inclusion in 2.5 - is there a particular reason why they didn't go in? > I wouldn't know. Not enough convincing use cases, I guess. Fools ;) > I keep finding a need for bags. In the past, I've don

Re: bags? 2.5.x?

2008-01-14 Thread Wildemar Wildenburger
Dan Stromberg wrote: > Is there a particular reason why bags didn't go into 2.5.x or 3000? > > I keep wanting something like them - especially bags with something akin > to set union, intersection and difference. > How about this recepie http://www.ubookcase.com/book/Oreilly/Python.Cookbook.2nd

Re: __init__ explanation please

2008-01-14 Thread Wildemar Wildenburger
Jeroen Ruigrok van der Werven wrote: > To restate it more correctly: __init__ is akin to a constructor. > No. See Hrvoje Niksic's reply (and Ben Finney's to which it was a reply). __init__() /initializes/ an instance (automatically after creation). It is called, /after/ the instance has been con

Re: extracting Javadocs using Python

2008-01-12 Thread Wildemar Wildenburger
Rajarshi wrote: > Does anybody know if something like this is available? Or would I need > to implement a parser from scratch? > Probably. But using pyparsing, you shouldn't have a lot of trouble with it. You may want to take a look at epydoc, a python API-doc generator. I seem to remember that

Re: Look for a string on a file and get its line number

2008-01-08 Thread Wildemar Wildenburger
Jeroen Ruigrok van der Werven wrote: > line_nr = 0 > for line in big_file: > line_nr += 1 > has_match = line.find('my-string') > if has_match > 0: > print 'Found in line %d' % (line_nr) > Style note: May I suggest enumerate (I find the explicit counting somewhat clunky) and ma

Re: documentation

2007-12-28 Thread Wildemar Wildenburger
cf29 wrote: > Which website would you recommend for a great documentation about > Python? > I am looking for a list of methods and properties of all the Python > elements with syntax examples. Any problem with the main source, http://docs.python.org/>? /W -- http://mail.python.org/mailman/listinf

Re: list in a tuple

2007-12-27 Thread Wildemar Wildenburger
Subject: Re: list in a tuple To: Cc: Bcc: Reply-To: Newsgroup: comp.lang.python -=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=- [EMAIL PROTECTED] wrote: > After some tought I must agree that this is a wart more than > a bug and that it will probably be best not to mess with it.

Re: python "sounds-like" module

2007-12-12 Thread Wildemar Wildenburger
Astan Chee wrote: > Anyway, Im trying to find a python module (im not sure if it exists) > that takes two words and compares if they sound the same. So 'right' and > 'write' sounds the same or 'u' and 'you' . Also I know this takes into > account the use of language and accent but is there any o

Re: [pygtk] Rectangular Selection in gtk.TextView

2007-12-07 Thread Wildemar Wildenburger
Oops! This was meant to go to the pygtk list. Mixup on my part, sorry. Not that I would lament comments from the general python crowd, though. ;) /W Wildemar Wildenburger wrote: > John Ehresman wrote: >> I may be wrong here, but I suspect TextView does not support >> rectangular

Re: [pygtk] Rectangular Selection in gtk.TextView

2007-12-07 Thread Wildemar Wildenburger
John Ehresman wrote: > I may be wrong here, but I suspect TextView does not support > rectangular selections. I haven't seen mention of rectangular > selections when I've worked with it and a quick google search seems to > confirm this. > That is my experience too; I was hoping that there might

Re: What is python?????

2007-11-19 Thread Wildemar Wildenburger
Cope wrote: > within 10 months over 1 mn joined the network. everything available on > its viewbar. But it can be download only onXP and Vista for security. > > Cope > www.spam.spam/spam/SPAM > www.spam-spam.spam See, Diez was right. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: good code snippet manager

2007-11-17 Thread Wildemar Wildenburger
Wensui Liu wrote: > Might anyone recommend a good code snippet manager to me? > Thank you so much! > What does "good" mean in that sense? If you want an editor-independent solution, plain-textfiles never fail (by definition, sort of). If your text editor does not support them, but you want inlin

Re: Python beginner!

2007-11-16 Thread Wildemar Wildenburger
Tony wrote: > On Nov 15, 8:57 pm, Wildemar Wildenburger > Give me back the old comp.lang.python, where anyone could ask anything > and be sure of a range of replies, instead of this sort of > pedanticism. Sorry, nothing personal, maybe Python users have become > too profession

Re: build a hierarchical tree, without using DOM,schema, and sax using expat parser and c

2007-11-16 Thread Wildemar Wildenburger
sharan wrote: > I've been experimenting with the jclark's expat parser. I compiled it > on > linux, and it works just great. However, finding tags and data by > implementing the callback functions in c language is cumbersome. > Has anybody written code that uses the expat callback's in such a way

Re: Python beginner!

2007-11-15 Thread Wildemar Wildenburger
SMALLp wrote: > Could someone please paste some program in wxPython that uses inharitance. I > would be very thankfull. > Please read this: http://www.catb.org/~esr/faqs/smart-questions.html> Then ask again. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Information manager/organizer with tags question.

2007-11-13 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > Hello, > > [snip outline of an information editor] Maybe the Literary Machine? http://sommestad.com/lm.htm> It is a bit weird at first, and Windows only (altough I have had it running under wine once). But it is actually really well designed and very powerful. Or,

Re: security code whit python

2007-11-11 Thread Wildemar Wildenburger
Ahh, crap! Wildemar Wildenburger wrote: > [EMAIL PROTECTED] wrote: >> have you got any example?pls :S >> > I suggest you learn to use internet search. And if you already know it, > please use it before asking that. 10 seconds of search (!) and I had: > Mak

Re: security code whit python

2007-11-11 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > I have setuped pyx i wonder i have mistake? > You need a running TeX/LaTeX system for pyx. Sorry, forgot about that. Also, I suggest you follow Scotts advice in reading http://www.catb.org/~esr/faqs/smart-questions.html>. If you're really looking for a way to generate

Re: security code whit python

2007-11-11 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > have you got any example?pls :S > I suggest you learn to use internet search. And if you already know it, please use it before asking that. 10 seconds of search (!) and I had: http://www.google.de/search?hl=de&q=pil%20python%20examples&btnG=Google-Suche&meta=> and fro

Re: security code whit python

2007-11-10 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > I want to create picture of security code.can i do it ? I don't know what you mean by "security code". I take it you want to create technical diagrams, from a sort of algorithmic description? PIL might help you, as paulC pointed out. It works on raster images (bitmap

Re: List to Tuple and Tuple to List?

2007-11-07 Thread Wildemar Wildenburger
Davy wrote: > Hi all, > > I am curious about whether there is function to fransform pure List to > pure Tuple and pure Tuple to pure List? > Isn't that just the same topic as in your other thread? I think it is somewhat unfriendly that you ignore that one. It makes me feel that you see this grou

Re: How to use list as key of dictionary?

2007-11-07 Thread Wildemar Wildenburger
Duncan Booth wrote: > Better, just don't try passing it a recursive data structure. > a = [1, 2, 3] a[1] = a a > [1, [...], 3] tupleize(a) > > > Traceback (most recent call last): > File "", line 1, in > tupleize(a) > File "", line 5, in tupleize > return tuple(t

Re: How to use list as key of dictionary?

2007-11-07 Thread Wildemar Wildenburger
Duncan Booth wrote: > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > >> maybe something like this could help: >> >> def tupleize(non_tuple): >> try: >> return tuple(tupleize(thing) for thing in non_tuple) >> except Ty

Re: How to use list as key of dictionary?

2007-11-06 Thread Wildemar Wildenburger
Davy wrote: > Hi Matimus and Boris, > > Thank you :) > > And a further question about vector above rank 1, how can I use it as > the key of dictionary? > > For example, if I have list like L=[[1,2,3],[4,5,6,7]], > Then I do L_tuple = tuple(L) L_tuple = ([1,2,3],[4,5,6,7]) > But {L_t

Re: new style class

2007-11-02 Thread Wildemar Wildenburger
Bjoern Schliessmann wrote: > gert wrote: >> Could not one of you just say "@staticmethod" for once damnit :) > > No, since everyone's crystal balls are in repair. > I don't even have crystal balls! /W -- http://mail.python.org/mailman/listinfo/python-list

Re: new style class

2007-11-02 Thread Wildemar Wildenburger
gert wrote: > oops the code is like this but doesn't work > > class Test(object): > > def m1(self,v): > return v > > def m2(v): > return v > > if __name__ == '__main__': > gert = Test() > print gert.m1('1') > print Test.m2('2') > Well, what do you think:

Re: new style class

2007-11-02 Thread Wildemar Wildenburger
gert wrote: > On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote: >> gert wrote: >>> class Test(object): >>> def execute(self,v): >>> return v >>> def escape(v): >>> return v >>> if __name__ == '__main__': >>> gert = Test() >>> print gert.m1('1') >>> pri

Re: A Python 3000 Question

2007-10-29 Thread Wildemar Wildenburger
Bjoern Schliessmann wrote: > The inconsistencies arise, IMHO, if an OO language introduces > non-object types for performance reasons, after that gets wrapper > classes to wrap those primitives, and even later gets the ability > to automatically cast a primitive into a wrapper class instance. > Tha

Re: ANN: Veusz 1.0 - a scientific plotting package

2007-10-29 Thread Wildemar Wildenburger
Jeremy Sanders wrote: > Wildemar Wildenburger wrote: > >> Not that I don't value your effort, but why another plotting package >> while we have pyx and matplotlib already? > > In addition to the Python based scripting command line and embedding > interface,

Re: ANN: Veusz 1.0 - a scientific plotting package

2007-10-29 Thread Wildemar Wildenburger
Jeremy Sanders wrote: > I'm pleased to announce Veusz 1.0. Source, windows and linux i386 binaries > are available. Jeremy Sanders > > [snip] > > Veusz is a scientific plotting package written in Python, using PyQt4 > for display and user-interfaces, and numpy for handling the numeric > data. Veu

Re: Return value from os.system() call

2007-10-28 Thread Wildemar Wildenburger
Calder Coalson wrote: > I was searching for ways to get the return value from os.system() calls, > when I came across this from 6 years ago. I tried what was suggested in > this thread, but > output = os.popen("/tmp/other").read() > returns > sh: line 1: /tmp/other: Permission denied > I would

Re: Python Windows Installation

2007-10-26 Thread Wildemar Wildenburger
Bjoern Schliessmann wrote: > Wildemar Wildenburger wrote: >> Bjoern Schliessmann wrote: > >>> Which I don't understand (works best for me, and is best practice >>> in Windows). >> >> Best practice? Says who? > > Ok, LOL. So, now you expec

Re: Python Windows Installation

2007-10-25 Thread Wildemar Wildenburger
Bjoern Schliessmann wrote: > Dennis Lee Bieber wrote: >> Besides preferring an install path that doesn't have spaces... > > Which I don't understand (works best for me, and is best practice in > Windows). > Best practice? Says who? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: [0..9] list (range) syntax

2007-10-25 Thread Wildemar Wildenburger
Michal Bozon wrote: > The .. syntax was not meant only as something > which would include the last item, > but also/rather a range list syntactic shortcut: > > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] --> > [0, 1, ... 9, 10] --> > [0..10] > OK, I see. But I still fail to see where this is useful. All

Re: [0..9] list (range) syntax

2007-10-24 Thread Wildemar Wildenburger
Michal Bozon wrote: > many Python newcomers are confused why > range(10), does not include 10. > It produces a list of ten elements. Also the documentation is quite clear on the topic. And lastly: This will probably really bother you for a week, then no more. > If there was a proposal for the

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Wildemar Wildenburger
Jürgen Exner wrote: > Wildemar Wildenburger wrote: >> Joachim Durchholz wrote: >>> And yes, it [syntactically] sucks in major ways. >>> >> Oh my God, I don't want to, but I just have to ask: Why? > > Because TeX has nothing to do with either Perl, Pyth

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Wildemar Wildenburger
Byung-Hee HWANG wrote: > On Mon, 2007-10-22 at 12:19 -0400, Lew wrote: > [something attackish] > > Well, you are making a personal attack, it's dangerous. I wish to see > only discussions about TeX ;; > On a python group? Also: Lew won't see your post, he's on c.l.java.* /W -- http://mail.pyt

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Wildemar Wildenburger
Joachim Durchholz wrote: > And yes, it sucks in major ways. > Oh my God, I don't want to, but I just have to ask: Why? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: GLE-like python package

2007-10-14 Thread Wildemar Wildenburger
Cesar G. Miguel wrote: > I think this is what you're looking for: > > http://pyx.sourceforge.net/ > It damn sure is (a straight ripoff of GLE ;))! The syntax seems a bit messier than GLE (naturally) but since it is python I'm willing to bite that bullet. Thanks :) /W -- http://mail.python.org

GLE-like python package

2007-10-14 Thread Wildemar Wildenburger
Hello there, I'm exploring possibilities of using python as an alternative to Matlab. The obvious way to go seems to be matplotlib for plotting, but I do like GLE http://glx.sourceforge.net/> a lot. One reason is that with GLE you can also do diagrams, that is, descriptive pictures (like http:

Re: Top Programming Languages of 2013

2007-10-08 Thread Wildemar Wildenburger
Tim Roberts wrote: > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: >> import friends >> import sex >> >> try: >> sex.have() >> except ErrectionError, PrematureError: >> pass >> finally: >> sex.brag(friends) > >

Re: Top Programming Languages of 2013

2007-10-07 Thread Wildemar Wildenburger
Byung-Hee HWANG wrote: > On Sun, 2007-10-07 at 17:54 +0200, Wildemar Wildenburger wrote: >> import friends >> import sex >> >> try: >> sex.have() >> except ErrectionError, PrematureError: >> pass >> finally: >> sex.brag(frie

Re: Top Programming Languages of 2013

2007-10-07 Thread Wildemar Wildenburger
Kay Schluehr wrote: > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: >> >> >> Dick Moores > > Despite my doubts that Ajax and .NET will be programming languages in > 2013 a more interesting question is: what could push Python forward > s.t.

Re: Newbie packages Q

2007-10-07 Thread Wildemar Wildenburger
MarkyMarc wrote: > *** > atest.py: > > def printA(): > print "This is Atest from Apack" > *** > btest.py: > from Test.apack import atest > > def printB(): > print "This is Btest from Bpack" > > def printatest(): > p

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Dekker wrote: > Well... I have to live with the (binary) __and__, __or__ option and > the user has to write: > > SqlValueInt(4) & SqlValueInt(5) --> SqlOpAnd(SqlValueInt(4), > SqlValueInt(5)) > > Thanks for your input, but __nonzero__ is not of any help in this > case... I want to abuse the "magi

Re: Newbie packages Q

2007-10-07 Thread Wildemar Wildenburger
MarkyMarc wrote: > On Oct 7, 4:24 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> MarkyMarc a écrit : >> import is a statement. It's executed, like any other top-level code, >> when the module is imported (or the script loaded into the interpreter >> if it's called directly). So if A.py impor

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Wildemar Wildenburger wrote: > [whate everyone else wrote :(] > > /W Dangit! 4th of 4. Gotta type quicker. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Dekker wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? > > Have marvelous sunday, > Marco > I guess you're looking for __nonzero__() http://docs.python.or

Re: Convert on uppercase unaccentent unicode character

2007-10-04 Thread Wildemar Wildenburger
Steve Holden wrote: > Malheureusement, I see that absence of accented capitals is a modern > phenomenon that is regarded as an impediment to the language mostly > stemming from laziness of individual authors and inadequacy of low-end > typesetting software. I hadn't realised I was so up-to-date

Re: racism kontrol

2007-10-04 Thread Wildemar Wildenburger
Hendrik van Rooyen wrote: > "Wildemar Wildenburger" wrote: > >> (By the way: Accusing a German of racism is almost too easy an insult. >> Not that I had taken any, just saying.) > > I always thought that it would be insulting to a German if you accused

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-04 Thread Wildemar Wildenburger
Steve Holden wrote: > Lawrence D'Oliveiro wrote: >> In message <[EMAIL PROTECTED]>, Steve >> Holden wrote: >> >>> Lawrence D'Oliveiro wrote: >>> In message <[EMAIL PROTECTED]>, George Neuner wrote: > The Christian Bible says "In the beginning was the Word..." Which is an Eng

Re: racism kontrol

2007-10-03 Thread Wildemar Wildenburger
Steve Holden wrote: > Wildemar Wildenburger wrote: >> (I aplogize for that last remark. I have nothing against turkish >> people, I just couldn't let the opportunity for a mean joke slip.) > > Does this mean you are an equal-opportunity racist? > Yeah! Well

Re: List of objects X Database

2007-10-03 Thread Wildemar Wildenburger
Michael Bentley wrote: > > On Oct 3, 2007, at 1:01 PM, MindMaster32 wrote: > >> I am writing a script that has to read data from an ASCII file of >> about 50 Mb and do a lot of searches and calculations with that data. >> That would be a classic problem solved by the use of a database >> (SQLite

Re: Class design question

2007-10-03 Thread Wildemar Wildenburger
Adam Lanier wrote: >> class Foo(object): >> def __init__(self, *args): >> self.params = [arg if isinstance(arg, Bar) else Bar(arg) for >> arg in args] >> > > Interesting, I'm not familiar with this idiom... > > These are two idioms actually: 1. a "list comprehension": >>> newlis

Re: spam kontrol

2007-10-03 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > hii > ı think you know spam page is the most pest for net user.I want > distinguish spam page to usefull page > if you have a idea whit this problem pleas share to me > thank you > GIYF: http://www.google.com/search?hl=en&safe=off&q=spam+detection+python&btnG=Search> S

Re: spam kontrol

2007-10-03 Thread Wildemar Wildenburger
George Sakkis wrote: > On Oct 3, 12:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> hii >> ý think you know spam page is the most pest for net user. > > ...closely followed in the second position by incoherent misspelled > posts in silly IM-speak. > > You know, there are such people as

Re: generating range of numbers

2007-10-03 Thread Wildemar Wildenburger
vimal wrote: > hi all, > > i am new to python. > i just want to generate numbers in the form like: > > 1,2,4,8,16,32.to a maximum of 1024 > > using a range function > Homework? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: I earn $36800 a month with google adsense

2007-10-02 Thread Wildemar Wildenburger
panguohua wrote: > I am only a publisher!!! > > > really it is useful > Wow! That has got to be the first response by a spammer with some form of "meaningful" remark. I'm impressed. Dude, you, even as a spammer, can learn a lot from this group. As Diez pointed out, you will want to quote the

Re: Creating a custom python python distribution

2007-10-02 Thread Wildemar Wildenburger
shailesh wrote: > Hi, > I wish to create a Python distribution includind Python and some other > libraries (Zope 3, PyWin32, numpy, lxml, etc.) which are required for > my applications. e.g. there are Enthough and ASPN distributions of > Python. > > Unfortunately, I have not been able to find the

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Wildemar Wildenburger
Kamen TOMOV wrote: > On Sun, Sep 30 2007, Klaus Schilling wrote: > >> ... >> private property is unethical > > How I craved to read that! > > Viva la revolution! > > Ест человек - ест проблем, > Нет человек - нет проблем! > > The End justify the means! > > Long live communism! > ENDUT! HOC

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-01 Thread Wildemar Wildenburger
Frank Goenninger wrote: > On 2007-09-29 01:27:04 +0200, Damien Kick <[EMAIL PROTECTED]> said: > >> If you were referring to the "free" in "free Mumia Abu Jamal", I would >> agree with you. I don't think anyone would imagine that this phrase >> meant that someone was going to get Mumia Abu Jamal

Re: building a GUI

2007-09-23 Thread Wildemar Wildenburger
yadin wrote: > if i were up to make a GUI chich are the advantages of choosing python > over matlab or java? > This question is WAY to broad to give sane advice. You might want to state your context, objectives and restrictions are. Since you brought up Matlab, I suspect you're going after a sci

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Wildemar Wildenburger
stef mientki wrote: > Wildemar Wildenburger wrote: >> Bruno Desthuilliers wrote: >> >>> OTHO, simple math-illeterate programmers like me will have hard time >>> maintaining such a code. >>> >> Certainly, but again: Such main people are not t

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Wildemar Wildenburger
Bruno Desthuilliers wrote: > OTHO, simple math-illeterate programmers like me will have hard time > maintaining such a code. Certainly, but again: Such main people are not the intended audience. The code is for people that know how to read these equations. I think a general rule of (any form of)

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Wildemar Wildenburger
Bjoern Schliessmann wrote: >> No, but the point being made is that it would be better IN >> THIS CASE. > > It wouldn't. IMHO, rewriting the code to two or three lines would be > better. > Well I think Charles' Point about making the equations look like the ones in the paper(s) is a pretty good

Re: Python 3K or Python 2.9?

2007-09-13 Thread Wildemar Wildenburger
TheFlyingDutchman wrote: >> (Can you tell I'm currently forced to developing in Java? ;) (Which I'm >> currently avoiding to do, by wasting my time on usenet.)) >> > > Maybe you can sneak Jython into the mix. Just describe it as "this > Java scripting language". > > Hehe, devious idea. I might j

Re: Python 3K or Python 2.9?

2007-09-13 Thread Wildemar Wildenburger
TheFlyingDutchman wrote: > What I would like to have seen added to class definitions was the > forced declaration of all object variables in the class outside of > methods. I don't like the fact that they have to be, and can be > created in any method on the fly. > Isn't one of the main ideas behi

Re: Help to start python

2007-09-13 Thread Wildemar Wildenburger
python_lover wrote: > Please guide me some good sites to start web based programing on > python. > Here's a good one: Always remember: GIYF If you don't know what that means:

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Wildemar Wildenburger
Eduardo O. Padoan wrote: > On 9/13/07, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: >> because I'm trained to interpret the underscore as a synonym for one >> space. It's not particularly beautiful, but that is probably a matter of >> habituation. And that

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Wildemar Wildenburger
Charles Fox wrote: > Maybe for now I will just fix up my emacs to display the world 'self' > in 10% gray... :-) > > Now *that* is a clever idea! (And that's no irony.) /W -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Wildemar Wildenburger
Steven D'Aprano wrote: > On Thu, 13 Sep 2007 12:10:03 +, [EMAIL PROTECTED] wrote: > >> Why not use '_' as the self variable. It is minimal and achieves close >> to '.var', as '_.var' isn't that different. I know its a little >> perl-esque, but its not a bad convention if you are aiming to up

Re: Checking if elements are empty

2007-09-11 Thread Wildemar Wildenburger
Steve Holden wrote: > Neil Cerutti wrote: > >>> y = "" > >>> if y[0] == "": > ... print "True" > ... else: > ... print "False" > ... > Traceback (most recent call last): > File "", line 1, in > IndexError: string index out of range > >>> > Uhm, weren't we talking about a list of strings?

Re: Python syntax wart

2007-09-09 Thread Wildemar Wildenburger
Steven D'Aprano wrote: > That is quite possibly the ugliest piece of code I've ever seen in > Python. I'm impressed. Did you format it yourself or did you use a > professionally written code-uglifier? > Boy did that make me laugh! The notion of a "code uglifier" just is a pearl. (I hate to call

  1   2   3   >