Re: tkFileDialog question

2009-11-13 Thread r
Opps, i see you answered your own question ;-) To save you more hours of Googling take a look at these two sites! #great reference http://infohost.nmt.edu/tcc/help/pubs/tkinter/ #more in-depth http://effbot.org/tkinterbook/ you'll want to keep them both under your pillow. -- http://mail.python

Re: A "terminators' club" for clp

2009-11-14 Thread r
On Nov 14, 4:59 am, kj wrote: > But, as I already showed, I'm out of my depth here, > so I'd better shut up. Don't give up so easy! The idea is great, what Paul is saying is that most people who read this group use newsreaders and that has nothing to do with google groups. These guy's have kill f

Re: A "terminators' club" for clp

2009-11-14 Thread r
On Nov 14, 7:28 am, gil_johnson wrote: > How about using a "rank this post" feature? Anybody could rank a post > as spam, and a sufficiently large number of negatives would quickly > draw the attention of someone with the power to kill the message. I > suppose even this is subject to abuse, allow

Re: A "terminators' club" for clp

2009-11-14 Thread r
On Nov 14, 4:52 pm, Terry Reedy wrote: > So, the only reason to use c.l.p is if one wants to post anonymously, > like the spammers do ;-). I don't think that completely correct. Lots of people find GG's to be more suited to their news reading pleasures, i am one of them. I hate to have an email j

Re: Easy way to play single musical notes in Python

2009-11-14 Thread r
On Nov 14, 6:21 pm, James Harris wrote: > Is there a simple way to play musical notes in Python? Something like >   voice.play("c4") Uhh, tksnack is pretty easy to use IMO, see this link... http://www.daniweb.com/code/snippet216655.html No python does not have access to cross platform soundcard

Re: ANN: PyGUI 2.1

2009-11-15 Thread r
OK this is my third attempt, someone please email me if these messages are getting through. I mailed this only to c.l.py and not the announce group this time, that may have been my previous problems??? Here we go... Hello Greg, I have looked over this kit in the past and it looks quite promising

Re: tkFileDialog question

2009-11-15 Thread r
On Nov 15, 8:56 pm, "Gabriel Genellina" wrote: > En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell   > escribió: > > > answer = tkFileDialog.askdirectory() > > > if answer is not '': > >    #do stuff > > Although it "reads well", this is *wrong*. You want != here, not the `is   > not` operator. >

Re: tkFileDialog question

2009-11-15 Thread r
Matt, There is also a nice thing you need to know about Python if you already do not know. That is the fact that all empty collections bool to False. This makes Truth testing easier. >>> bool([]) False >>> bool('') False >>> bool({}) False >>> bool([1]) True >>> bool([[]]) True >>> bool(' ') True

Re: basic class question..

2009-11-15 Thread r
On Nov 15, 6:26 pm, Pyrot wrote: > what happens when I use the import statement within a class/function > declaration? > I'm thinking either > 1) It imports during the class/function declaration > 2) It imports the first time a class/function call(x = rawDNA() ) > occurs > > But if it's 2) then i

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-16 Thread r
On Nov 16, 10:54 am, Steve Ferg wrote: > I've often thought that a language with this kind of block-free syntax > would be nice and intuitive: > >     if then >         do stuff >     elif then >         do stuff >     else >         do stuff >     endif WHY? Python's syntax is by far the most

Re: New syntax for blocks

2009-11-17 Thread r
On Nov 17, 9:28 am, Jonathan Saxton wrote: > And if I ever find the genius who had the brilliant idea of using = to mean > assignment then I have a particularly nasty dungeon reserved just for him.   > Also a foul-smelling leech-infested swamp for those language designers and > compiler writers

Re: python gui builders

2009-11-17 Thread r
On Nov 17, 12:20 pm, Simon Hibbs wrote: > I wouldn't completely dismiss Tkinter. It's too simple for complex > GUIs but I still think it has it's place for basic utilities. Agreed! Tkinter (besides myself) seems to be the whipping boy of c.l.py. Tkinter has it's place in Python because of the sa

Re: New syntax for blocks

2009-11-18 Thread r
On Nov 18, 5:27 pm, Steven D'Aprano wrote: > On Wed, 18 Nov 2009 18:28:11 +1300, greg wrote: > > r wrote: > >> I think the syntax was chosen because the alternatives are even worse > >> AND since assignment is SO common in programming, would you *really* > >

