Re: Overriding iadd for dictionary like objects

2009-08-30 Thread RunThePun
On Aug 30, 10:33 pm, a...@pythoncraft.com (Aahz) wrote: > In article > , > > > > > > RunThePun   wrote: > > >I made a DictMixin where the keys are filenames and the values are the > >file contents. It was very simple and easy to do thanks to DictMixin. > > >For example this code writes "abc" in a

Re: why python got less developers ?

2009-08-30 Thread Erik Reppen
It seems to be a language embraced by people who enjoy coding. Not so much by the time-spent-seeking-degree to paycheck ratio balancing crowd. Or maybe I just hate bloated IDEs and I've heard too many Java dev jokes to be impartial. -- http://mail.python.org/mailman/listinfo/python-list

Re: map

2009-08-30 Thread Wolfgang Strobl
elsa : >now, say I want to map myFunc onto myList, with always the same >argument for b, but iterating over a: >>> from functools import partial >>> def g(x,y=1): return x+y ... >>> map(partial(g,y=2),[1,2]) [3, 4] >>> map(partial(g,y=42),[1,2]) [43, 44] -- Wir danken für die Beachtung aller S

Re: connect to ms sql server with odbc

2009-08-30 Thread Sean DiZazzo
On Aug 30, 10:08 pm, mierdatutis mi wrote: > Hi, > > I'm newbie in python. I try to connect to remote server with ms sql > server from my ubuntu. I install pyodbc and I do: > >  >>> conn = >>> Conn = >  pyodbc.connect("DRIVER= > {FreeTDS};SERVER=defekas62;UID=emuser;PWD=temporal;DATABASE=em620") >

Re: map

2009-08-30 Thread rurpy
On 08/30/2009 10:55 PM, elsa wrote: > i have a question about the built in map function. Here 'tis: > > say I have a list, myList. Now say I have a function with more than > one argument: > > myFunc(a, b='None') > > now, say I want to map myFunc onto myList, with always the same > argument for b, b

Re: map

2009-08-30 Thread Chris Rebert
On Sun, Aug 30, 2009 at 9:55 PM, elsa wrote: > Hi, > > i have a question about the built in map function. Here 'tis: > > say I have a list, myList. Now say I have a function with more than > one argument: > > myFunc(a, b='None') > > now, say I want to map myFunc onto myList, with always the same >

connect to ms sql server with odbc

2009-08-30 Thread mierdatutis mi
Hi, I'm newbie in python. I try to connect to remote server with ms sql server from my ubuntu. I install pyodbc and I do: >>> conn = >>> Conn = pyodbc.connect("DRIVER= {FreeTDS};SERVER=defekas62;UID=emuser;PWD=temporal;DATABASE=em620") pyodbc.connect ( "DRIVER = () FreeTDS; SERVER = defekas62;

map

2009-08-30 Thread elsa
Hi, i have a question about the built in map function. Here 'tis: say I have a list, myList. Now say I have a function with more than one argument: myFunc(a, b='None') now, say I want to map myFunc onto myList, with always the same argument for b, but iterating over a: map(myFunc(b='booHoo'),

Re: why python got less developers ?

2009-08-30 Thread r
On Aug 29, 11:14 pm, kennyken747 wrote: (snip) > You guys can say anything you'd like it to be in this thread, but the > actual reason comes down to > 1. No marketing. Seriously, if Microsoft was pushing Python it would > obviously be a lot bigger in terms of developers. I really don't care if 10

Re: What python can NOT do?

2009-08-30 Thread John Nagle
exar...@twistedmatrix.com wrote: On 10:23 pm, a...@pythoncraft.com wrote: In article <4a998465$0$1637$742ec...@news.sonic.net>, John Nagle wrote: Personally, I consider Python to be a good language held back by too-close ties to a naive interpreter implementation and the lack of a formal

Re: Reading binary files

2009-08-30 Thread Dan Stromberg
David Robinow wrote: This works for a simple binary file, but the actual file I'm trying to read is give throwing an error that the file cannot be found. Here is the name of the my file: 2009.08.02_06.52.00_WA-1_0001_00_0662_0.jstars Should python have trouble reading this file name or extension

Re: why python got less developers ?

