Re: Behavior of the for-else construct

2022-03-04 Thread Roel Schroeven
Op 4/03/2022 om 1:43 schreef Chris Angelico: Think of it like this: for item in search_list: if condition: pass else: print("Condition not true for this item") for item in search_list: if condition: break else: print("Condition not true for any item") There's a par

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-11 Thread Roel Schroeven
Op 11/03/2022 om 3:50 schreef Chris Angelico: On Fri, 11 Mar 2022 at 09:51, Cousin Stanley wrote: > The following will display a list of lxqt packages > that are in the repository and available to install > > apt-cache search lxqt | grep ^lxqt > Much faster: apt-cache pkgnames lxqt

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Roel Schroeven
Op 10/03/2022 om 13:16 schreef Loris Bennett: Hi, I have a command which produces output like the following: Job ID: 9431211 Cluster: curta User/Group: build/staff State: COMPLETED (exit code 0) Nodes: 1 Cores per node: 8 CPU Utilized: 01:30:53 CPU Efficiency: 83.63% of

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Roel Schroeven
Op 11/03/2022 om 10:11 schreef Roel Schroeven: Op 10/03/2022 om 13:16 schreef Loris Bennett: Hi, I have a command which produces output like the following:    Job ID: 9431211    Cluster: curta    User/Group: build/staff    State: COMPLETED (exit code 0)    Nodes: 1    Cores per node: 8    CPU

Re: ctypes And The WACAH Principle

2016-08-11 Thread Roel Schroeven
Lawrence D’Oliveiro schreef op 2016-08-10 03:45: ... so WACAH very much applies here. Pardon my ignorance, but what is the WACAH Principle? -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven

Re: degrees and radians.

2016-08-24 Thread Roel Schroeven
than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Bitstream -- Binary Data for Humans

2018-03-06 Thread Roel Schroeven
eceive it using simple NMEA 0183 serial sentences: see https://en.wikipedia.org/w/index.php?title=NMEA_0183&oldid=828034316#Message_structure -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- htt

Re: Python 3.7 Windows Help Behaviour

2018-07-02 Thread Roel Schroeven
e that this has been done: https://bugs.python.org/issue34006 Fixed now! To Terry Reedy and all others involved: thanks for quickly fixing this. Best regards, Roel -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger."

Guido van Rossum resigns as Python leader

2018-07-12 Thread Roel Schroeven
here, but I'm trying to let you all figure something out for yourselves. I'm tired, and need a very long break. > -- --Guido van Rossum (python.org/~guido) -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Roel Schroeven
one area where I feel Python 3 make things a bit more difficult. -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading EmailMessage from file

2018-07-16 Thread Roel Schroeven
did a bit more research than I had apparently done the first time around, and discovered the right way to create an email message from raw bytes. -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. J

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Roel Schroeven
Chris Angelico schreef op 16/07/2018 23:57: On Tue, Jul 17, 2018 at 7:50 AM, Roel Schroeven wrote: Steven D'Aprano schreef op 16/07/2018 2:18: On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: Python3 is intrinsically tied to Unicode for string handling. Therefore, the Python programm

Re: Cult-like behaviour [was Re: Kindness]

2018-07-17 Thread Roel Schroeven
Chris Angelico schreef op 17/07/2018 0:48: On Tue, Jul 17, 2018 at 8:41 AM, Roel Schroeven wrote: In any case, even though Python 3's byte strings are not quite unlike Python 2's strings, they're not exactly like them either. And I feel there are cases where that makes things

Re: So apparently I've been banned from this list

2018-10-01 Thread Roel Schroeven
m is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: So apparently I've been banned from this list

2018-10-02 Thread Roel Schroeven
Jon Ribbens schreef op 2/10/2018 om 1:20: On 2018-10-01, Roel Schroeven wrote: I'm not very active here, but I've been lurking for years. In my eyes Steven has always been active and helpful. Now he has *once* been a *tiny bit* rude, and he's banned for that? It's not

Re: Is this mailbox manipulation working by luck, or can't I understand my own code?

2018-10-13 Thread Roel Schroeven
ilobj defaults to None)." Watch out for headers with duplicate keys (like multiple Received: headers): use get_all() for those (https://docs.python.org/3/library/email.message.html#email.message.EmailMessage.get_all). -- "Honest criticism is hard to take, particularly from a relative,