Re: plotting arrow in python

2009-11-21 Thread r
On Nov 21, 7:36 pm, Lie Ryan wrote: (..snip..) > If you want to avoid 3rd party modules, take a look at turtle and > Tkinter in the standard library. Just to add to Ryans words... If you want to avoid 3rd party modules, take a look at turtle and the Tkinter *Canvas* widget in the standard library

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-22 Thread r
On Nov 22, 11:32 am, News123 wrote: > Hi, > > I'm trying to scan a document from a python 2.6 script without user > interaction. > > I found a code snippet, that allows me to scan under Vista, but that > doesn't allow me to select the dpi / color mode / etc. > > The snippet uses win32com.client

Re: Python & OpenOffice Spreadsheets

2009-11-23 Thread r
On Nov 23, 4:49 am, Gerhard Häring wrote: > Is there a *simple* way to read OpenOffice spreadsheets? > > Bonus: write them, too? > > I mean something like: > > doc.cells[0][0] = "foo" > doc.save("xyz.ods") > > >From a quick look, pyodf offers little more than just using a XML parser I find the s

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread r
On Nov 23, 11:19 am, astral orange <457r0...@gmail.com> wrote: > Hi, I am trying to teach myself Python and have a good book to help me > but I am stuck on something and I would like for someone to explain > the following piece of code for me and what it's actually doing. > Certain parts are very c

Re: Beginning Question about Python functions, parameters...

2009-11-24 Thread r
On Nov 24, 9:45 am, astral orange <457r0...@gmail.com> wrote: > > As for the "class Name():" example above? Even though I haven't seen > exactly what purpose 'self' serves > yet I can follow and understand what is going on very easily, that > helps out tremendously. > Very clearly written...Thank y

Re: why (1, 2, 3) > [1, 2, 3] is true?

2010-02-25 Thread r
On Feb 25, 7:00 am, fat bold cyclop wrote: > why (1, 2, 3) > [1, 2, 3] is true? It's simple, Everything must have a value! -- http://mail.python.org/mailman/listinfo/python-list

Re: homedir, file copy

2011-01-30 Thread r
On Jan 30, 2:44 pm, ecu_jon wrote: > shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\") TIP: Use os.path.join(x,y, z*) > why is there still two \\ in the pathfor the copy command? I always convert my paths to use a single '/' instead of '\\'. Just makes life that much easier! -- http:

Re: In disGuiodoise?

2010-04-04 Thread r
On Apr 4, 11:14 am, "Alf P. Steinbach" wrote: > > Perhaps Guido provides subtle guidance under some unrecognized nick? > "He walks among you, and you don't recognize him" - Old jungle proverb Ah yes i have often wondered who could it be? I have a few good suspects who could be Guido's sock-puppet

Re: Easy questions from a python beginner

2010-07-14 Thread r
On Jul 14, 1:24 pm, Grant Edwards wrote: > As of a few minutes ago, this thread had 48 postings on my news > server. > > To paraphrase somebody famous: > >     There are no such things as easy questions.  There are, however, >     easy answers.  And they're wrong.         Ha! This is the very re

Re: Tkinter Label alignment problem using OS 10.6

2010-07-31 Thread r
On Jul 31, 2:55 am, Peter Otten <__pete...@web.de> wrote: > PS: Rantingrick is right; you should use one of the other geometry managers Incidentally I was actually writing a version of the OP's script using the grid manager when i found his nasty response. So I think i'll just keep it for me self

Confessions of a Python fanboy

2009-07-29 Thread r
Hello fellow Pythonista's it's nice to be back after such a long hiatus. I have recently realized my blind love affair with Python was just that. I must admit there are better ways to program. Like your first lay, your first programing language can leave an indelible mark on you, but like all you

Re: IDLE Config Problems

2009-07-29 Thread r
On Jul 29, 3:55 pm, "Russ Davis" wrote: > I am just getting started with Python and have installed v. 2.5.4  Idle > version 1.2.4  I can't seem to get the idle to display text.  It seems as if > the install went fine.  I start up the idle and the screen is blank.  No > text.  It seems as if I c

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 11:31 am, Falcolas wrote: > On Jul 29, 9:06 pm, r wrote: > > > 1.) No need to use "()" to call a function with no arguments. > > Python --> "obj.m2().m3()" --ugly > >   Ruby --> "obj.m1.m2.m3"  -- sweeet! > > Man

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 12:15 pm, Masklinn wrote: [snip] > Furthermore Ruby has a pretty nice convention (sadly not used enough I   > think) taken from Scheme where it's possible to postfix a method name   > with "!" (note: the "!" is part of the name, there's no magic) to   > indicate that this method modifie