2009-08-30 Thread Tim Roberts
Esam Qanadeely wrote: >On Aug 28, 8:27 am, Tim Roberts wrote: >> Deep_Feelings wrote: >> >> >python got relatively fewer numbers of developers than other high >> >level languages like .NET , java .. etc  why ? >> >> How do you know, and why does it matter? >> >> By the way, .NET is not a languag

Re: Popen question (redundant processes)

2009-08-30 Thread Gabriel Genellina
En Sun, 30 Aug 2009 17:25:40 -0300, Chris Rebert escribió: On Sun, Aug 30, 2009 at 12:33 PM, Sebastian wrote: Hello World! This is my first post on the list and I'm hoping it is the right forum and not OT, I've searched a bit on this, but, none-the-wiser! My question is on the Popen meth

Re: initilize a memory zone in python

2009-08-30 Thread r
On Aug 30, 4:59 pm, Mug wrote: (snip) > is there a fonction like "memset" or "bzero" in python? Not that i know of ;). Try this link for a coverage of the Python built-in functions. You cannot write quality Python code without them. http://docs.python.org/3.1/library/functions.html What you refe

Re: Nice copy in interactive terminal

2009-08-30 Thread casebash
I managed to get some more answers here: http://stackoverflow.com/questions/1352886/nice-copying-from-python-interpreter On Aug 14, 5:05 pm, casebash wrote: > I mainly develop on Linux these days, but if I ever end up doing > anything on windows I'll make sure to look at that. > > On Aug 13, 6:5

Re: initilize a memory zone in python

2009-08-30 Thread Grant Edwards
On 2009-08-31, Grant Edwards wrote: > If you want a configuration that's all zeros, why bother > calling tcgetattr() at all? Just set the configuration to > zeros: > > term_conf = [0,0,0,0,0,0] Oops, I forgot about cc. That should be: term_conf = [0,0,0,0,0,0,['\x00']*32] That's why it's e

Re: initilize a memory zone in python

2009-08-30 Thread Grant Edwards
On 2009-08-30, Mug wrote: > hello, i'm new in python, i used to program in C, i have a > small problem, i tryed to do some serial port things You're probably better off just using pyserial: http://pyserial.sourceforge.net/ If you really want to muck about with termios stuff, you can look at

Re: ubuntu dist-packages

2009-08-30 Thread David Lyon
On Thu, 27 Aug 2009 07:05:51 -0700 (PDT), Paul Boddie wrote: > No, it's the problem of the Pythonic packaging brigade that package > retrieval, building and installing is combined into one unsatisfactory > whole. Brigade? That implies a disciplined and systematic approach.. I would suggest a be

Re: Colors on IDLE

2009-08-30 Thread r
On Aug 28, 6:27 pm, r wrote: > Have you tried saving the files as MYScriptName.py? notice the py > extension, very important ;) Just for fun try the .pyw extension and observe the result. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGTK problems after Linux update...

2009-08-30 Thread barcaroller
"Thomas Guettler" wrote in message news:7fq56df2m6ql...@mid.individual.net... > Looks like your pygtk package does not fit to the installed python > package. Okay, I won't disagree, but how do I fix this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Combining C and Python programs

2009-08-30 Thread Cousin Stanley
> I want to write a program that will use ode for the physics > simulation, whose python bindings are outdated. So I'm writing > the physics engine in C and want to write the drawing code in > Python. What will be the best way of making those two programs > work together? THe physics engine w

Re: Why does this group have so much spam?

2009-08-30 Thread Terry Reedy
Nobody wrote: Apart from the impossibility of implementing such a tax, it isn't going to discourage spammers when the tax will be paid by the owner of the compromised PC from which they're sending their spam. It would encourge PC owners to not let their machine be used as a spambot. -- http:/

Re: Why does this group have so much spam?

2009-08-30 Thread Terry Reedy
Byung-Hee HWANG wrote: casebash writes: So much of it could be removed even by simple keyword filtering. Use python-list@python.org [1], instead. [1] http://mail.python.org/mailman/listinfo/python-list Or read python-list as a newsgroup via news.gmane.org, which mirrors python-list, not

Re: quantiles of a student distribution

2009-08-30 Thread Terry Reedy
Pierre wrote: Hello... Do you know how I can calculate the quantiles of a student distribution in pyhton ? Try searching the net for 'Python student distribution quantiles' -- http://mail.python.org/mailman/listinfo/python-list

