Re: TABS in the CPython C source code

2010-02-06 Thread Alf P. Steinbach
* Nobody: On Sat, 06 Feb 2010 21:31:52 +0100, Alf P. Steinbach wrote: The size-8 tabs look really bad in an editor configured with tab size 4, as is common in Windows. I'm concluding that the CPython programmers configure their Visual Studio's to *nix convention. 8-column tabs aren

Re: Executing Commands From Windows Service

2010-02-07 Thread Alf P. Steinbach
* T: On Feb 7, 4:43 pm, Sean DiZazzo wrote: On Feb 7, 11:02 am, T wrote: I have a script, which runs as a Windows service under the LocalSystem account, that I wish to have execute some commands. Specifically, the program will call plink.exe to create a reverse SSH tunnel. Right now I'm us

Re: Modifying Class Object

2010-02-07 Thread Alf P. Steinbach
* Chris Rebert: On Sun, Feb 7, 2010 at 5:05 PM, T wrote: Ok, just looking for a sanity check here, or maybe something I'm missing. I have a class Test, for example: class Test: def __init__(self, param1, param2, param3): self.param1 = param1 self.param2 = param2 self.p

Re: Modifying Class Object

2010-02-07 Thread Alf P. Steinbach
* MRAB: Alf P. Steinbach wrote: * Chris Rebert: On Sun, Feb 7, 2010 at 5:05 PM, T wrote: Ok, just looking for a sanity check here, or maybe something I'm missing. I have a class Test, for example: class Test: def __init__(self, param1, param2, param3): self.param1 = p

Re: Modifying Class Object

2010-02-07 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * MRAB: Alf P. Steinbach wrote: * Chris Rebert: On Sun, Feb 7, 2010 at 5:05 PM, T wrote: Ok, just looking for a sanity check here, or maybe something I'm missing. I have a class Test, for example: class Test: def __init__(self, param1, p

Re: Modifying Class Object

2010-02-07 Thread Alf P. Steinbach
* Steven D'Aprano: On Mon, 08 Feb 2010 02:51:05 +0100, Alf P. Steinbach wrote: Python passes pointers by value, just as e.g. Java does. How do I get a pointer in pure Python code (no ctypes)? I tried both Pascal and C syntax (^x and *x), but both give syntax errors. Well, I don'

Re: Modifying Class Object

2010-02-07 Thread Alf P. Steinbach
* Steven D'Aprano: On Mon, 08 Feb 2010 03:21:11 +0100, Alf P. Steinbach wrote: A pointer tells you where something is; a reference doesn't. Sorry, I don't know of any relevant terminology where that is the case. Taken from Wikipedia: "A pointer is a simple, less abstr

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: [...] Alf: This topic was discussed at great, nay interminable, length about a year ago. I'd appreciate it if you would search the archives and read what was said then rather than hashing the whole topic over again to nobody&#

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* Diez B. Roggisch: Am 08.02.10 02:51, schrieb Alf P. Steinbach: * Chris Rebert: On Sun, Feb 7, 2010 at 5:05 PM, T wrote: Ok, just looking for a sanity check here, or maybe something I'm missing. I have a class Test, for example: class Test: def __init__(self, param1, param2, p

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* alex23: "Alf P. Steinbach" wrote: Hm. While most everything I've seen at effbot.org has been clear and to the point, that particular article reads like a ton of obfuscation. Must. Resist. Ad hominem. Python passes pointers by value, just as e.g. Java does. There, it neede

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* Stephen Hansen -> Alf P. Steinbach: [snip] To say, "pass by value" implies things to people. It describes a sort of world where I'm a function about to do some work, and on my desk I have a series of boxes with names on it. It describes an environment where someone co

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* Terry Reedy: On 2/8/2010 2:10 PM, Alf P. Steinbach wrote: I apologize for assuming that "pointer" is a known word to [c.l.p.] denizens. It is irrelevant. Python calls Python functions by associating argument objects (or objects derived therefrom) with paramenter names, very

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* Stephen Hansen: On Mon, Feb 8, 2010 at 8:01 PM, Alf P. Steinbach <mailto:al...@start.no>> wrote: * Stephen Hansen -> Alf P. Steinbach: [snip] To say, "pass by value" implies things to people. It describes a sort of world where I'm

Re: Modifying Class Object