Re: The next major Python version will be Python 8

2016-03-31 Thread Roel Schroeven
aking all their legacy code. "2016-03-31 23:40" You're 20 minutes early :) -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: The next major Python version will be Python 8

2016-03-31 Thread Roel Schroeven
Ethan Furman schreef op 2016-04-01 02:09: On 03/31/2016 05:02 PM, Roel Schroeven wrote: Victor Stinner schreef op 2016-03-31 23:40: Python 3 becomes more and more popular and is close to a dangerous point where it can become popular that Python 2. The PSF decided that it's time to elab

Re: revisiting the "What am I running on?" question

2019-02-20 Thread Roel Schroeven
om a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Lifetime of a local reference

2019-02-27 Thread Roel Schroeven
particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Lifetime of a local reference

2019-02-28 Thread Roel Schroeven
Rhodri James schreef op 28/02/2019 om 13:09: On 27/02/2019 21:39, Roel Schroeven wrote: Rhodri James schreef op 27/02/2019 om 15:18: Aren't we overthinking this? I think it's pretty clear that a variable is never deleted before it goes out of scope. A quick search in the documentat

Re: Losing words

2019-04-01 Thread Roel Schroeven
ot;PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) The recursive solution you used works at first but stops working with RecursionError when the maximum recursion depth is exceeded. -- "Honest criticism is hard to take, particularly

Re: PEP 594 cgi & cgitb removal

2019-05-25 Thread Roel Schroeven
t. At least not for any production website or web service that serves any real amount of traffic. That is, for those who didn't know, the reason why CGI fell out of use quite some time ago. -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquainta

Re: Namespaces: memory vs 'pollution'

2019-07-21 Thread Roel Schroeven
.. except envmod.PythonVersionError: # Handle the exception -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Re: Automatic translation of Python to assembly language

2019-09-08 Thread Roel Schroeven
uot;Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Get Count of function arguments passed in

2019-09-11 Thread Roel Schroeven
(*matrices): print(len(matrices)) -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Roel Schroeven
e like you. Don't correct them on things like this unless you can cite chapter and verse. You're doing yourselves a massive disservice by acting this way. Best regards, Roel -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a strange

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Roel Schroeven
re the file is properly closed even in the case of exceptions: def count_lines(filename): with open(filename, 'r') as f: return sum(1 for line in f) HTH -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread Roel Schroeven
an turn it off, in which cases single quotes are for string literals and double quotes are for identifiers (such as column names), as in standard SQL. See https://sqlite.org/quirks.html#double_quoted_string_literals_are_accepted -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a

Re: Enums are Singletons - but not always?

2020-05-23 Thread Roel Schroeven
about stuff that happens when comparing using identity. I would like to know where that comes from ... are there tutorials that encourage using identity checks? -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Fra

Re: Behaviour of os.path.join

2020-05-27 Thread Roel Schroeven
in about a function that converts an explicitly specified directory into a file :-) Again, a pathname is never inherently a directory or a file. -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Roel Schroeven
e 3.2 IIRC). -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Roel Schroeven
use a trailing / on the source directory. It's confusing indeed. -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Roel Schroeven
BlindAnagram schreef op 27/05/2020 om 22:55: On 27/05/2020 18:42, Roel Schroeven wrote: BlindAnagram schreef op 27/05/2020 om 18:53: Its not my bug to fix - the semantics of what I send is very clear on any Windows system. That's the first time I see any mention of those semantics, and

Re: why no camelCase in PEP 8?

2020-05-28 Thread Roel Schroeven
iticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-28 Thread Roel Schroeven
-- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-28 Thread Roel Schroeven
BlindAnagram schreef op 28/05/2020 om 11:00: On 27/05/2020 23:39, Roel Schroeven wrote: I find no hints of adding a backslash at the end to indicate directories. If you can point me to convincing evidence in the documentation I'll change my mind. And if you find a counterexample, I

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-10 Thread Roel Schroeven
criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: dict.get(key, default) evaluates default even if key exists

2020-12-20 Thread Roel Schroeven
except KeyError: return fnc(*args, **kwargs) some_var = dict_get_lazily(d, 'spam', some_function, 31, 11) -- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven -- https://mail.python.org/mailman/listinfo/python-list

Re: words relating to networks that I should probably know