Re: Confessions of a Python fanboy

2009-07-30 Thread r
Traceback (most recent post last): File "", lines (13,14), in vector.reverse --> in-place vector.reversed --> in-place DumbMistakeError: Of course in python you would do... vector.reverse --> in-place vector.reversed --> new vector -- http://mail.python.org/mailman/listinfo/python-

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 12:37 pm, Jean-Michel Pichavant wrote: > r wrote: > > On Jul 30, 11:31 am, Falcolas wrote: > > >> On Jul 29, 9:06 pm, r wrote: > > >>> 1.) No need to use "()" to call a function with no arguments. > >>> Python --> &quo

Re: calling obect method

2009-07-30 Thread r
>>> import math >>> getattr(math, 'hypot')(3,4) 5.0 -- http://mail.python.org/mailman/listinfo/python-list

Re: class or thread id count

2009-07-30 Thread r
On Jul 30, 1:13 pm, NighterNet wrote: > Need some help on doing some bit simple id count. It like every time > it create a class or thread there is id++. Python 3.1 > > example: > class ClientThread (threading.Thread): >    def __init__(self,clientSocket): >       threading.Thread.__init__(self) >

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 3:55 pm, Terry Reedy wrote: > superpollo wrote: > > r wrote: > > how to reverse a string in python? must i usa a temp? like: [snip] > Terry Jan Reedy No "r" never wrote anything like that. reversing a string is RTFM material, this is basic stuff here! Stop

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 4:29 pm, Emmanuel Surleau wrote: > > 1.) No need to use "()" to call a function with no arguments. > > Python --> "obj.m2().m3()" --ugly > >   Ruby --> "obj.m1.m2.m3"  -- sweeet! > > Man, i must admit i really like this, and your code will look so much > > cleaner. > > It has benefits -

Re: Confessions of a Python fanboy

2009-07-30 Thread r
On Jul 30, 4:57 pm, Luis Zarrabeitia wrote: [snip] > I'd like to ask, what "container.each" is, exactly? It looks like a function > call (as I've learned a few posts ago), but, what are its arguments? How the > looping "works"? Does it receive a "code" object that it has to execute? > Is .each som

Re: Python docs disappointing

2009-07-31 Thread r
On Jul 31, 3:10 pm, kj wrote: > I'm pretty new to Python, and I like a lot overall, but I find the > documentation for Python rather poor, overall. [snip] If you mean the built-in docs i *highly agree* with you. if you mean docs/tutorials available across the WWW i *highly disagree* with you, and

Re: Python docs disappointing

2009-07-31 Thread r
On Jul 31, 4:16 pm, Carl Banks wrote: > On Jul 31, 1:10 pm, kj wrote: > > > I'm pretty new to Python, and I like a lot overall, but I find the > > documentation for Python rather poor, overall. > > > I'm sure that Python experts don't have this problem: they have > > internalized some good ways t

Re: Python docs disappointing

2009-07-31 Thread r
On Jul 31, 4:53 pm, Mark Lawrence wrote: > r wrote: > > On Jul 31, 4:16 pm, Carl Banks wrote: > >> On Jul 31, 1:10 pm, kj wrote: > > >>> I'm pretty new to Python, and I like a lot overall, but I find the > >>> documentation for Python rather

Re: possible to round number and convert to string?