2010-02-08 Thread Alf P. Steinbach
* Steven D'Aprano: On Tue, 09 Feb 2010 05:01:16 +0100, Alf P. Steinbach wrote: * Stephen Hansen -> Alf P. Steinbach: [snip] To say, "pass by value" implies things to people. It describes a sort of world where I'm a function about to do some work, and on my desk I have

Re: Modifying Class Object

2010-02-09 Thread Alf P. Steinbach
* Steven D'Aprano: On Tue, 09 Feb 2010 08:19:56 +0100, Alf P. Steinbach wrote: You don't have anything /but/ pointers in Python. x = 5 The above assigns to x a pointer to an object whose value is 5: x --> 5 y = "hello" Ditto result: y -->

Re: Modifying Class Object

2010-02-09 Thread Alf P. Steinbach
* Duncan Booth: "Alf P. Steinbach" wrote: A copyable reference is a pointer. That is, a "pointer", in e.g. the Java sense, and in the general language independent sense, means a copyable reference -- as illustrated e.g. in the Stanford computer science 101 course

Re: Modifying Class Object

2010-02-09 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Stephen Hansen: [...] I've heard that before, and have no idea why, nor any real interest in solving it: I don't want to read cpl via Usenet, and prefer to read it as a mailing list. Somewhere between Gmail->python.org->python.org &l

Re: Modifying Class Object

2010-02-09 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: * Stephen Hansen: [...] I've heard that before, and have no idea why, nor any real interest in solving it: I don't want to read cpl via Usenet, and prefer to read it as a mailing list. Somewhere bet

Re: ANN: obfuscate

2010-02-09 Thread Alf P. Steinbach
* David Robinow: On Tue, Feb 9, 2010 at 5:10 PM, Simon Brunning wrote: On 9 February 2010 16:29, Robert Kern wrote: On 2010-02-09 09:37 AM, Daniel Fetchinson wrote: If the code base stabilizes in a production version after losing the alphas and betas they would be a great addition to the std

Easter Eggs

2010-02-09 Thread Alf P. Steinbach
I know 3 Python Easter Eggs, from __future__ import braces import this help( "antigravity" ) Are there more? Cheers, - Alf -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying Class Object

2010-02-09 Thread Alf P. Steinbach
* Steven D'Aprano: On Tue, 09 Feb 2010 21:04:08 +0100, Alf P. Steinbach wrote: You thought you cold do a bit of ad hominem attack. That phrase you keep using, "ad hominem"... it doesn't mean what you seem to think it means. An ad hominem attack is not when somebody

Re: Personal criticisms and logical fallacies

2010-02-09 Thread Alf P. Steinbach
* Ben Finney: Steven D'Aprano writes: An ad hominem attack is not when somebody makes a criticism of you personally. It is when somebody says something along the lines of "Don't pay any attention to Alf, he doesn't know what he's talking about, he's a ". In other words, a criticism of the pe

Re: "if {negative}" vs. "if {positive}" style

2010-02-09 Thread Alf P. Steinbach
* Tim Chase: Larry Hudson wrote: But a minor rearrangement is simpler, and IMHO clearer: if 'mystring' not in s: print 'not found' else: print 'foundit' print 'processing' I've always vacillated on whether that would better be written as Larry does, or as if 'mystring' in

Re: Personal criticisms and logical fallacies

2010-02-09 Thread Alf P. Steinbach
* Ben Finney: "D'Arcy J.M. Cain" writes: On Wed, 10 Feb 2010 01:38:50 +0100 "Alf P. Steinbach" wrote: However, although in this particular case the Ad Hominems constituted logical fallacies, not all Ad Hominems are logical fallacies. Yes they are. Using the reput

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Stephen Hansen: On Tue, Feb 9, 2010 at 1:08 PM, Alf P. Steinbach <mailto:al...@start.no>> wrote: [abundant snips which do not accurately represent who said what where due to my own laziness] Not sure, but perhaps it's possible to mail directly

Re: "if {negative}" vs. "if {positive}" style

2010-02-10 Thread Martin P. Hellwig
On 02/10/10 03:36, Tim Chase wrote: Larry Hudson wrote: But a minor rearrangement is simpler, and IMHO clearer: if 'mystring' not in s: print 'not found' else: print 'foundit' print 'processing' I've always vacillated on whether that would better be written as Larry does, or as if 'mystring'

Re: Creating formatted output using picture strings