2005-09-23 Thread Roel Schroeven
#x27; http://www.freesoft.org/CIE/ -- 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: What does pygame.Movie mean by `an MPEG file'?

2005-09-28 Thread Roel Schroeven
codecs. Nitpick: ogg is not an audio codec, but the container format of xiph.org. The lossy audio codec used in the project is called vorbis. Besides vorbis and flac there's also speex, designed for speech data. -- If I have been able to see further, it was only because I stood on the shou

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Roel Schroeven
oing to take the obvious route. We'll do it our own way, thank you very much :) I'm not taking it so far to start using Perl though. -- 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

Writing EXIF data

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

Re: Writing EXIF data

2005-09-30 Thread Roel Schroeven
Larry Bates schreef: > I've used jhead and wrapped it with os.system call. > > http://www.sentex.net/~mwandel/jhead/ Looks like it can do what I was looking for. Thanks a lot! -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaa

Re: Help with syntax warnings

2005-09-30 Thread Roel Schroeven
arnings.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: Reply-To header

2005-10-03 Thread Roel Schroeven
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: Reply-To header

2005-10-03 Thread Roel Schroeven
Peter Decker wrote: > On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>Indeed, and that's by design: http://www.unicom.com/pw/reply-to-harmful.html > > > Of course, that's only one side of the argument: > > http://www.blackgate.net/c

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
Peter Decker wrote: > On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>The default of this list is not to make conversations private; in fact >>the list doesn't have any default. It's you who chooses to send replies >>to the original auth

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
Mike Meyer wrote: > Roel Schroeven <[EMAIL PROTECTED]> writes: > >>Peter Decker wrote: >> >>>Setting the default Reply-To: to the list means that 'Reply' sends >>>just to the list (the desired behavior most of the time), and 'Reply &

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
antage. On the contrary; one can easily learn something from 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: Reply-To header

2005-10-04 Thread Roel Schroeven
Mike Meyer wrote: > Roel Schroeven <[EMAIL PROTECTED]> writes: > >>Is that really the desired behaviour? IMO the least you can do if you're >>searching for help is subscribing to the mailing list on which you're >>looking for help. Me and many others

Re: Confused with module and .py files

2005-10-05 Thread Roel Schroeven
honking great idea -- let's do more of those!" -- 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: /usr/bin/env python, force a version

2005-10-06 Thread Roel Schroeven
is not the default, in a way that works on all platforms. But I don't see how that should work. -- 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, alligator kill each other

2005-10-07 Thread Roel Schroeven
27;Python vs. Alligator' on Slashdot, I thought it was about some comparison between Python and an unknown-to-me programming language Alligator. -- 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: Jargons of Info Tech industry

2005-10-09 Thread Roel Schroeven
e possibility to track who opens their mails. -- 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: Microsoft Hatred FAQ

2005-10-16 Thread Roel Schroeven
ou make the point yourself now: if web based applications work with any browser, people can freely choose their distribution based on their own preferences. - An application works in IE, Firefox, Konqueror, Safari, Lynx, Links, Opera, ... -> users can use it with any browser on any OS - An application only works in IE -> users are forced to use Windows (or one of the other few OS's that IE exists on) -- 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: Microsoft Hatred FAQ

2005-10-16 Thread Roel Schroeven
John Bokma wrote: > Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>John Bokma wrote: > > >>>web based applications that work with any browser make OS irrelevant >>>-> not true, since for OpenOffice it doesn't matter which Linux >>

Re: Microsoft Hatred FAQ

2005-10-17 Thread Roel Schroeven
John Bokma wrote: > Roel Schroeven <[EMAIL PROTECTED]> wrote: >>But that's not the point; the point is that they have the choice. >>If MS had it its way, they wouldn't have that choice. > > > I doubt that. But even if you're right, do you really

Re: Microsoft Hatred FAQ

2005-10-17 Thread Roel Schroeven
John Bokma wrote: > Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>John Bokma wrote: >> >>>Roel Schroeven <[EMAIL PROTECTED]> wrote: >>> >>>>But that's not the point; the point is that they have the choice. >>>>If

Re: NTFS reparse points

2005-11-03 Thread Roel Schroeven
files that contain some information about the file or directory they point to and how to open it. -- 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: So, Which Version is Suitable for Beginners

2005-11-06 Thread Roel Schroeven
For the other questions it asks you can just use the default IIRC. -- 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: weird problem with os.chmod

2005-11-12 Thread Roel Schroeven
an be any permission) from a file. So he doesn't have the numerical value to begin with. BTW, I guess it's safer to do int(permission, 8) than int(permission, 0), since the first digit isn't guaranteed to be zero: it is used for set user ID, set group ID and the sticky 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: tutorial example