Re: initilize a memory zone in python

2009-08-30 Thread Mug
On Aug 30, 8:58 pm, "Diez B. Roggisch" wrote: > Mug schrieb: > > > hello, i'm new in python, i used to program in C, > > i have a small problem, i tryed to do some serial port things > > manipulation > > with python. > > i have something like: > > > import sys,termios > > > fd = sys.stdin.fileno()

Re: PyGTK problems after Linux update...

2009-08-30 Thread barcaroller
"Thomas Guettler" wrote in message news:7fq56df2m6ql...@mid.individual.net... > Looks like your pygtk package does not fit to the installed python > package. Okay, I won't disagree, but I how do if fix this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending email

2009-08-30 Thread John Haggerty
I would concur On Fri, Aug 28, 2009 at 9:49 AM, 7stud wrote: > On Aug 28, 8:18 am, Fencer > wrote: > > 7stud wrote: > > > > [snip] > > > > Thanks for your reply. After consulting the sysadmins here I was able to > > get it to work. > > > > - Fencer > > > Ok, but how about posting your code so t

Re: IDE for python similar to visual basic

2009-08-30 Thread Nobody
On Sun, 30 Aug 2009 10:48:24 -0700, r wrote: > I think a point and click GUI builder (although some may disagree) is > actually detrimental to your programming skills. The ability to > visualize the GUI only from the source code as you read it, is as > important to a programmer as site reading she

Re: initilize a memory zone in python

2009-08-30 Thread Diez B. Roggisch
Mug schrieb: hello, i'm new in python, i used to program in C, i have a small problem, i tryed to do some serial port things manipulation with python. i have something like: import sys,termios fd = sys.stdin.fileno() term_conf=termios.tcgetattr(fd); now i want to modify the actuall values in t

Re: Is behavior of += intentional for int?

2009-08-30 Thread Carl Banks
On Aug 30, 10:27 am, Derek Martin wrote: > On Sun, Aug 30, 2009 at 03:52:36AM -0700, Paul McGuire wrote: > > > It is surprising how many times we > > > think things are "intuitive" when we really mean they are "familiar". > > > Of course, just as I was typing my response, Steve D'Aprano beat me to

initilize a memory zone in python

2009-08-30 Thread Mug
hello, i'm new in python, i used to program in C, i have a small problem, i tryed to do some serial port things manipulation with python. i have something like: import sys,termios fd = sys.stdin.fileno() term_conf=termios.tcgetattr(fd); now i want to modify the actuall values in term_conf zone

Re: Popen question (redundant processes)