2010-02-10 Thread Alf P. Steinbach
* Olof Bjarnason: 2010/2/10 Peter Otten <__pete...@web.de>: pyt...@bdurham.com wrote: Does Python provide a way to format a string according to a 'picture' format? For example, if I have a string '123456789' and want it formatted like '(123)-45-(678)[9]', is there a module or function that wi

Re: New to Python

2010-02-10 Thread Martin P. Hellwig
On 02/10/10 10:53, Jean-Michel Pichavant wrote: Quin wrote: Well, now you know! All I know is that you are using a python implementation that does not support python 3. No wonder why your py3 code fails. You knew you known, you know :-) -- mph -- http://mail.python.org/mailman/listinfo/

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Duncan Booth: "Alf P. Steinbach" wrote: In CPython objects once created remain in the same memory location (and their id is their address). Compare that to IronPython where the objects themselves can move around in memory so they have no fixed address. Try comparing the

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 10 Feb 2010 09:13:22 +0100, Alf P. Steinbach wrote: You've dismissed at least one of my arguments with a simple hand-waving of, "That's invalid, cuz." That is not a quote of me. It is a lie. Alf, although your English in this forum has

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: [snip] Since in the quoting above no reference to definition of "pointer" remains: "pointer" refers to a copyable reference value as seen from the Python level, in the same way as "pointer" is used by e.g. the Java languag

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Ethan Furman: Steven D'Aprano wrote: Believe me Alf, the fact that people are taking the time to try to argue with you instead of just kill-filing you is a compliment. It's a compliment I am not paying, although I am grateful to those who are attempting to teach him. At the rate it's goi

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 10 Feb 2010 21:02:14 +0100, Alf P. Steinbach wrote: "pointer" refers to a copyable reference value as seen from the Python level, in the same way as "pointer" is used by e.g. the Java language spec. Python doesn't have "copya

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 10 Feb 2010 23:02:27 +0100, Alf P. Steinbach wrote: For a less likely more technical interpretation, as far as I know in Python there's just one case of a pointer that does not point to anything, namely as exemplified by def foo(): print( x )

Re: Get __doc__ from main module in imported module.