2005-11-12 Thread Roel Schroeven
nything, more or less analogue to functions returning void in C/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: Making immutable instances

2005-11-24 Thread Roel Schroeven
bviously. -- 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: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Roel Schroeven
ou why it freightened me at first: it made me think of the rigid formatting of Fortran 77 and to a lesser extent BASIC. But when I started working my way trough the tutorial, that fear very rapidly vanished. -- If I have been able to see further, it was only because I stood on the shoulders of gia

Re: The Industry choice

2005-01-06 Thread Roel Schroeven
have different terms. That's why there are different licenses. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-06 Thread Roel Schroeven
Alex Martelli wrote: Roel Schroeven <[EMAIL PROTECTED]> wrote: Can you point to closed-source licenses that allow using the code *at all*? As I recall, for example, Microsoft Visual C++ came with sources for various libraries; all that the (closed-source) license for those libraries forba

Re: Getting List Of All Filesystem Mounts

2005-01-08 Thread Roel Schroeven
Tim Daneliuk wrote: Is there some pure Python/portable way to get a list of all currently mounted filesystems? Check out MtPython: http://bebop.bigasterisk.com/python/docs/MtPython -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: windows mem leak

2005-01-09 Thread Roel Schroeven
main" is printed the first time, so I think the system needs all that time to create all the threads. It would be normal for memory use to keep increasing untill all threads are created, but I'm fairly certain memory use is still increasing now. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: windows mem leak

