Re: Do other Python GUI toolkits require this? (OT)

2007-04-21 Thread Roel Schroeven
Hendrik van Rooyen schreef: > "Roel Schroeven" <[EMAIL PROTECTED]> wrote: > >> Hendrik van Rooyen schreef: >>> "Steve Holden" <[EMAIL PROTECTED]> wrote: >>> >>> >>>> Perhaps in Belgium they prefer climbing mo

Re: ignorance and intolerance in computing communties

2007-05-03 Thread Roel Schroeven
2*pi, 2*pi) No conditionals in sight. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: 4 quadrant atan

2007-05-04 Thread Roel Schroeven
Charles Sanders schreef: > Roel Schroeven wrote: >> I might be wrong of course, but can't you just use atan2? Only problem >> is that it returns negative angles for quadrants 3 and 4, but that is >> easily solved. In Python: >> >> from math import a

Re: Newbie: Struggling again 'map'

2007-05-26 Thread Roel Schroeven
ef fill_missing(a, b): if a is None: a = fillchars if b is None: b = fillchars return a, b return fill_missing map(make_fill_missing("N/A"), lista, listb)) -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators tutorials

2007-07-23 Thread Roel Schroeven
n on Kent's Korner: http://personalpages.tds.net/~kent37/kk/1.html -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Why PHP is so much more popular for web-development

2007-07-26 Thread Roel Schroeven
s only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: wxGlade: Who knows how to drive this application?

2007-07-25 Thread Roel Schroeven
e a pain to use the interface. I actually thought it was just me; I'm glad to see that at least one other person has problems with it too. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: wxGlade: Who knows how to drive this application?

2007-07-28 Thread Roel Schroeven
as panels, making them invisible in the design window when places on them. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: How to stop print printing spaces?

2007-07-28 Thread Roel Schroeven
c in ln) 0001FF20343536373839616263646566 BTW, in your examples it's more pythonic not to use range with an index variable in the for-loop; you can loop directly over the contents of ln like this: import sys for c in ln: sys.stdout.write('%.2X' % ord(c)) print -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Roel Schroeven
en able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Augmented assignment (was Re: Something in the function tutorial confused me.)

2007-08-11 Thread Roel Schroeven
in Alex' example has anything to with it: the assignment is to the list, not the tuple. And watch this (Python 2.4.2): >>> tup = ([],) >>> tup[0] += ['zap'] Traceback (most recent call last): File "", line 1, in -toplevel- tup[0] += ['zap'] TypeError: object does not support item assignment So far that's the same as Alex' example, but look at the value of the tuple now: >>> tup (['zap'],) Despite the TypeError, the list *has* changed. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Augmented assignment (was Re: Something in the function tutorial confused me.)

2007-08-11 Thread Roel Schroeven
nterpret the target in 'The target is only evaluated once' more like an L-value in C/C++. That's not correct, of course, but I didn't understand exactly how wrong it was until now. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Who told str() to round my int()'s!!!

2007-08-11 Thread Roel Schroeven
aware of the limits inherent in floating point arithmetic and in conversions between decimal and binary fractions. See e.g. http://docs.python.org/tut/node16.html -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Augmented assignment (was Re: Something in the function tutorial confused me.)

2007-08-11 Thread Roel Schroeven
. In the second case the object was already modified so the assignment doesn't accomplish very much, but it still happens. That explains why "tup[0] += ['zap']" both has an effect (tup[0] now contains 'zap') and raises an exception: tup[0] is modified because it is a list and lists support inplace addition, but the assignment fails because tuples don't support item assignment. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Something in the function tutorial confused me.

2007-08-11 Thread Roel Schroeven
* have a side effect on variable d (as indeed it should not!)? > >>>> c = [1, 2, 3] -> A list is created and assigned to c >>>> d = c -> That list is also assigned to d >>>> d > [1, 2, 3] >>>> c = c + [4] -> A new list object is created (the sum of the original one and the list [4]) and assigned to c >>>> c > [1, 2, 3, 4] -> c is now bound to the new list object >>>> d > [1, 2, 3] -> ... while d is still bound to the original list object I hope this clears up things a bit... -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple python iteration question