2010-02-10 Thread Alf P. Steinbach
* David: I have a module toolkit.py with some functions I use often. One of these functions displays a usage message (__doc__). def usage(messages=[], exit=-1): """Print the doc string as wells as any useful messages.""" print(__doc__) for message in messages: print("\033[91

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steve Holden: So now the whole thing boils down to "Alf against the world"? The reminds me of the story about the woman who went to see her son qualify from his basic army training. When asked what she thought of the parade she said it was very nice, but that "everyone but our Alf was out of s

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: [snip] Since in the quoting above no reference to definition of "pointer" remains: "pointer" refers to a copyable reference value as seen from the Python level, in the same way as "poi

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: So now the whole thing boils down to "Alf against the world"? The reminds me of the story about the woman who went to see her son qualify from his basic army training. When asked what she thought of the parade she said it was

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 10 Feb 2010 23:56:36 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: On Wed, 10 Feb 2010 21:02:14 +0100, Alf P. Steinbach wrote: "pointer" refers to a copyable reference value as seen from the Python level, in the same way as "pointer&

Re: Modifying Class Object

2010-02-10 Thread Alf P. Steinbach
* alex23: "Alf P. Steinbach" wrote: Telling someone to "learn to read" is a Steve Holden'sk way to imply that the person is an ignoramus who hasn't bothered to learn to read. Ad hominem. So, you are misrepresenting -- again -- and in a quite revealing w

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* I V: On Thu, 11 Feb 2010 07:37:35 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: s = [1] t = s # Binds the name t to the object bound to the name s. t[0] = 2 # Changes the object bound to the name t print(s) # Checks the object via the original name. Notice that

Re: Executing Commands From Windows Service

2010-02-11 Thread Martin P. Hellwig
On 02/07/10 19:02, T wrote: I have a script, which runs as a Windows service under the LocalSystem account, that I wish to have execute some commands. Specifically, the program will call plink.exe to create a reverse SSH tunnel. Right now I'm using subprocess.Popen to do so. When I run it inte

Re: method names nounVerb or verbNoun

2010-02-11 Thread Martin P. Hellwig
On 02/05/10 19:53, Wanderer wrote: Which is the more accepted way to compose method names nounVerb or verbNoun? For example voltageGet or getVoltage? getVoltage sounds more normal, but voltageGet is more like voltage.Get. I seem to mix them and I should probably pick one way and stick with it.

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steven D'Aprano: [...] accusing them of lying for having an opinion that differs from yours, That is untrue. Well, that says it all really. You seem to insinuate that I'm saying that Steven is lying, and/or that Steven is lying. Fr

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: [...] In this particular part of the thread I am attempting, unsuccessfully, to convince you that a change in *your* behavior would lead to less hostility directed towards the way you present your ideas. You apparently feel it is quite

Re: Is a merge interval function available?

2010-02-11 Thread Alf P. Steinbach
* Jonathan Gardner: On Feb 10, 3:23 pm, Peng Yu wrote: I'm wondering there is already a function in python library that can merge intervals. For example, if I have the following intervals ('[' and ']' means closed interval as inhttp://en.wikipedia.org/wiki/Interval_(mathematics)#Excluding_the_

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Terry Reedy: On 2/11/2010 1:37 AM, Alf P. Steinbach wrote: Consider just the assert( t is not s ) t = s Does this change anything at all in the computer's memory? By 'computer', do you mean 'anything that computes' (including humans) or specifically 'e

Re: Please help with MemoryError

2010-02-11 Thread Alf P. Steinbach
* Jeremy: I have been using Python for several years now and have never run into memory errors… until now. My Python program now consumes over 2 GB of memory and then I get a MemoryError. I know I am reading lots of files into memory, but not 2GB worth. I thought I didn't have to worry about

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Steven D'Aprano: On Thu, 11 Feb 2010 23:26:34 +0100, Alf P. Steinbach wrote: I presume you agree that the name 'Alf P. Steinbach' refers to you. Do you then consider it to be a 'reference' to you? Yes, and that's irrelevant, because you can't chang

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Martin P. Hellwig: Well at least you are well written and more subtle than Xah Lee. Though I find him also quite amusing, I do like a good flame-war every now and again, and in that perspective I solute you. The technical discussion is now at point where one poster maintains that

Re: Modifying Class Object

2010-02-12 Thread Martin P. Hellwig
Well at least you are well written and more subtle than Xah Lee. Though I find him also quite amusing, I do like a good flame-war every now and again, and in that perspective I solute you. -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying Class Object

2010-02-12 Thread Alf P. Steinbach
ation aspects, persisting in the face of corrections, have just, IMHO, been consistent attempts at misrepresentation. On Feb 11, 4:49 am, "Alf P. Steinbach" wrote: *The* standard general language independent definition? [ of pointer ] Yes. As defined where? For example, as I us

Re: Please help with MemoryError

2010-02-12 Thread Alf P. Steinbach
* Christian Heimes: mk wrote: Hmm how about "call by label-value"? Or "call by guido"? How do you like "call like a dutch"? :] Just a note: it might be more clear to talk about "pass by XXX" than "call by XXX". Unless you're talking about something else than argument passing. The standard

Re: Please help with MemoryError

2010-02-12 Thread Alf P. Steinbach
* Antoine Pitrou: Le Fri, 12 Feb 2010 17:14:57 +, Steven D'Aprano a écrit : What Python does is called "pass by sharing", or sometimes "pass by object reference". It is exactly the same as what (e.g.) Ruby and Java do, except that confusingly the Ruby people call it "pass by reference" and t

Re: Modifying Class Object

2010-02-12 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: You may note that that Wikipedia article refers to an article that I wrote about pointers in C++. It's a broken link, referring to a non-existent server. Yes, sorry. It's been that way a long time, and for the same reason my C++ tutorial,

Re: Please help with MemoryError

2010-02-12 Thread Alf P. Steinbach
* Antoine Pitrou: Le Fri, 12 Feb 2010 23:12:06 +0100, Alf P. Steinbach a écrit : Steven talks about the standard meaning of "pass by reference". See my answer to Steve's message. You can't postulate a "standard meaning" of "pass by reference" ind

Re: Modifying Class Object

2010-02-12 Thread Alf P. Steinbach
* Steven D'Aprano: On Fri, 12 Feb 2010 21:26:24 +0100, Alf P. Steinbach wrote: Yes, I do count this as a personal attack and flaming. The litmus test for that is that it says something very negative about the person you're debating with. As negative as accusing somebody of int

Re: Modifying Class Object

2010-02-12 Thread Alf P. Steinbach
* Mark Lawrence: Alf P. Steinbach wrote: An extremely long thread dedicated to the notion that there are no references in Python (which is blatantly false), coupled with personal attacks on the one person arguing that there are. I could easily think that you were having me on. Of course