2009-08-30 Thread Chris Rebert
On Sun, Aug 30, 2009 at 12:33 PM, Sebastian wrote: > Hello World! > This is my first post on the list and I'm hoping it is the right forum and > not OT, I've searched > a bit on this, but, none-the-wiser! > > My question is on the Popen method, here is my snippet: > >> p1 = Popen(["cat", "georgi_dd

port of GWT GChart to python pyjamas

2009-08-30 Thread lkcl
the excellent GWT Chart Library, GChart: http://code.google.com/p/gchart/ is being ported to python, to run under the pyjamas [desktop / web] widget set: http://pyjamas.svn.sourceforge.net/viewvc/pyjamas/trunk/library/pyjamas/chart/ approximately 15 of the 30 examples and 1 of the 90 test

Re: Thread Pool

2009-08-30 Thread Stephen Hansen
On Sun, Aug 30, 2009 at 1:06 PM, John Haggerty wrote: > twisted? I don't get it > Twisted. Big library / framework for network'd applications. Specifically, asynchronous network'd applications, really. --S -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Pool

2009-08-30 Thread John Haggerty
twisted? I don't get it On Sun, Aug 30, 2009 at 1:55 PM, Stephen Hansen wrote: > > On Sun, Aug 30, 2009 at 9:56 AM, Vitaly Babiy wrote: > >> Hey, >> Any one know of a good thread pool library. I have tried a few but they >> don't seem to clean up after them selfs well. >> >> Thanks, >> Vitaly Ba

Re: Thread Pool

2009-08-30 Thread Stephen Hansen
On Sun, Aug 30, 2009 at 9:56 AM, Vitaly Babiy wrote: > Hey, > Any one know of a good thread pool library. I have tried a few but they > don't seem to clean up after them selfs well. > > Thanks, > Vitaly Babiy > > As obscene as it seems, I actually use twisted's :) I mean, it's obscene not becaus

Re: An assessment of the Unicode standard

2009-08-30 Thread Stephen Hansen
> > So why the heck are we supporting such capitalistic implementations as > Unicode. Sure we must support a winders installer but Unicode, dump > it! We don't support a Python group in Chinese or French, so why this? > Makes no sense to me really. Let M$ deal with it. > Who, exactly, do you think

Popen question (redundant processes)

2009-08-30 Thread Sebastian
Hello World! This is my first post on the list and I'm hoping it is the right forum and not OT, I've searched a bit on this, but, none-the-wiser! My question is on the Popen method, here is my snippet: p1 = Popen(["cat", "georgi_ddr7_allmag_kcor_in_test.dat"], stdout=PIPE ) > p2 = Popen(["fit_coe

Re: Overriding iadd for dictionary like objects

2009-08-30 Thread Aahz
In article , RunThePun wrote: > >I made a DictMixin where the keys are filenames and the values are the >file contents. It was very simple and easy to do thanks to DictMixin. > >For example this code writes "abc" in a file named "temp.txt" and >prints the contents of the file named "swallow", the

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Chris Colbert
Great! That was the solution I was looking for. Thanks! Chris On Sun, Aug 30, 2009 at 12:29 PM, Christian Heimes wrote: > Chris Colbert wrote: >> Is there a way to fix this so that the local dist-packages is added to >> sys.path before the system directory ALWAYS? I can do this by editing >> site

Re: Is behavior of += intentional for int?

2009-08-30 Thread Steven D'Aprano
On Sun, 30 Aug 2009 12:04:45 -0500, Derek Martin wrote: > On Sun, Aug 30, 2009 at 03:42:06AM -0700, Paul McGuire wrote: >> Python binds values to names. Always. > > No, actually, it doesn't. It binds *objects* to names. This > distinction is subtle, but important, as it is the crux of why this

Re: How to install setuptools...egg?

2009-08-30 Thread Rolf
Mike schrieb: I would like to install setuptools for Python2.6 on Windows. 1. Download setuptools-0.6c9-py2.6.egg 2. Download setuptools-0.6c9.tar.gz 3. Use 7-zip from http://www.7-zip.org/ to extract ez_setup.py from setuptools-0.6c9.tar.gz 4. In a directory that contains setuptools-0.6c9-py2

quantiles of a student distribution

2009-08-30 Thread Pierre
Hello... Do you know how I can calculate the quantiles of a student distribution in pyhton ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Why does this group have so much spam?

2009-08-30 Thread casebash
So much of it could be removed even by simple keyword filtering. -- http://mail.python.org/mailman/listinfo/python-list

Re: your favorite debugging tool?

2009-08-30 Thread Ben Finney
Hendrik van Rooyen writes: > And the final arbiter is of course the interactive prompt. Oh yes, of course I forget to mention that! Write your code so it can be imported, and write your functionality so it has narrow interfaces, and you can do whatever inspection is needed from the interactive

Re: mod_python: Permission denied

2009-08-30 Thread David
Thanks Graham. Let me contact Admin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-08-30 Thread Nobody
On Sun, 30 Aug 2009 11:18:35 +0200, David wrote: >> So much of it could be removed even by simple keyword filtering. > > I think there is only one final solution to the spam pestilence: a tiny tax > on email and posts. > Spammers send hundreds of thousands of emails/posts a day and a tax of > 0.0

Re: Why does this group have so much spam?

2009-08-30 Thread David
Il Sat, 29 Aug 2009 17:18:46 -0700 (PDT), casebash ha scritto: > So much of it could be removed even by simple keyword filtering. I think there is only one final solution to the spam pestilence: a tiny tax on email and posts. Spammers send hundreds of thousands of emails/posts a day and a tax of

Re: Web Services examples using "raw" xml?

2009-08-30 Thread John Gordon
In <4a92ee38$0$1627$742ec...@news.sonic.net> John Nagle writes: > John Gordon wrote: > > I'm developing a program that will use web services, which I have never > > used before. > Web services in general, or some Microsoft interface? Microsoft. Exchange Web Services, specifically. -- Jo

Re: Sending email

2009-08-30 Thread 7stud
On Aug 28, 8:18 am, Fencer wrote: > 7stud wrote: > > [snip] > > Thanks for your reply. After consulting the sysadmins here I was able to > get it to work. > > - Fencer Ok, but how about posting your code so that a future searcher will not be left screaming, "WHAT THE EFF WAS THE SOLUTION!!" --

Re: Python/Fortran interoperability

2009-08-30 Thread nmm1
In article , sturlamolden wrote: > >You also made this claim regarding Fortran's C interop with strings: > >"No, I mean things like 'Kilroy was here'. Currently, Fortran's C >interoperability supports only strings of length 1, and you have >to kludge them up as arrays. That doesn't work very we

Re: Python/Fortran interoperability

2009-08-30 Thread Richard Maine
sturlamolden wrote: > On 23 Aug, 20:42, n...@cam.ac.uk wrote: > > > That is precisely what I am investigating. TR 29113 falls a LONG > > way before it gets to any of the OOP data - indeed, you can't even > > pass OOP derived types as pure data (without even the functionality) > > in its model.

Re: Python/Fortran interoperability

2009-08-30 Thread nmm1
In article <1032c78d-d4dd-41c0-a877-b85ca000d...@g31g2000yqc.googlegroups.com>, sturlamolden wrote: >On 23 Aug, 12:35, n...@cam.ac.uk wrote: > >> I am interested in surveying people who want to interoperate between >> Fortran and Python to find out what they would like to be able to do >> more co

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-30 Thread Mel
Mensanator wrote: [ ... ] >> If you want your data file to have values entered in hex, or oct, or even >> unary (1=one, 11=two, 111=three, =four...) you can. > > Unary? I think you'll find that Standard Positional Number > Systems are not defined for radix 1. It has to be tweaked. If the onl

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-30 Thread Piet van Oostrum
> Mensanator (M) wrote: >M> That's my point. Since the common usage of "binary" is for >M> Standard Positional Number System of Radix 2, it follows >M> that "unary" is the common usage for Standard Positional >M> Number System of Radix 1. That's VERY confusing since such >M> a system is undef

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-30 Thread Steven D'Aprano
On Thu, 27 Aug 2009 10:49:27 -0700, Mensanator wrote: > Fine. I'm over it. Point is, I HAVE encountered plenty of people who > DON'T properly understand it, Marilyn Vos Savant, for example. I'm curious -- please explain. Links please? > You can't > blame me for thinking you don't understand it

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-30 Thread Mensanator
On Aug 26, 4:59 pm, Piet van Oostrum wrote: > > Mensanator (M) wrote: > >M> That's my point. Since the common usage of "binary" is for > >M> Standard Positional Number System of Radix 2, it follows > >M> that "unary" is the common usage for Standard Positional > >M> Number System of Radix 1.

Re: Move dictionary from instance to class level

2009-08-30 Thread Frank Millman
Anthony Tolle wrote: > To take things one step further, I would recommend using decorators to > allow symbolic association of functions with the message identifiers, > as follows: > [...] That's neat. Thanks. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Move dictionary from instance to class level

2009-08-30 Thread Frank Millman
"Frank Millman" wrote: Apologies for the triple-post. I use google-groups for reading c.l.py, but I know that some people reject messages from there due to the volume of spam, so on the odd occasion when I want to send something I fire up Outlook Express and send it from there. It seems to b

Re: Learning Python advanced features

2009-08-30 Thread Michel Claveau - MVP
Bonsoir ! Tu aurais peut-être dû répondre en anglais (pour certains, "advanced features", c'est mieux que "concepts sophistiqués"). @+ MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I insert a menu item in an existing menu.

2009-08-30 Thread John Ladasky
You might want to direct your wxPython questions to the dedicated wxPython newsgroup. It's Google-only, and thus not part of the Usenet hierarchy. But it's the most on-topic newsgroup you will find. http://groups.google.com/group/wxpython-users I attempted to crosspost this article to wx-python

Re: Does Class implements Interface?

2009-08-30 Thread Emanuele D'Arrigo
Jonathan, Stephen and Max, thank you all for the tips and tricks. Much appreciated. Manu -- http://mail.python.org/mailman/listinfo/python-list

Re: An assessment of the Unicode standard

2009-08-30 Thread r
Would someone please point me to one example where this sociology or anthropology crap has ever improved our day to day lives or moved use into the future with great innovation? A life spend studying this mumbo-jumbo is a complete waste of time when many other far more important and *real* problems

Re: An assessment of the Unicode standard

2009-08-30 Thread r
On Aug 30, 10:09 am, Paul Boddie wrote: > On 30 Aug, 14:49, r wrote: Then you aren't paying attention. ...(snip: defamation of character) Hold the phone Paul you are calling me a retarded bigot and i don't much appreciate that. I think you are completely misinterpreting my post. i and i ask you

Re: An assessment of the Unicode standard

2009-08-30 Thread r
On Aug 30, 7:11 am, Hendrik van Rooyen wrote: (snip) > I suspect that the alphabet is not ideal for representing the sounds of _any_ > language, and I would look for my proof in the plethora of things that we use > when writing, other than the bare A-Z.   - Punctuation, diacritics... It can be ma

Re: An assessment of the Unicode standard

2009-08-30 Thread John Machin
On Aug 30, 4:47 pm, Dennis Lee Bieber wrote: > On Sun, 30 Aug 2009 14:05:24 +1000, Anny Mous > declaimed the following in gmane.comp.python.general: > > > Have you thought about the difference between China, with one culture and > > one spoken language for thousands of years, and Europe, with doz

Re: An assessment of the Unicode standard

2009-08-30 Thread r
On Aug 29, 7:22 pm, Neil Hodgson wrote: >    Wow, I like this world you live in: all that altruism! Well if i don't who will? *shrugs* > Unicode was > developed by corporations from the US left coast in order to sell their > products in foreign markets at minimal cost. So why the heck are we s

Re: An assessment of Tkinter and IDLE

2009-08-30 Thread r
Thanks eb303 for the wonderful post I have looked over the new ttk widgets and everything looks nice. I am very glad to see the death of Tix as i never much liked it anyhow and always believed these widgets should have been in the main Tkinter module to start with. The tree widget has been needed

Python/Fortran interoperability

2009-08-30 Thread nmm1
I am interested in surveying people who want to interoperate between Fortran and Python to find out what they would like to be able to do more conveniently, especially with regard to types not supported for C interoperability by the current Fortran standard. Any suggestions as to other ways that

Re: An assessment of the Unicode standard

2009-08-30 Thread Jan Kaliszewski
30-08-2009 o 14:11:15 Hendrik van Rooyen wrote: a nightmare of Orwellian proportions - because the language you get taught first, moulds the way you think. And I know from personal experience that there are concepts that can be succinctly expressed in one language, that takes a lot of word

Re: Why does this group have so much spam?

2009-08-30 Thread Miles Kaufmann
"casebash" wrote in message news:7294bf8b-9819-4b6d-92b2- afc1c8042...@x6g2000prc.googlegroups.com... So much of it could be removed even by simple keyword filtering. Funny, I was just thinking recently about how *little* spam this list gets--on the other hand, I'm following it via the pyth

a popen command line question

2009-08-30 Thread Joni Lee
Hi all, I write a small script status = os.popen('top').readlines() print status It calls the command line "top" and will print out the status. But I have to press the keyboard "q" to quit "top", then the status will be printed, otherwise it just stands by with blank. Question is. Do you know

Suggestion

2009-08-30 Thread Thangappan.M
Dear all, I am in the process of learning Python programming language. I know Perl,PHP. Compare to both the language Python impressed me because here there is no lexical variables and all.Now I need suggestion saying that , What online book can I follow? I have not yet learnt an

Re: Overriding iadd for dictionary like objects

2009-08-30 Thread Jan Kaliszewski
PS. Sorry for sending 2 posts -- the latter is the correct one. Cheers, *j -- http://mail.python.org/mailman/listinfo/python-list

WEB PROGRAMMER ANALYST (with Python knowledge) for Laval, Quebec needed.

2009-08-30 Thread Marc-André Ouellette
To whom it may concern, ABP Personnel Consultants is a recruiting firm established in Montreal. We presently have a need for a web programmer with knowledge of Python. Below is the job description : Our client offers much more than simple Internet advertising and website design. They are

Re: Annoying octal notation

2009-08-30 Thread Hendrik van Rooyen
On Monday 24 August 2009 16:14:25 Derek Martin wrote: > In fact, now that I think of it... > > I just looked at some old school papers I had tucked away in a family > album. I'm quite sure that in grammar school, I was tought to use a > date format of 8/9/79, without leading zeros. I can't prove

Re: your favorite debugging tool?

2009-08-30 Thread Michiel Overtoom
Esmail wrote: What is your favorite tool to help you debug your code? import pdb pdb.set_trace() pdb has commands to inspect code, variables, set breakpoints, watches, walk up and down stack frames, single-step through the program, run the rest of the function, run until return, etc... h

Re: Is behavior of += intentional for int?

2009-08-30 Thread Derek Martin
On Sun, Aug 30, 2009 at 05:43:42PM +, OKB (not okblacke) wrote: > Derek Martin wrote: > > > If Python is to say that objects have values, > > then the object can not *be* the value that it has, because that is a > > paradoxical self-reference. It's an object, not a value. > > But does

Re:a popen question. Please help

2009-08-30 Thread ivanko . rus
First, I think you should use subprocess.Popen (it's recommended by PEP-324) instead of os.popen. For example: p = subprocess.Popen(["top"], stdout = PIPE) p.stdout.readlines() And to write to stdin (in your case "q") you can use p.stdin.write("q"), or terminate the process with p.terminate(

Re: An assessment of the Unicode standard

2009-08-30 Thread Nobody
On Sat, 29 Aug 2009 22:14:55 -0700, John Nagle wrote: > (I wish the HTML standards people would do the same. HTML 5 > should have been ASCII only (with the "&" escapes if desired) > or Unicode. No "Latin-1", no upper code pages, no JIS, etc.) IOW, you want the HTML standards to continue to

Re: What python can NOT do?

2009-08-30 Thread Nobody
On Sat, 29 Aug 2009 23:07:17 +, exarkun wrote: >>>Personally, I consider Python to be a good language held back by >>>too-close ties to a naive interpreter implementation and the lack >>>of a formal standard for the language. >> >>Name one language under active development that has not bee

Non-deterministic computing (was: What python can NOT do?)

2009-08-30 Thread Joshua Judson Rosen
Steven D'Aprano writes: > > On Sat, 29 Aug 2009 05:37:34 +0200, Tomasz Rola wrote: > > > My private list of things that when implemented in Python would be > > ugly to the point of calling it difficult: > > > > 1. AMB operator - my very favourite. In one sentence, either language > > allows one

Re: IDE for python similar to visual basic

2009-08-30 Thread r
On Aug 28, 5:19 pm, qwe rty wrote: > i have been searching for am IDE for python that is similar to Visual > Basic but had no luck.shall you help me please? Hello qwe rty, I remember my first days with GUI programming and thinking to myself; how on earth can i write GUI code without a MS style G

Re: Is behavior of += intentional for int?

2009-08-30 Thread OKB (not okblacke)
Derek Martin wrote: > If Python is to say that objects have values, > then the object can not *be* the value that it has, because that is a > paradoxical self-reference. It's an object, not a value. But does it say that objects have values? I don't see where you get this idea. Conside

Re: Is behavior of += intentional for int?

2009-08-30 Thread Derek Martin
On Sun, Aug 30, 2009 at 04:26:54AM -0700, Carl Banks wrote: > On Aug 30, 12:33 am, Derek Martin wrote: > [snip rant] I was not ranting. I was explaining a perspective. > > THAT is why Python's behavior with regard to numerical objects is > > not intuitive, and frankly bizzare to me, and I dare

Re: (Simple?) Unicode Question

2009-08-30 Thread Nobody
On Sun, 30 Aug 2009 02:36:49 +, Steven D'Aprano wrote: >>> So long as your terminal has a sensible encoding, and you have a good >>> quality font, you should be able to print any string you can create. >> >> UTF-8 isn't a particularly sensible encoding for terminals. > > Did I mention UTF-8?

Re: Is behavior of += intentional for int?

2009-08-30 Thread Derek Martin
On Sun, Aug 30, 2009 at 03:52:36AM -0700, Paul McGuire wrote: > > It is surprising how many times we > > think things are "intuitive" when we really mean they are "familiar". > > Of course, just as I was typing my response, Steve D'Aprano beat me to > the punch. Intuition means "The power or facul

Re: Is behavior of += intentional for int?

2009-08-30 Thread Derek Martin
On Sun, Aug 30, 2009 at 03:42:06AM -0700, Paul McGuire wrote: > Python binds values to names. Always. No, actually, it doesn't. It binds *objects* to names. This distinction is subtle, but important, as it is the crux of why this is confusing to people. If Python is to say that objects have va

Re: Is behavior of += intentional for int?

2009-08-30 Thread Rhodri James
On Sun, 30 Aug 2009 17:37:49 +0100, zaur wrote: On 30 авг, 15:49, Carl Banks wrote: I think they (Derek and zaur) expect integer objects to be mutable. It's pretty common for people coming from "name is a location in memory" languages to have this conception of integers as an intermediate st

Thread Pool

2009-08-30 Thread Vitaly Babiy
Hey, Any one know of a good thread pool library. I have tried a few but they don't seem to clean up after them selfs well. Thanks, Vitaly Babiy -- http://mail.python.org/mailman/listinfo/python-list

Re: break unichr instead of fix ord?

2009-08-30 Thread Nobody
On Sun, 30 Aug 2009 06:54:21 +0200, Dieter Maurer wrote: >> What you propose would break the property "unichr(i) always returns >> a string of length one, if it returns anything at all". > > But getting a "ValueError" in some builds (and not in others) > is rather worse than getting unicode strin

Re: Is behavior of += intentional for int?

2009-08-30 Thread Derek Martin
On Sun, Aug 30, 2009 at 10:34:17AM +, Steven D'Aprano wrote: > > He's saying that instead of thinking the integer value of 3 itself being > > the object, he expected Python's object model would behave as though the > > entity m is the object, and that object exists to contain an integer > > val

Re: Is behavior of += intentional for int?

2009-08-30 Thread zaur
On 30 авг, 15:49, Carl Banks wrote: > I think they (Derek and zaur) expect integer objects to be mutable. > > It's pretty common for people coming from "name is a location in > memory" languages to have this conception of integers as an > intermediate stage of learning Python's object system.  Eve

Re: An assessment of the Unicode standard

2009-08-30 Thread Hendrik van Rooyen
On Sunday 30 August 2009 15:37:19 r wrote: > What makes you think that diversity is lost with a single language? I am quite sure of this - it goes deeper than mere regional differences - your first language forms the way you think - and if we all get taught the same language, then on a very f

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Christian Heimes
Chris Colbert wrote: > Is there a way to fix this so that the local dist-packages is added to > sys.path before the system directory ALWAYS? I can do this by editing > site.py but I think it's kind of bad form to do it this way. I feel > there has to be a way to do this without root privileges. >

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Chris Colbert
I don't want to have to modify the path in each and every application. There has to be a way to do this... Personally, I don't agree with the Debian maintainers in the order they import anyway; it should be simple for me to overshadow system packagers. But that's another story. P.S. my first nam

Re: How to install setuptools...egg?

2009-08-30 Thread Mike
> I would like to install setuptools for Python2.6 on Windows. 1. Download setuptools-0.6c9-py2.6.egg 2. Download setuptools-0.6c9.tar.gz 3. Use 7-zip from http://www.7-zip.org/ to extract ez_setup.py from setuptools-0.6c9.tar.gz 4. In a directory that contains setuptools-0.6c9-py2.6.egg and ez_s

Re: An assessment of the Unicode standard

2009-08-30 Thread Paul Boddie
On 30 Aug, 14:49, r wrote: > > It can be made better and if that means add/removing letters or > redefining what a letter represents i am fine with that. I know first > hand the hypocrisy of the English language. I am thinking more on the > lines of English redux! Elsewhere in this thread you've

How i follow tree folders from url

2009-08-30 Thread catalinf...@gmail.com
Hello ! I wanna use python to follow the tree folders from one url to get data about dirs and folders. Example : If url is "www.site.com/first/ and " "first" is first folder with next subfolders "01","02","03" The result of script should be : www.site.com/first/01/ www.site.com/first/02/

Re: Parse xml file

2009-08-30 Thread Mag Gam
XML is a structured file. I never knew you can read it line by line and process. iterparse() More info on iterparse(): http://effbot.org/zone/element-iterparse.htm On Thu, Aug 27, 2009 at 10:39 AM, Stefan Behnel wrote: > loial wrote: >> Is there a quick way to retrieve data from an xml file in p

  1   2   >