2007-08-15 Thread Roel Schroeven
_1.9_rxe_d.jpg), Ford (e.g. http://en.wikipedia.org/wiki/Image:Ford-Focus-wagon.jpg), Toyota (e.g. http://www.outrefranc.com/modeles/toyota/img/corollabreak3.jpg) and many others. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax Question - list multiplication

2007-08-19 Thread Roel Schroeven
ement, you change them all (since it's all the same object). Solution: make sure to create independent lists. >>> grid = [[0] * 3 for i in range(3)] >>> grid [[0, 0, 0], [0, 0, 0], [0, 0, 0]] >>> grid[0][0] = 1 -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: unexpected behavior: did i create a pointer?

2007-09-07 Thread Roel Schroeven
turn the same value. To make a copy of a (assuming a is a dict), you can do: copyOfA = dict(a) or copyOfA = a.copy() or more generally import copy copyOfA = copy.copy(a) Cheers, Roel -- If I have been able to see further, it was only because I stood on the shoulders of giants.

Re: An ordered dictionary for the Python library?

2007-09-12 Thread Roel Schroeven
have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: VIM: Python type indented-block command equivalent to % for C?

2007-03-08 Thread Roel Schroeven
I don't know either, but if you find anything, please post it to this list: I'm looking for such functionality too. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Watching a file another app is writing

2007-03-12 Thread Roel Schroeven
tried with tail -F instead of tail -f? With a big F it uses the name of the file instead of the file descriptor, and it keeps trying to open the file. I'm not sure if it will work, but it's worth a shot. -- If I have been able to see further, it was only because I stood on the shoul

Re: fifo queue

2007-03-18 Thread Roel Schroeven
l -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with global variables

2007-04-02 Thread Roel Schroeven
thing to it. That's not what happens: if the function assigns to it, *all* mentions of the variable are considered local. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: tuples, index method, Python's design

2007-04-15 Thread Roel Schroeven
ex(s) 0 >>> s[0] u'\u1d40' >>> s == s[0] False In this case s[0] is not the full Unicode scalar, but instead just the first part of the surrogate pair consisting of 0x1D40 (in s[0]) and 0x (in s[1]). -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot formulate regex

2007-09-16 Thread Roel Schroeven
YI Kodos (http://kodos.sourceforge.net/) can be very useful for developing, testing and debugging such regexes. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Try this

2007-09-17 Thread Roel Schroeven
icrosoft+evil... hm.. "This app can break" is the sentence used when I first heard about this bug. Perhaps not evil enough, but it does sound more sensible. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov

Re: The meaning of a = b in object oriented languages

2007-09-18 Thread Roel Schroeven
pect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: The meaning of a = b in object oriented languages

2007-09-19 Thread Roel Schroeven
Lew schreef: > Roel Schroeven wrote: >> Laurent Pointal schreef: >>> Summercool a écrit : >>>> The meaning of a = b in object oriented languages. >>>> >>> >>> >>>

Re: Newbie completely confused

2007-09-22 Thread Roel Schroeven
_files) for file_index, i in enumerate(input_files): print "--> %i/%i: %s" % (file_index + 1, nfiles, i) ReadClasses(i) Instead of item0, item1, ... , it's generally better to use a list, so you can use item[0], item[1], ... And finally, John Machin&

Re: Newbie completely confused

2007-09-25 Thread Roel Schroeven
> open, though. I'm afraid so. Sorry I can't help. One thing that helped me in the past to speed up input is using memory mapped I/O instead of stream I/O. But that was in C++ on Windows; I don't know if the same applies to Python on Linux. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie completely confused

2007-09-25 Thread Roel Schroeven
Roel Schroeven schreef: > import time > > input_files = ["./test_file0.txt", "./test_file1.txt"] > > total_start = time.time() > data = {} > for input_fn in input_files: > file_start = time.time() > f = file(input_fn, '

Re: Newbie imap lib question

2007-01-12 Thread Roel Schroeven
x27;, ['User logged in']) >>> M.select('INBOX') ('OK', ['740']) Always the same. Though the number changes if I receive or delete mail of course. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Roel Schroeven
, though much less common. At least I think and hope it's much less common, but actually I don't read all that much forums, newsgroups etc. in Dutch. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Roel Schroeven
to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Roel Schroeven
st covers quoting practices. But note that inline replying isn't as wide-spread as I think it ought to be. Places that don't have roots in Internet or Unix culture are much more likely to accept and even encourage top-posting. -- If I have been able to see further, it was only be

Re: **argv can't work

2007-01-20 Thread Roel Schroeven
-- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: confused about resizing array in Python

2007-02-03 Thread Roel Schroeven
nd append a new one. That's not correct. Python dictionaries are highly optimized and I believe the time complexity is amortized constant (i.e. O(1)) for both insertions and lookups. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newt

Re: confused about resizing array in Python

2007-02-03 Thread Roel Schroeven
Ruan schreef: > "Roel Schroeven" <[EMAIL PROTECTED]> wrote: >> Ruan schreef: >>> My confusion comes from the following piece of code: >>> >>> memo = {1:1, 2:1} >>> def fib_memo(n): >>> global memo >>> if not n in memo

Re: confused about resizing array in Python

2007-02-03 Thread Roel Schroeven
Dongsheng Ruan schreef: > "Roel Schroeven" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Ruan schreef: >>> Then how about Python's list? >>> >>> What is done exactly when list.append is executed? >>> >>

Re: division by 7 efficiently ???

2007-02-07 Thread Roel Schroeven
ter. AFAIK that method is not commonly used since binary computers are very good at dividing numbers by two, but it would be a good method on ternary or decimal computers. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: division by 7 efficiently ???

2007-02-07 Thread Roel Schroeven
Roel Schroeven schreef: > [EMAIL PROTECTED] schreef: >> I had considered this, but to halve, you need to divide by 2. Using >> random, while potentially increasing the number of iterations, removes >> the dependency of language tricks and division. > > It's p

Re: Pep 3105: the end of print?

2007-02-16 Thread Roel Schroeven
because AFAIK the point of Python 3000 is to fix a number of long-standing shortcomings, even if that means giving up a degree of backward compatibility. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Pep 3105: the end of print?

2007-02-16 Thread Roel Schroeven
make this task really hard. However, it would be great if there was some tool that did at least an 80% job of translation, pointing out areas where it wasn't sure using comments or warnings. Perhaps such a tool could be based on something like Pychecker." -- If I have been able to

Re: why I don't like range/xrange

2007-02-16 Thread Roel Schroeven
In other words, the point is that you can't translate loops literally from C to Python. Which is nothing new, and I fail to see how that is supposed to be a disadvantage. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton R

Re: HTTP_REFERER value

2007-02-17 Thread Roel Schroeven
ython.org by clicking a link on Microsoft's website, yes. If you get to www.python.org by manually typing in the URL or by using a bookmark, no. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.p

Re: Pixel Array => Bitmap File

2007-02-27 Thread Roel Schroeven
Image.save() (also from PIL) to save it as a bmp. Have a look at http://www.pythonware.com/library/pil/handbook/image.htm for the details on those methods. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: multiline comments

2006-04-19 Thread Roel Schroeven
orks very well, is to use preprocessor directives: #if 0 ... #endif Works in both C and C++. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: ending a string with a backslash

2006-05-01 Thread Roel Schroeven
#x27;foo', 'bar') 'foo\\bar' >>> os.path.join('foo\\', 'bar') 'foo\\bar' Greatly simplifies concatenating path components IMO. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: critique this little script, if you like

2006-05-01 Thread Roel Schroeven
to specify components without leading or trailing backslashes (unless you really want an absolute path): >>> os.path.join('base', 'subdomain', 'images') 'base\\subdomain\\images' -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: critique this little script, if you like

2006-05-01 Thread Roel Schroeven
t I had to import it separately, but just yesterday I discovered import os and import os.path do the same thing. If I do one of the two, doesn't matter which one, I can access both os.listdir and os.path.join. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: hyperthreading locks up sleeping threads

2006-05-09 Thread Roel Schroeven
only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about exausted iterators

2006-05-18 Thread Roel Schroeven
). Not that I know of use cases for other exceptions after StopIteration; just clarifying what I think the OP means. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Python - Web Display Technology

2006-05-21 Thread Roel Schroeven
e Flash to design the website itself. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Python - Web Display Technology

2006-05-22 Thread Roel Schroeven
oach fails too. One more minus for Flash on the web. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in a loop?

2008-01-17 Thread Roel Schroeven
zero 0 one 1 two 2 three 3 None 4 None 5 None 6 -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Test driven development

2008-01-24 Thread Roel Schroeven
bject, ideally something more focused on Python or C++ rather than Java? -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Test driven development

2008-01-24 Thread Roel Schroeven
Virgil Dupras schreef: > On Jan 24, 1:30 pm, Roel Schroeven <[EMAIL PROTECTED]> > wrote: >> Virgil Dupras schreef: >> >>> I know what you mean by top-down vs. bottom-up and I used to have the >>> same dilemma, but now I would tend to agree with Albert. Yo

Re: Test driven development

2008-01-25 Thread Roel Schroeven
alex23 schreef: > On Jan 25, 5:44 am, Roel Schroeven <[EMAIL PROTECTED]> > wrote: >> I guess I just need to try somewhat harder to use TDD in my daily >> coding. Apart from books, are there other resources that can help >> beginners with TDD? Mailing list

Re: Strange sqlite3 library behavior

2008-02-02 Thread Roel Schroeven
now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: time.time() strangeness

2008-02-26 Thread Roel Schroeven
Nitro schreef: >> Nevertheless time.time() shouldn't fail here unless DirectX is really >> badly tinkering with my system. > > I can tell you more now. If I pass D3DCREATE_FPU_PRESERVE while creating > the DirectX device the bug does not appear. This flag means "Direct3D > defaults to single

Re: time.time() strangeness

2008-02-27 Thread Roel Schroeven
Nitro schreef: > Ok, my final solution is to add the D3DCREATE_FPU_PRESERVE flag. It didn't > harm performance in a noticeable way at all. I was under the impression > SSE would be affected by this, too. Additionally I was under the > impression that float precision would suffice for time.tim

Re: List as FIFO in for loop

2008-03-08 Thread Roel Schroeven
ke this: from collections import deque q = deque([a, b, c]) while q: x = q.popleft() # ... q.append(y) -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: float / rounding question

2008-03-08 Thread Roel Schroeven
s is about. If you want a nicely rounded number, use print or str() or the % operator. *Only* when you use repr() or when the interactive interpreter uses it to print the value of the expression, you get something that doesn't look as nice. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Regarding coding style

2008-03-10 Thread Roel Schroeven
y after 10 changes the first > change isn't as important anymore (unless you want to backtrack and > find out who started the Project in the first place and what it's > original purpose was). That is certainly useful, but IMO that's what version control systems are for. --