Re: fork vs threading.Thread

2010-02-12 Thread Alf P. Steinbach
* Jordan Apgar: I'm trying to run two servers in the same program at once. Here are the two: class TftpServJ(Thread): def __init__(self, ip, root, port=69, debug = False ): Thread.__init__(self) setup stuff here def run(self): try: self.server.listen(

Re: How do you implement a Progress Bar

2010-02-12 Thread Alf P. Steinbach
* J Wolfe: I would really appreciate some help with this. I'm fairly new to using classes...What am I doing wrong? All I get is a blank window. I can't seem to figure out how to initialize this Progress Bar. Thanks, Jonathan ##file Meter.py fro

Re: python crash on windows but not on linux

2010-02-13 Thread Alf P. Steinbach
* hjebbers: I enlarged the windows page file from 750Kb to 1.5Gb . The crash still happens. btw, the crash does not happen at a peak memory usage. According to windows task manager, at the moment of crash mem usage of my program is 669kb, peak memory usage is 1.136kb henk-jan Probably you mean

Re: how do I write a scliceable class?

2010-02-13 Thread Alf P. Steinbach
* Ernest Adrogué: Hello everybody, I'm designing a container class that supports slicing. The problem is that I don't really know how to do it. class MyClass(object): def __init__(self, input_data): self._data = transform_input(input_data) def __getitem__(self, k

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Aahz: In article , Steve Holden wrote: Whether in CPython, Jython or IronPython the value returned by calling id(x) (whether x is a literal, a simple name or a more complex expression) is absolutely no use as an accessor: it does not give you access to the referenced value. If you disagree,

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Michael Sparks: [Due to the appearance of reasoned discussion (it's not practical to read it all!), I felt it necessary to respond. It turned out to be a long sequence of trivial fallacies, peppered with various allegations and insinuations.] [snip extremely much] Now let's move to the

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Michael Sparks: [Due to the appearance of reasoned discussion (it's not practical to read it all!) [...] Therefore to say "in reality the implementation will be passing a reference or pointer" is invalid. There is after a

Re: Selecting a file in a directory

2010-02-13 Thread Alf P. Steinbach
* vsoler: Hi, My python script needs to work with a .txt file in a directory. I would like to give the user the possibility to choose the file he needs to work on in as much the same way as I open a .xls file in Excel, that is, I want to make appear the "Windows'" window and let the user choose.

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Benjamin Kaplan: On Sat, Feb 13, 2010 at 7:50 PM, Alf P. Steinbach wrote: At this point consider whether it's possible to implement Pascal in Haskell. If it is possible, then you have a problem wrt. drawing conclusions about pointers in Pascal, uh oh, they apparently can't exist.

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Steve Howell: This thread is interesting on many levels. What is the core question that is being examined here? I think that regarding the technical it is whether a Python name refers to an object or not. I maintain that it does, and that the reference can be copied, and that the semantics

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: * Michael Sparks: [Due to the appearance of reasoned discussion (it's not practical to read it all!) [...] Therefore to say "in reality the implementation will be passing a reference or pointer&q

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Bruno Desthuilliers: Alf P. Steinbach a écrit : (snip) This group has an extraordinary high level of flaming and personal attacks Oh my... (snip remaining non-sense) Mr Steinbach, I bet you'll count this as another "flaming" and "personal attack", but nonetheless

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Aahz: In article , Alf P. Steinbach wrote: My original statement, with reference to the Java language spec, didn't say much more about the language than that it has assignable references. Assuming this is what you're referring to: Python passes pointers by value, just as

Re: Modifying Class Object

2010-02-13 Thread Alf P. Steinbach
* Steven D'Aprano: On Sat, 13 Feb 2010 21:33:50 -0800, Steve Howell wrote: You seem to be missing the point that "curly braces" is a concrete term that very specifically applies to spelling. And you seem to be missing the point that "pointer" is also a concrete term that very specifically ap

Re: Modifying Class Object

2010-02-14 Thread Alf P. Steinbach
* Ethan Furman: Steve Howell wrote: Going back to pointers vs. references, I think the key distinction being made is that pointers allow specific memory manipulation, although I think even there you're really just dealing with abstractions. The address 0x78F394D2 is a little bit closer to the

Re: hi can any one please help me..

2010-02-15 Thread Alf P. Steinbach
* chiranjeevi muttoju: Hi, when i'm installing the pytc(python wrapper for tokyo cabinet.) i'm getting the fallowing error.. i'm getting this error for python2.6 only.. for python 2.4 its working fine.. - running install running build running build_ext

Re: trouble installing matplotlib - syslibroot: multiply specified

2010-02-15 Thread Alf P. Steinbach
* katrine: Hope you guys don't mind a question about building matplotlib from a biologist who wants to learn how to use python. I am trying to install matplotlib on my mac with OS X 10.4.11, using python 2.6.4 and Xcode 2.2.1. I have had a few fights with freetype and Tkinter, and I think I've

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Alf P. Steinbach
* R (Chandra) Chandrasekhar: width = 5 height = 30 colors = ['#abcdef]', '#456789'] filename = "/tmp/image.png" # I want to get the equivalent of variable interpolation in Perl # so that the command # # convert -size 5x30 gradient:#abcdef-#456789 /tmp/image.png # # is derived from the variables

Re: Modifying Class Object

2010-02-15 Thread Alf P. Steinbach
* Steven D'Aprano: On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote: John Posner writes: [...] x = s[0] [...] assigns the name *x* to the object that *s[0]* refers to s[0] does not refer to an object, it *is* an object (once evaluated of course, otherwise it's just a Python e

Re: listing existing windows services with python

2010-02-15 Thread Alf P. Steinbach
* News123: Hi, What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties of a service as well. Thanks for any info and bye * Library: If there is some

Re: listing existing windows services with python

2010-02-15 Thread Alf P. Steinbach
* alex23: News123 wrote: What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties of a service as well. I highly recommend Tim Golden's fantastic WMI modu

Re: listing existing windows services with python

2010-02-15 Thread Alf P. Steinbach
* alex23: On Feb 16, 1:28 pm, "Alf P. Steinbach" wrote: It's probably Very Good, but one Microsoft-thing one should be aware of: using WMI functionality generally starts up a background WMI service... "Probably"? That means that since you say it's fant

Re: listing existing windows services with python

2010-02-16 Thread Alf P. Steinbach
* alex23: "Alf P. Steinbach" wrote: it's great that you provide the kind of help that you did, pointing out a probably very good module that it seems gives the required functionality, and giving an URL. Yes, because that's _actually helping people_ and not just contrib

Re: listing existing windows services with python

2010-02-16 Thread Alf P. Steinbach
* Tim Golden: On 16/02/2010 12:18, News123 wrote: I don't use the script often, so if it would start a WMI service during runtime and stop it afterwards it would be fine. FWIW -- your other considerations notwithstanding -- I'm not aware of WMI having this effect. Generally you can assume that

Re: listing existing windows services with python

2010-02-16 Thread Alf P. Steinbach
* Tim Golden: On 16/02/2010 12:48, Alf P. Steinbach wrote: I just googled the filename from memory, found http://www.neuber.com/taskmanager/process/wmiprvse.exe.html> Don't know if I've disabled it because invoking wmic didn't produce it. Uh, wait, since it hosts the

Re: listing existing windows services with python

2010-02-16 Thread Martin P. Hellwig
On 02/16/10 13:51, Alf P. Steinbach wrote: - Alf (is this off-topic for the group?) Strictly speaking yes, but I do find it interesting and there is nothing wrong with ignoring posts you don't like to read. -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: listing existing windows services with python

2010-02-16 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: [...] I'll do some further research to see what's going on there. Cheers, - Alf (is this off-topic for the group?) It's gone a lot further off than this without anyone complaining. I think your experiences to date should convince y

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-16 Thread Alf P. Steinbach
* Paul Rubin: John Nagle writes: However, things have changed, and lists and tuple *are* effectively mutable and hashable versions of each other... It's the concurrency aspect of this that interests me, though. A language with immutable objects can potentially handle concurrency more safely

Re: Can't Access ANY url from python (errno 61)

2010-02-19 Thread Martin P. Hellwig
On 02/19/10 21:48, MattB wrote: Hey all, I've been working on a program that accesses my school's password protected website and downloads directory names. I'm using mechanize. Recently, the program has been unable to open the website, returning the 'errno 61 connection refused' error. I presum

Re: Can't Access ANY url from python (errno 61)

2010-02-20 Thread Martin P. Hellwig
On 02/20/10 00:20, MattB wrote: Also, based on Martin's comment, I just wanted to make you all aware that I intend no misuse, but rather am just trying to learn, as I'm a programming noob. It wasn't my intention to imply that, rather the opposite, that if some BOFH would see your action as m

Re: Efficiently building ordered dict

2010-02-22 Thread Alf P. Steinbach
* Bryan: I am looping through a list and creating a regular dictionary. From that dict, I create an ordered dict. I can't think of a way to build the ordered dict while going through the original loop. Is there a way I can avoid creating the first unordered dict just to get the ordered dict?

How to get memory and CPU status of a particular process

2010-02-22 Thread R. P. Janaka
, that is exactly what I need to do :) Is this possible with python..? -- Regards, R. P. Janaka -- http://mail.python.org/mailman/listinfo/python-list

Re: What's Going on between Python and win7?

2010-02-22 Thread Alf P. Steinbach
* W. eWatson: So what's the bottom line? This link notion is completely at odds with XP, Well, Windows NT has always had *hardlinks*. I found it a bit baffling that that functionality is documented as not implemented for Windows in the Python standard library. But OK, it was non-trivial to

Re: What's Going on between Python and win7?

2010-02-22 Thread Alf P. Steinbach
* W. eWatson: On 2/22/2010 8:50 PM, Alf P. Steinbach wrote: * W. eWatson: So what's the bottom line? This link notion is completely at odds with XP, Well, Windows NT has always had *hardlinks*. I found it a bit baffling that that functionality is documented as not implemented for Wi

Re: Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

2010-02-22 Thread Alf P. Steinbach
* Paul Rubin: Steve Howell writes: My gut instinct is that functional programming works well for lots of medium sized problems and it is worth learning. I think it's worth learning because it will make you a better programmer even if you never use it for anything beyond academic exercises. I

Re: How to get memory and CPU status of a particular process

2010-02-22 Thread R. P. Janaka
Please can anyone help me..?? On Tue, Feb 23, 2010 at 9:18 AM, R. P. Janaka wrote: > Hi all, > > Is there a way to get system memory consumption and CPU consumption in a > platform independent way, using python...? > > Basically my requirement is, get the memory status a

Re: When will Python go mainstream like Java?

2010-02-23 Thread Martin P. Hellwig
Actually I am still waiting for Java to be mainstream :-) You could say it is popular, which it is without doubt but in my opinion after C handed over it's pseudo de facto standard (mostly because a lot of OS'es are written in it) nobody else has had enough momenta to reach for that crown. Ac

Re: scope of generators, class variables, resulting in global na

2010-02-24 Thread Alf P. Steinbach
* Nomen Nescio: Hello, Can someone help me understand what is wrong with this example? class T: A = range(2) B = range(4) s = sum(i*j for i in A for j in B) It produces the exception: : global name 'j' is not defined Which Python implementation are you using? I can't reproduce the er

Re: When will Python go mainstream like Java?

2010-02-24 Thread Martin P. Hellwig
On 02/24/10 16:05, Peter Parker wrote: Steve Holden wrote: At 12.34 pm on November 13, 2011 At December 21, 2012 at 11:11 am (according to the Maya calendar) On August 29, 1997, Java became mainstream. In a panic, Microsoft tried to embrace, extend and exterminate the system, prompting Sun

Re: When will Java go mainstream like Python?

2010-02-25 Thread Alf P. Steinbach
* sjdevn...@yahoo.com: On Feb 24, 8:05 pm, Lawrence D'Oliveiro wrote: In message , Wanja Gayk wrote: Reference counting is about the worst technique for garbage collection. It avoids the need for garbage collection. That's like saying that driving a VW Beetle avoids the need for an automob

Re: taking python enterprise level?...

2010-02-25 Thread Martin P. Hellwig
On 02/25/10 10:26, simn_stv wrote: what i am concerned about is scalability and efficiency, well, as far as the 'core' is concerned. would python be able to manage giving me a solid 'core' and will i be able to use python provide any API i would like to implement?... Python isn't the most eff

Re: taking python enterprise level?...

2010-02-25 Thread Martin P. Hellwig
On 02/25/10 13:58, D'Arcy J.M. Cain wrote: On Thu, 25 Feb 2010 02:26:18 -0800 (PST) Our biggest problem was in a network heavy element of the app and that was low level TCP/IP stuff that rather than being Python's problem was something we used Python to fix. Out off interest, could you elabo

<    8   9   10   11   12   13   14   15   16   17   >