2009-08-01 Thread r
On Jul 31, 7:42 pm, "Dr. Phillip M. Feldman" wrote: > This was very close to what I wanted.  Thanks!  My final code looks like > this: > > def num2str(x,f=4): >    """Convert x (int or float) to a string with f digits to right of >    the decimal point.  f may be zero or negative, in which case th

Re: Printing with colors in a portable way

2009-08-03 Thread r
On Aug 2, 9:52 pm, a...@pythoncraft.com (Aahz) wrote: [snip] > Much as I hate to say, use a cross-platform GUI -- Tkinter comes with > Python, [snip] Why is Tkinter such a whipping boy of the Python community? I know it's very simple and does not have all the bells and whistles of wx, but i think

Re: Announcing PythonTurtle

2009-08-03 Thread r
Hello, I wanted to announce that I have just released my little side project, PythonTurtle. [snip] I think it looks great --haven't download the source yet-- but i really like the screenshot. This will be more "inviting" to the new, inexperianced users. I like the idea of packaging up the command

Re: no-clobber dicts?

2009-08-03 Thread r
On Aug 3, 4:07 pm, kj wrote: > I use the term "no-clobber dict" to refer to a dictionary D with > the especial property that if K is in D, then > >   D[K] = V > > will raise an exception unless V == D[K].  In other words, D[K] > can be set if K doesn't exist already among D's keys, or if the > ass

Re: Announcing PythonTurtle

2009-08-03 Thread r
On Aug 3, 5:03 pm, cool-RR wrote: [snip] > Thanks for the compliments; The things you mentioned you liked are all > things that I was specifically thinking about when I decided to make > PythonTurtle. Well, maybe minus the screenshot :) I *may* get roasted for this comment, but i think a turtle m

Re: no-clobber dicts?

2009-08-03 Thread r
On Aug 3, 5:00 pm, Chris Rebert wrote: > On Mon, Aug 3, 2009 at 2:47 PM, r wrote: [snip] > > Not sure if something like this already exists, but it would be > > trivial to implement by overriding dict.__setitem__() > > That is, if you don't care about .update() not

Re: Announcing PythonTurtle

2009-08-03 Thread r
On Aug 3, 8:53 pm, Asun Friere wrote: > On Aug 4, 6:35 am, r wrote: > > [snip] > > > > > I can remember the first time i used turtle (in python stdlib) and i > > kept saying to myself... > > >     "Were the heck is this damn turtle?!?!

Re: Python docs disappointing - group effort to hire writers?

2009-08-05 Thread r
On Aug 4, 12:55 am, David Lyon wrote: > It isn't totally about the writers... > Peoples egos are also at stake - it seems. > If "Fred X wrote Doc Y".. they don't want their name taken off.. So > they generally speaking don't want the docs changed. > If you talk too much about docs.. you can be tol

Re: Python docs disappointing - group effort to hire writers?

2009-08-06 Thread r
On Aug 6, 11:20 am, Paul Rubin wrote: ...(snip) > There is something similar with the PostgreSQL docs.  There is also > Real World Haskell (http://book.realworld.haskell.org) which has a lot > of interspersed user comments.  It would be cool if Python's doc site > did

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread r
On Aug 7, 11:03 am, Kee Nethery wrote: ...(snip) > I'm looking forward to the acceleration of improvements to the   > official docs based upon easy to provide user feedback. Glad to see   > that the bug tracking system is going to not be the primary means for   > documentation changes. +1 -- ht

Re: Why all the __double_underscored_vars__?

2009-08-07 Thread r
On Aug 7, 5:13 pm, Chris Rebert wrote: > On Fri, Aug 7, 2009 at 5:51 PM, kj wrote: > > Python is chock-full of identifiers beginning and ending with double > > underscores, such as __builtin__, __contains__, and __coerce__. ...(snip) > Right, but the *users* of the functionality provided by __meth

Re: Bug or feature: double strings as one

2009-08-07 Thread r
On Aug 7, 7:31 am, durumdara wrote: > Hi! > > I found an interesting thing in Python. > Today one of my "def"s got wrong result. ...(snip) I think it's a completely useless feature and i have never used it even once! This so-called "feature" seems a direct contridiction to the zen... """There s

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread r
On Aug 7, 3:35 pm, Kee Nethery wrote: (snip) Kee, that was an eloquent and enlighting post and i think it speaks volumes to the lack of inclusion of all Pythoneers in this community. Not to mention the viscous attitudes and self indulgence we have around here. For those of you with ADD, Kee was

Re: Bug or feature: double strings as one

2009-08-07 Thread r
It sure doesn't get any more obivous than... "string1" + "string2" Although i much prefer string formatting to concatenation for almost all cases except the most simple. This auto-magic conacatenation of strings is unintuitive and completely moronic if you ask my opinion. I blow chunks when i se

Re: Bug or feature: double strings as one

2009-08-07 Thread r
On Aug 7, 10:31 pm, Steven D'Aprano wrote: ...(snip excessive showmanship) :-) Ah Steven thats a real nice "snappy comeback" and some may get blinded by the "black magic" but basically all you are saying is that "version a" takes less overhead than "version b", compilation wise... but let's dig a