Re: List mutation method gotcha - How well known?

2008-03-13 Thread Roel Schroeven
returns None. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Joseph Weizenbaum

2008-03-14 Thread Roel Schroeven
out creator of Eliza? > > What is Eliza? Does that question interest you? -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Anomaly in time.clock()

2008-03-17 Thread Roel Schroeven
culation errors). The solution was to use a flag (PRESERVE_PRECISION or something like that) in the CreateDevice() call (it was a C++ project). If it's something else, I'm afraid I can't help. -- The saddest aspect of life right now is that science gathers knowledge faster than soci

Re: How to execute a hyperlink?

2009-01-28 Thread Roel Schroeven
se os.startfile() which works hyperlinks and many types of files, but only works on Windows (it does the same as double-clicking in Windows Explorer). -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: STMP, mail, sender-from, to-bcc-addr

2009-02-10 Thread Roel Schroeven
est hello """ % (from_addr, ', '.join(to_addr)) smtp = smtplib.SMTP(...) smtp.sendmail(from_addr, to_addr + bcc_addr, msg) -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Exhaustive Unit Testing

2008-11-29 Thread Roel Schroeven
() and test_spam_eggs(). I've read "test-driven development" by David Astels, but somehow it seems that the issues I encounter in practice don't come up in his examples. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdo

Re: Exhaustive Unit Testing

2008-11-29 Thread Roel Schroeven
Thanks for your answer. I still don't understand completely though. I suppose it's me, but I've been trying to understand some of this for quite some and somehow I can't seem to wrap my head around it. Steven D'Aprano schreef: On Sat, 29 Nov 2008 11:36:56 +0100, R

Re: Exhaustive Unit Testing

2008-11-30 Thread Roel Schroeven
Steven D'Aprano schreef: [..] Thank you for elaborate answer, Steven. I think I'm really starting to get it now. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.o

Re: get method

2008-12-30 Thread Roel Schroeven
al for short strings, but try your solution on a string with length 1 and see the difference. On my computer the O(n) version takes 0.008 seconds, while your version takes 8.6 seconds. That's 1000 times slower. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Roel Schroeven
to a more convenient[2] location, or edit the file name to remove the dot. I don't think so: the average Windows user will never even see the files in that directory; they only see the files in the 'Desktop' and 'My Documents' folders. -- The saddest aspect of l

Re: How can I handle the char immediately after its input, without waiting an endline?

2008-10-25 Thread Roel Schroeven
mind. I suppose there are many more that I can't think of at the moment. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: strange permission issue with nosetests

2008-11-20 Thread Roel Schroeven
projects/nose/#usage, under "Options")). It took me a while too before I could figure what was wrong, and how to solve it. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: any(), all() and empty iterable

2009-04-16 Thread Roel Schroeven
t; add another sentence specifically covering the case for >>> an empty iterable. >> as one of the instigators in this thread, I'm +1 on this solution. > > [...] and simply adding something like "or the iterable is empty" > might head off future confusion. +

Re: Multiprocessing.Queue - I want to end.

2009-05-01 Thread Roel Schroeven
right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing.Queue - I want to end.

2009-05-02 Thread Roel Schroeven
Hendrik van Rooyen schreef: > : "Roel Schroeven" wrote: >> ... > This is all true in the case of a job that starts, runs and finishes. > I am not so sure it applies to something that has a long life. It's true that I'm talking about work units with relat

Re: list comprehension question

2009-05-06 Thread Roel Schroeven
ndeed, that is exactly the reason why I find it difficult to read nested loop comprehensions, and why I almost never use them. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread Roel Schroeven
edge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python for programming algorithms

2008-05-19 Thread Roel Schroeven
hat there's a large difference between byte code and machine code (in Python's case; I haven't looked at other languages), and that it's a bit silly to try to trivialize that difference. -- The saddest aspect of life right now is that science gathers knowledge faster th

Re: Using Python for programming algorithms

2008-05-20 Thread Roel Schroeven
Wow this resulted in far more reactions than I had expected ... [EMAIL PROTECTED] schreef: On 19 mai, 15:30, Roel Schroeven <[EMAIL PROTECTED]> wrote: Bruno Desthuilliers schreef: 1/ being interpreted or compiled (for whatever definition of these terms) is not a property of a language,

Re: boolian logic

2008-06-13 Thread Roel Schroeven
re I need to know what is calulated first i.e the not or the 'OR/AND's if var not in (A, B, C): do_something() -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: 'string'.strip(chars)-like function that removes from the middle?

2008-06-17 Thread Roel Schroeven
identity = string.maketrans('', '') 'www.example.com'.translate(identity, 'cmowz.') 'exaple' -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions on 64 bit versions of Python

2008-07-27 Thread Roel Schroeven
g you buy from the shelf in a regular computer store). So you almost certainly need the AMD64 version of Python. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to fix Invalid CSV File

2008-08-06 Thread Roel Schroeven
is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: finding euclidean distance,better code?

2008-03-29 Thread Roel Schroeven
stance) so Robert has a valid point. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me on function definition

2008-03-29 Thread Roel Schroeven
n row > accordingly.""" > ppp1,ppp2,ppp3=0.0,0.0,0.0 You forgot the : after def cross(u, v) -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: finding euclidean distance,better code?