2005-01-09 Thread Roel Schroeven
Peter Hansen wrote: Roel Schroeven wrote: Peter Hansen wrote: How have you proven that it is not *that* program which is at fault?) It would surprise me: even if it consumes much CPU-time, memory and other resources, each instances returns all resources when it exits. I agree with that

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-14 Thread Roel Schroeven
but no formal definition (maybe it's a European phrase so searching for it in English is futile). I'm from Belgium, and I've never heard it before either. Probably a public secret, very carefully being kept hidden from us Belgians ;) -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-14 Thread Roel Schroeven
ed where an expression is expected. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-14 Thread Roel Schroeven
Antoon Pardon wrote: Op 2005-01-14, Roel Schroeven schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: IMO we have a: dogs are mamals kind of relationship in Python. I see what you mean, but I don't think it's true. Every expression can be used where a statement is expected. (And th

Re: Favorite non-python language trick?

2005-06-24 Thread Roel Schroeven
n, or removes the # again. But not all editors have such a feature, and even if they have it I still need to select the block of code every time. Not that big a deal though. -- 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: Newbie: Explain My Problem

2005-06-29 Thread Roel Schroeven
guess = (raw_input("Your guess is ")) The above line is incorrect: it should be guess = int(raw_input("Your guess is ")) -- 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: Does any one recognize this binary data storage format

2005-08-09 Thread Roel Schroeven
some kind of checksum perhaps? -- 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: Help with wxPython

2005-08-12 Thread Roel Schroeven
d in the documentation for wxChoice itself; it is described in the section for wxControlWithItems, which is wxChoice's base class. -- 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: OpenSource documentation problems

2005-08-30 Thread Roel Schroeven
erience is that I can find the needed information much easier in man pages. -- 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: OpenSource documentation problems

2005-09-06 Thread Roel Schroeven
What I've always done with MSDN: copy the whole thing from CD to HD, and do a minimal install from there. Then the help application can find everything without asking for the CDs. -- 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: Manging multiple Python installation

2005-09-08 Thread Roel Schroeven
h). -- 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: pretty windows installer for py scripts

2005-09-08 Thread Roel Schroeven
; and > everything just magically works ;) Innosetup (http://www.jrsoftware.org/isinfo.php) is quite good, and it's free (free as in beer, not free as in speech). -- 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: C#3.0 and lambdas

2005-09-19 Thread Roel Schroeven
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: C#3.0 and lambdas

2005-09-21 Thread Roel Schroeven
Christophe schreef: > Steve Holden a écrit : > >> Christophe wrote: >> >>> Serhiy Storchaka a écrit : >>> >>>> Roel Schroeven wrote: >> >> >> [...] >> >>>>> or >>>>> >>>>> def dr

Re: For American numbers

2005-02-12 Thread Roel Schroeven
us in the computer world who agree that 'kilo == 1024' is an abomination that should never have existed and which we should get rid of as fast as possible. As fast as possible is not very fast, unfortunately. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: For American numbers

2005-02-13 Thread Roel Schroeven
Peter Hansen wrote: Roel Schroeven wrote: Peter Hansen wrote: Scott David Daniels wrote: Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in ['kilo m

Re: os.walk()

2005-02-17 Thread Roel Schroeven
in mind that the comparisons are done case sensitive; are you sure that there's no problem regarding uppercase/lowercase? -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: netmask arithmetic?

2005-02-26 Thread Roel Schroeven
/25 > > ...and so on? http://pynms.sourceforge.net/ipv4.html -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda strangeness??

2005-02-27 Thread Roel Schroeven
op you are giving n exactly the values you intended it to have inside the lambda. Check what happens when you use a different loop variable: >>> for i in range(5): print adds[i](0) 9 9 9 9 9 I guess you could something like this instead: >>> adds=[] >>> for n in

Re: lambda strangeness??

2005-02-27 Thread Roel Schroeven
ed is what's happening... Your intent is to create lambda's that are equivalent to adds[0] = lambda y: y + 0 adds[1] = lambda y: y + 1 etc. but what actually happens is that you get lambda's that are equivalent to adds[0] = lambda y: y + n adds[1] = lambda y: y + n etc. which obv

Re: function expression with 2 arguments

2005-03-02 Thread Roel Schroeven
, b) Of course, you could just as well simply write a+b instead. Most often the lambda is not used directly, but passed to a function. A trivial example: def f(fn, a, b): return fn(a, b) f(lambda x, y: x+y, 3, 42) -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: rearrange text

2005-03-02 Thread Roel Schroeven
x27;2', '3', '4'] >>> fields[1], fields[2] = fields[2], fields[1] >>> fields ['1', '3', '2', '4'] >>> newvar = ','.join(fields) >>> newvar '1,3,2,4' -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: How would you program this?

2005-03-02 Thread Roel Schroeven
algebra, but I haven't tried > solving it. It's because solutions involving non-integer numbers are invalid in this context. And there are 12 unknowns but only 10 equations. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: substring matching

2005-03-02 Thread Roel Schroeven
M.N.A.Smadi wrote: > hi; > > say i have the following variable > > data="""XYZ dflsjdfkl sdfsdhfl > jdsflkdsjf > sldjfsldjf > """ > > i need to make sure that the first part is actually XYZ, is there an > easy way of doing that

Re: hidden attribute on Windows files

2005-03-07 Thread Roel Schroeven
hidethis already exists. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: variable arguments question

2005-03-15 Thread Roel Schroeven
7;: 2, 'b': 3} >>> efg(*l) (1, 2) -- 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: Lisp-likeness

2005-03-15 Thread Roel Schroeven
or example: >>> add4 = addn(4) >>> add10 = addn(10) >>> add4(5) 9 >>> add10(7) 17 >>> add4(add10(28)) 42 And so on. At least, I think that's what you mean. -- 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: newbie questions

2004-12-11 Thread Roel Schroeven
g over the whole length of the list, which means after some time you're accessing elements that no longer exist. One way to solve it is to loop backwards: first delete the last element, than the next to last, etc. Apart from that, it's much easier and clearer to reset the list

Re: Why are tuples immutable?

2004-12-15 Thread Roel Schroeven
mutable keys. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: ".>>>" is a good idea! (OT, was: Re: do you master list comprehensions?)

2004-12-16 Thread Roel Schroeven
e Quote Colors in Mozilla which is very nice for reading mails or news posts with quotes, but it's very confusing with Python's prompt. Prepending every line with . is not an ideal solution though... I think it gets tiresome very quickly. -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Skinnable/Stylable windows in wxPython?

2004-12-13 Thread Roel Schroeven
7;s an old version). One odd thing though: the Windows version doesn't react to clicking or dragging the mouse, which seems to be the expected behavior. The GTK version can be moved by dragging the mouse; even just clicking the mouse moves the window somewhat down and to the left. -- "C

<    1   2   3   4   5   >