Re: Windows 7 : any problems installing or running Python ?

2009-08-07 Thread r
On Aug 7, 10:05 pm, Dave WB3DWE wrote: ...(snip) Oh God, windows 7 is here :(. What great functionality has M$ bestowed on the weary peasants now? More importantly why the heck am i still using windows in 2009? i think i will dump my winders os for good this year and go linux from here on out (ca

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread r
possibility of it gaining official support > later once it gains traction. This is by far the most helpful and honest post i have ever seen by our friend alex23. I have a new found respect for you sir, thanks -R -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug or feature: double strings as one

2009-08-09 Thread r
On Aug 8, 12:43 pm, "Jan Kaliszewski" wrote: > 08-08-2009 Steven D'Aprano wrote: ...(snip) > I use it very often, e.g.: > >          afunction('quite long string %s quite long string ' >                    'quite long string quite long string %s ' >                    'quite %s long string quite

Re: Bug or feature: double strings as one

2009-08-09 Thread r
On Aug 9, 12:10 pm, "Jan Kaliszewski" wrote: ..(snip) > Sorry, you are wrong, '''-way would be usefull only if: > >      * you want to have '\n' in each place where you wrap the >        literal in your code, > > and > >      * you use '''-literal at a module (non-indented) level > >        or you

Re: Bug or feature: double strings as one

2009-08-09 Thread r
#-- el bueno --# "hello i am a very long string that\ does not like newlines so please \ escape me, Thank you!" #-- el malo --# "hello i am a very long string that"+ "does not like newlines but i have no"+ "idea what to do with myself" #-- el feo --# "hello i am a very long string that" "does no

Re: www.python.org website is down?

2009-08-10 Thread r
On Aug 8, 8:48 am, MRAB wrote: ...(snip) > Bothwww.python.organd svn.python.org are down.  They're hosted on > the same machine, and it seems to have run into disk problems and > hasn't rebooted even after power-cycling.  Thomas Wouters will be > visiting the machine physically tomorrow to try to

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-10 Thread r
On Aug 9, 11:02 pm, David Lyon wrote: > Since you're talking about documentation, which is a part of python, > don't you think you should be discussing it on python-dev ? Yea, them's be a friendly bunch to noob ideas ;). Hey i got a better idea, lets go to the IRS and see if we can persuade them

Re: www.python.org website is down?

2009-08-10 Thread r
On Aug 10, 9:13 am, MRAB wrote: > r wrote: > > On Aug 8, 8:48 am, MRAB wrote: > > ...(snip) > >> Bothwww.python.organdsvn.python.org are down.  They're hosted on > >> the same machine, and it seems to have run into disk problems and > >> hasn'

Re: pybotwar-0.5

2009-08-10 Thread r
u have left up there and put together a reasonable and responsible response that is more than just a cowardly put down. Now run along little spam bot, i am sure one of the other thousands of groups you post to can't wait for your triumphant return! r "slayer of the galactic-ly stupid!" -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation servers

2009-08-10 Thread r
On Aug 10, 12:53 pm, Roy Hyunjin Han wrote: > Are there issues with the python documentation servers?http://docs.python.org/ > The site has been really slow to respond all weekend. try this thread http://groups.google.com/group/comp.lang.python/browse_thread/thread/052368a71f2a8ad2/929bd74bd203c6

Re: Python docs disappointing - group effort to hire writers?

2009-08-10 Thread r
On Aug 10, 11:13 am, Ethan Furman wrote: (snip) > As someone who relies heavily on the docs I will also say that the idea > of giving the ability to modify the official documentation to somebody > who is /learning/ the language is, quite frankly, terrifying. (snip) Ethan, I think what you and a f

Re: Python docs disappointing - group effort to hire writers?

2009-08-11 Thread r
On Aug 11, 1:47 am, Steven D'Aprano wrote: > On Mon, 10 Aug 2009 20:05:00 -0400, David Lyon wrote: > > Ignore feedback... tell people to freak off... > > Only useless feedback. And who decides what is useless and what isn't Steven?. You?, alex23?, Bruno?, Paul? Carl? Who makes these decisions and

Re: Python docs disappointing - group effort to hire writers?

2009-08-11 Thread r
Ok people follow me here. Open your winders help file and click the "Tutorial" link. What is this FLUFF doing here!?!?! Where is the damn index? Where is the damn tutorial? I want to learn Python not read the HISTORY OF THE WORLD. Upon clicking the "Tutorial" link pre 2.6, a nice menu was placed b

Re: Python docs disappointing - group effort to hire writers?

2009-08-11 Thread r
Ah Ha! the docs are broken and i was right all along! Are the good folks at Python dev rolling a new installer as we speak, or we must wait for new version? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs disappointing - group effort to hire writers?

2009-08-11 Thread r
...(Carl Banks doing what he does best) > > I'm mailing you to kindly request, again, that you please stop > > validating "r"'s disruptiveness by responding to him on > > comp.lang.python.  Thank you. Carl, You have no right to tell people when where and ho

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread r
On Aug 12, 1:27 pm, Raymond Hettinger wrote: (snip) > * Many doc requests come from people just learning the language > (that makes sense because the learning process involves reading > the docs).  Unfortunately, a fair number of those requests are > flat-out wrong or represent a profound misunder

Re: Python 'for' loop is memory inefficient

2009-08-14 Thread r
On Aug 14, 8:25 pm, "Dr. Phillip M. Feldman" wrote: > I wrote the following correct but inefficient test of primality for purposes > of demonstrating that the simplest algorithm is often not the most > efficient.  But, when I try to run the following code with a value of n that > is large enough t

Re: IDLE file saving problem

2009-08-21 Thread r
On Aug 21, 4:10 pm, MRAB wrote: [snip] > That happens if you don't provide the extension, eg you save as > "my_script" instead of "my_script.py". (Perhaps IDLE should add the > extension if the user doesn't.) Yes, and much more needs improvement! I have made many changes already and i am polishin

An assessment of Tkinter and IDLE

2009-08-27 Thread r
- Tkinter and IDLE Shortfalls - *The following is an assessment of Tkinter as i have experienced it. Even with all the problems i list below i strongly believe Tkinter is a great starter GUI toolkit and we (the

Re: why python got less developers ?

2009-08-27 Thread r
On Aug 27, 7:34 pm, Deep_Feelings wrote: > python got relatively fewer numbers of developers than other high > level languages like .NET , java .. etc  why ? Ugh? Well maybe if you put some deep_thoughts into this conundrum you may reveal the answer to your self. Python is an interpreted "scripti

Re: Transforming a str to an operator

2009-08-27 Thread r
On Aug 27, 10:52 pm, Duke Normandin wrote: > How do I convert the contents of "op" from a string to an actual > arithmetic operator? eval() does not seem to be the answer. TIA! Try this.. >>> op = '+' >>> one = '1' >>> two = '2' >>> one+op+two '1+2' >>> eval(one+op+two) 3 you could also use s

Re: Transforming a str to an operator

2009-08-27 Thread r
On Aug 27, 11:35 pm, Ben Finney wrote: > In general, ‘eval’ on unsanitised input is not the answer. Yes i agree. > I would use the following approach: Abviously the OP is a python baby noob and casting your irrational fear (and many others irrational fears) of eval at him is akin to tales of Ch

Re: why python got less developers ?

2009-08-27 Thread r
On Aug 27, 7:34 pm, Deep_Feelings wrote: > python got relatively fewer numbers of developers than other high > level languages like .NET , java .. etc  why ? Oh, and why on god's green would you ever compare Java (*puke*) and Python in the same breath? You say Python is a "high-level-language"? W

Re: An assessment of Tkinter and IDLE

2009-08-28 Thread r
On Aug 28, 11:12 am, Mark Roseman wrote: > Would it be useful to link to this from the main Python Tkinter > documentation? > > Mark Thanks Mark, but i would hate to see more links to TCL code in the python docs. Whats the use of Tkinter if the docs are in TCL. Just learn TCL and skip the Python

Re: Colors on IDLE

2009-08-28 Thread r
Have you tried saving the files as MYScriptName.py? notice the py extension, very important ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: why python got less developers ?

2009-08-28 Thread r
On Aug 28, 10:36 am, jfabi...@yolo.com wrote: (snip) > I'm inclined to agreed.  But in recent years we lost a number of developers > to Ruby.  I don't know but I doubt Ruby has a marketing budget.  So in my > mind it is difficult for me to blame just the lack of marketing dollars for > the lost.  

Re: What python can NOT do?

2009-08-28 Thread r
On Aug 28, 5:37 pm, qwe rty wrote: > what else can NOT be done in python? what are the limitations of the > language? Why would you even want to know what can't be done? What is it that you would like to do with Python? If you want a one size fits all language you may be looking for a very long t

Re: An assessment of Tkinter and IDLE

2009-08-28 Thread r
On Aug 28, 5:48 pm, Mark Roseman wrote: (snip) > Thewww.tkdocs.comsite is 'language neutral' - currently the tutorial > covers Tcl, Perl, Ruby and yes Python, and allows you to switch between > any of those languages (or show all of them). True, however the coverage is incomplete. I would back th

Re: What python can NOT do?

2009-08-28 Thread r
On Aug 28, 7:05 pm, Tim Chase wrote: (snip) > Since Python is Turing-complete, there's no reason a whole OS > couldn't be authored in Python. Yes, and one could go from NY to LA on a unicycle but would one really want to? Talk about some redass and blueballs! *yikes* Yes, if i have learned anyth

Re: Transforming a str to an operator

2009-08-29 Thread r
On Aug 28, 8:43 pm, Anny Mous wrote: > It isn't irrational to have a healthy caution towards eval. Ignorance is never an excuse for stupidity. No caution is needed if you know how to properly use eval. You can't shoot yourself in the foot without first pulling the trigger. > Apart from the secur

An assessment of the Unicode standard

2009-08-29 Thread r
I was reading the thread here... http://groups.google.com/group/comp.lang.python/browse_thread/thread/db90a9629b92aab0/b0385050b4c6c84e?hl=en&lnk=raot#b0385050b4c6c84e and it raised some fundamental philophosical questions to me about natural languages and Unicode. Which IMO * Unicode* is simply a

Re: An assessment of the Unicode standard

2009-08-29 Thread r
On Aug 29, 7:20 pm, John Machin wrote: > On Aug 30, 8:46 am, r wrote: > The Chinese language is more widely spoken than English, is quite > capable of expression in ASCII ("r tongzhi shi sha gua") and doesn't > have those pesky it's/its problems. Oh yes of cou

Re: Why does this group have so much spam?

2009-08-29 Thread r
On Aug 29, 7:18 pm, casebash wrote: > So much of it could be removed even by simple keyword filtering. A more interesting question is what morons are responding to this spam and enticing the spammers to proliferate their garbage? Do people actually see a spam like "Phallus enlargement pills" and

Re: An assessment of the Unicode standard

2009-08-30 Thread r
On Aug 29, 11:05 pm, Anny Mous wrote: (snip) > How do we distinguish resume from résumé without accents? This is another quirk of some languages that befuddles me. What is with the ongoing language pronunciation tutorial some languages have turned into -- French is a good example (*puke*). Do you

Re: An assessment of the Unicode standard

2009-08-30 Thread r
On Aug 30, 3:33 am, Thorsten Kampe wrote: [snip ridiculous trolling] > Thorsten Hmm, I wonder who's sock puppet you are Thorsten? -- http://mail.python.org/mailman/listinfo/python-list

Re: An assessment of the Unicode standard

2009-08-30 Thread r
On Aug 30, 7:11 am, Hendrik van Rooyen wrote: (snip) > Not that I agree that it would be a Utopia, whatever the language  - more like > 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 ar

Re: How to install setuptools...egg?

2009-08-30 Thread r
On Aug 30, 7:08 am, "Colin J. Williams" wrote: > You might try, at the command line: >    easy_install setuptools Wait maybe you should try this command >>> help(setuptools) :-) -- http://mail.python.org/mailman/listinfo/python-list

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: 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

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 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 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

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: 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: 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: 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: An assessment of Tkinter and IDLE

2009-08-31 Thread r
Kevin and Terry, Kevin. I respectfully disagree that the site is ready for prime time *However* i do not wish to undermine the great work that Mark Roseman has done here and i thank him for his contribution. He has put much work into covering all the major languages and i think this site *could*

Re: An assessment of Tkinter and IDLE

2009-08-31 Thread r
On Aug 28, 11:12 am, Mark Roseman wrote: > Would it be useful to link to this from the main Python Tkinter > documentation? > > Mark Sorry Mark, i did not realize when i replied to you that YOU are the Mark of tkdoc.com. For some reason i only saw Tcl code when i visted the site, and that prompte

<    1   2   3   4   5   6   7   8   9   10   >