2008-03-29 Thread Roel Schroeven
Steven D'Aprano schreef: > On Sat, 29 Mar 2008 10:11:28 +0100, Roel Schroeven wrote: > >> Steven D'Aprano schreef: >>> On Fri, 28 Mar 2008 16:59:59 +0100, Robert Bossy wrote: >>> >>>> Gabriel Genellina wrote: >>>>> That's

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-06 Thread Roel Schroeven
D340.PDF) -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Who makes up these rules, anyway?

2008-04-29 Thread Roel Schroeven
x27;s our tradition, too. I assumed it was a mix-up with the recent thread with the same name: http://groups.google.com/group/comp.lang.python/browse_thread/thread/f3832259c6da530 -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. --

Re: how many nested for can we utilize?

2008-08-17 Thread Roel Schroeven
hers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread Roel Schroeven
://www.py2exe.org/) for that. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: (in memory) database

2008-08-31 Thread Roel Schroeven
", "credits" or "license" for more information. >>> import sqlite3 >>> -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: (in memory) database

2008-09-01 Thread Roel Schroeven
Roel Schroeven schreef: Cameron Laird schreef: I now suspect that my 2.5 packaging has something to do with 64-bit builds; all my 32-bit Ubuntu servers have Python 2.5.2, while the 64-bit ones are at Python 2.5. Strange: my 64-bit Ubuntu 8.04 has Python 2.5.2, with working sqlite: (mine is

Re: Reading binary data

2008-09-10 Thread Roel Schroeven
ng and the first unsigned int. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: A bit OT: Python prompts display as nested mail quotes in Thunderbird

2006-03-09 Thread Roel Schroeven
ee further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: New python.org website

2006-03-14 Thread Roel Schroeven
IMO. If I can find a few spare minutes I might try to do put a bit more effort in it and send it in. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Find similar images using python

2006-03-30 Thread Roel Schroeven
able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   >