LangWart: Method congestion from mutate multiplicty

2013-02-08 Thread Rick Johnson
DISCLAIMER: This post covers a universal programming language design flaw using both Python and Ruby code examples to showcase the issue. I really don't like to read docs when learning a language, especially a "so-called" high level language. I prefer to learn the language by interactive sess

Re: LangWart: Method congestion from mutate multiplicty

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 9:36:52 PM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > > The solution is simple. Do not offer the "copy-mutate" methods and force > > all mutation to happen in-place: > > > > py> l = [1,2,3] > > py

Re: Implicit conversion to boolean in if and while statements

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 11:01:00 PM UTC-6, Chris Angelico wrote: > [...] > Another advantage of using two characters: There's no conflict between > set and dict literals. How do you notate an empty set in Python? {} > means an empty dict. What makes you believe that a language must provide lit

Re: Implicit conversion to boolean in if and while statements

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 7:17:26 PM UTC-6, Chris Angelico wrote: > On Sat, Feb 9, 2013 at 11:49 AM, Rick Johnson > > nested_list = array(array(string)) > > Actually, that's not a declaration, that's an assignment; and in Pike, > a 'type' is a thing, sam

Re: Implicit conversion to boolean in if and while statements

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 7:06:34 PM UTC-6, Ian wrote: > On Fri, Feb 8, 2013 at 12:58 PM, Rick Johnson > wrote: > > I'm a bit unnerved by the sum function. Summing a > > sequence only makes sense if the sequence in question > > contains /only/ numeric types. For

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 2:39:21 AM UTC-6, Terry Reedy wrote: > While it is true that sorted(iterable) is essentially > > def sorted(iterable): >tem = list(iterable) >tem.sort >return tem > > the body is not an expression and cannot be substituted in an > expression. Yes but th

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 3:53:57 AM UTC-6, Neil Hodgson wrote: > Ruby does not use '!' to indicate in-place modification: Really? rb> a = [1,2,3] [1, 2, 3] rb> a.reverse [3, 2, 1] rb> a [1, 2, 3] rb> a.reverse! [3, 2, 1] rb> a [3, 2, 1] And now we will verify that a.reverse! has not assigned

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 5:29:54 AM UTC-6, Steven D'Aprano wrote: > Rick wrote: > And you have missed my point, which is that reversed(), and sorted(), were > not added to the language on a whim, but because they were requested, over > and over and over again. Well, we

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 7:30:00 AM UTC-6, Oscar Benjamin wrote: > On 10 February 2013 04:53, Mark Janssen wrote: > > [...] > > I have to agree with Rick, I think requiring the user to explicitly > > create a new object, which is already a good and widely-used practice, &

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 6:12:57 PM UTC-6, Tim Chase wrote: > What should you get if you flatten > > [[[1,2],[3,4]],[[5,6],[7,8]]] > > Should the result be > > [[1,2],[3,4],[5,6],[7,8]] > > or > > [1,2,3,4,5,6,7,8] > > I've needed both cases, depending on the situation. Well provid

Re: Implicit conversion to boolean in if and while statements

2013-02-10 Thread Rick Johnson
On Saturday, February 9, 2013 10:50:25 PM UTC-6, Chris Angelico wrote: > [...] > I don't understand. Wouldn't freezing an array (list) result in a > tuple? And, why should there be no literal syntax for them? > > Having a convenient literal notation for every basic type is extremely > handy. Act

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Sunday, February 10, 2013 5:37:46 AM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > IMO "Set Types" should only exists as a concequence of "freezing" an > > array, > > Sets are not frozen lists. Indeed. That wording was a bit clumsy on m

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Saturday, February 9, 2013 11:04:42 PM UTC-6, Chris Angelico wrote: > On Sun, Feb 10, 2013 at 3:54 PM, Rick Johnson wrote: > > Well Chris i have wonderful news for you! Python /does/ > > have "homogenous arrays", and they're called, wait for > > it. a

Re: LangWart: Method congestion from mutate multiplicty

2013-02-11 Thread Rick Johnson
On Sunday, February 10, 2013 6:36:20 PM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > On Sunday, February 10, 2013 5:29:54 AM UTC-6, Steven D'Aprano wrote: > >> Rick wrote: > > [...] > > Steven, the definition of flatten (as relate

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 6:40:23 AM UTC-6, Chris Angelico wrote: > [...] > Or doing what you were pointing and laughing at Pike for, and using > two-symbol delimiters. You could even make it majorly logical: > > list_ = [[ 1, 2, 3 ]] > tuple_ = ([ 1, 2, 3 ]) > dict_ = [{ 1, 2, 3 }] > frozendic

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 6:50:03 AM UTC-6, Chris Angelico wrote: > On Mon, Feb 11, 2013 at 11:28 PM, Rick Johnson > > Well i would expect anyone who considers himself a > > python programmer (not to mention "pythonista"!) to at > > minimum be familiar with the s

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 7:35:23 AM UTC-6, Chris Angelico wrote: > On Tue, Feb 12, 2013 at 12:13 AM, Rick Johnson wrote: > > I am vehemently against using more than one "opening seq char" and one > > "closing seq char". ... we could use start and end

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 7:52:24 AM UTC-6, Chris Angelico wrote: > [...] > But my statement wasn't based on my own knowledge of the stdlib, but > rather on this: > > On Sat, Feb 9, 2013 at 6:58 AM, Rick Johnson wrote: > > I'm a bit unnerved by the sum functi

Re: LangWart: Method congestion from mutate multiplicty

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 7:27:30 AM UTC-6, Chris Angelico wrote: > So... > flatten([None, 23, [1, 2, 3], (2, 3), ["spam", "ham"]]) > > would return > > [None, 23, 1, 2, 3, (2, 3), "spam", "ham"] > > I think that's even more unexpected. Why? Are you over-analyzing? Show me a result that /do

Re: Implicit conversion to boolean in if and while statements

2013-02-12 Thread Rick Johnson
On Monday, February 11, 2013 11:55:19 PM UTC-6, Chris Angelico wrote: > On Tue, Feb 12, 2013 at 12:06 PM, 8 Dihedral wrote: > > A permanently mutated list is a tuple of constant objects. > > I nominate this line as "bemusing head-scratcher of the week". Actually the statement is fact IF you ca

Re: LangWart: Method congestion from mutate multiplicty

2013-02-12 Thread Rick Johnson
On Monday, February 11, 2013 11:28:57 PM UTC-6, zipher wrote: > [...] > Yeah, this is where one has to consider the idea of a unified data > model (a sort of OOPv2). Right now, it's all confused because people > are using their own internal, subconscious ideas of data. Indeed! The current parad

Re: Awsome Python - chained exceptions

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 12:15:29 AM UTC-6, Steven D'Aprano wrote: > [snip inflammatory remarks] > I thought I'd present a few of Python's more > awesome features, starting with exception contexts. Well that's great idea, however, in order to find this very "valuable" information the searche

Re: Awsome Python - chained exceptions

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 12:01:45 PM UTC-6, Zero Piraeus wrote: > You could call them PyW00ts. +1 on the name -INFINITY on the execution Actually i am happy that DeAprano used the unintuitive tag now. Bad enough to use an unintuitive tag. Worse to misspell it. But it would been a crime to

Re: string.replace doesn't removes ":"

2013-02-12 Thread Rick Johnson
On Saturday, February 9, 2013 5:04:18 AM UTC-6, Joshua Robinson wrote: > Hi Monte-Pythons, > > x = "this is a simple : text: that has colon" > s = x.replace(string.punctuation, ""); OR > s = x.replace(string.punctuation, ""); > print x # 'this is a simple : text: that has colon' > > # The col

Re: string.replace doesn't removes ":"

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote: > > REFERENCES: > > [1]: Should string.replace handle list, tuple and dict > arguments

Re: Awsome Python - chained exceptions

2013-02-13 Thread Rick Johnson
On Wednesday, February 13, 2013 12:58:46 AM UTC-6, Chris Angelico wrote: > On Wed, Feb 13, 2013 at 1:47 PM, Rick Johnson wrote: > >On Tuesday, February 12, 2013 12:15:29 AM UTC-6, Steven D'Aprano wrote: > >> If you've ever written an exception handler, you'

Re: Awsome Python - chained exceptions

2013-02-13 Thread Rick Johnson
On Wednesday, February 13, 2013 10:14:34 AM UTC-6, Rick Johnson wrote: > The proper method of using a forward compatible print > function is by /importing/ the feature. > >from future import print_function Urm... of course the proper /PROPER/ way would be to NOT throw an

Re: string.replace doesn't removes ":"

2013-02-13 Thread Rick Johnson
On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote: > > >>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'} > >>> 'abcdefgabc'.translate(d) > 'A2CdefgA2C' > >>> > >>> > >>> def jmTranslate(s, table): > ... table = {ord(k):table[k] for k in table} > ... return s.translate(tabl

Re: Suggested feature: slice syntax within tuples (or even more generally)?

2013-02-14 Thread Rick Johnson
On Thursday, February 14, 2013 4:01:39 PM UTC-6, steph...@gmail.com wrote: > On Thursday, February 14, 2013 1:58:06 PM UTC-5, Ian wrote: > > [snip: quote noise!] > Dude! Please trim this quote noise from your posts. I know Google's quoting mechanism is buggy, but dammit man YOU'RE A PROGRAMER!

Re: Awsome Python - chained exceptions

2013-02-14 Thread Rick Johnson
On Thursday, February 14, 2013 6:01:51 AM UTC-6, Ulrich Eckhardt wrote: > [...] > > try: > rrick.go_and_[edit]_yourself() > finally: > rrick.get_lost() Oops, you forgot to catch "FloatingPointError" and so your code choked in the try block -- typical newbie mistake. -- http://mail.pyt

Re: First attempt at a Python prog (Chess)

2013-02-14 Thread Rick Johnson
On Thursday, February 14, 2013 11:48:10 AM UTC-6, Chris Hinsley wrote: > Is a Python list as fast as a bytearray? Why would you care about that now? Are you running this code on the Xerox Alto? Excuse me for the sarcasm but your post title has perplexed me: "First attempt at a Python prog (Che

Re: Awsome Python - chained exceptions

2013-02-14 Thread Rick Johnson
On Friday, February 15, 2013 12:18:17 AM UTC-6, Chris Angelico wrote: > And yet it is still a perfect example of how a line of > code inside a 'try' block can indeed be offensive. Oh nice try, but we are not fooled by your straw-man. My exact statement that provoked this whole thing was: """ Q1:

Re: Can someone tell me what kinds of questions should be asked in this list and what kinds in the tutor section?

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 3:44:29 AM UTC-6, Tim Golden wrote: > On 17/02/2013 00:19, Claira wrote: > > Can someone tell me what kinds of questions should be asked in this > > list and what kinds in the tutor section? > > There's no clear-cut distinction. The rule of thumb I usually > apply is t

Re: Comparing types

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 12:34:57 AM UTC-6, Jason Friedman wrote: > [...] > py> my_pattern = re.compile(s) > py> type(my_pattern) > > py> isinstance(my_pattern, _sre.SRE_Pattern) > Traceback (most recent call last): > File "", line 1, in > NameError: name '_sre' is not defined Both Steven

Re: Can someone tell me what kinds of questions should be asked in this list and what kinds in the tutor section?

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 5:10:18 PM UTC-6, Oscar Benjamin wrote: > More > often questions are asked on python-list that would be more > appropriate on python-tutor. I've never seen anyone suggest that a > question be asked on python-tutor when this happens, which is a shame > since the same qu

Re: Awsome Python - chained exceptions

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 7:35:24 PM UTC-6, alex23 wrote: > Any chance you can stop sending to both comp.lang.python _and_ the > python-list, given the former is a mirror of the later? I apologize for this doubling of my messages and i can assure you i don't do this intentionally. Proper net

Re: news.gmane.org (was Re: Awsome Python - chained exceptions

2013-02-17 Thread Rick Johnson
Terry Reedy udel.edu> writes: > For at least the 10th time, there is little to no excuse for reading and > writing python-list thru google-groups. The news.gmane.org mirror has > multiple interfaces: [Sent from gmane.comp.python.general] Yes you have mentioned this before and for some reason i

Python Warts: The where, when, how, and why of a PyWart.

2013-02-18 Thread Rick Johnson
NOTE: This thread is actually an extension (of sorts) to a thread started by "Anatoly tecktonik" back in December 2012; posted on the python-ideas mailing list; titl

Re: news.gmane.org (was Re: Awsome Python - chained exceptions

2013-02-18 Thread Rick Johnson
yahoo.com> writes: > On 02/17/2013 11:10 PM, Terry Reedy wrote: > > For at least the 10th time [...] > > And for at least the 11th time, you are wrong. There are reasons > (not applicable to everyone but applicable to many) for using > Google Groups, among others it is more accessible and easie

Re: request for help

2013-02-18 Thread Rick Johnson
leonardo selmi icloud.com> writes: > [...] > i saved the above program from python shell into a file as > "circle.py" . when i type "import circle" i get error.. Urm... would you be so kind as to copy and paste the error message verbatim? You have obvious syntax errors in this code due to improp

Re: request for help

2013-02-18 Thread Rick Johnson
a specialized package named "math", which itself should be under the "global blanket" of a personal library package named "insertUniqueNameHere"! This is how we protect module symbols whilst simultaneously employing a logical structu

Re: Python Warts: The where, when, how, and why of a PyWart.

2013-02-18 Thread Rick Johnson
On Monday, February 18, 2013 4:31:01 PM UTC-6, Terry Reedy wrote: > This was a threat to abuse StackOverflow with off-topic posts if 'we' > did not pay him more attention. If that is in-fact true then i am going to be as upset with Anatoly as you seem to be. Pointing out problems on appropriate

Re: tkinter / gui

2013-02-24 Thread Rick Johnson
On Saturday, February 23, 2013 4:50:43 PM UTC-6, Rex Macey wrote: > Here is one general and one specific question about > creating GUIs using tkinter from a newbie. I have created > a class in which to hold some data. I want to create a > GUI to get the data from the user and store it in the > ob

Re: Basic Listview Example

2013-02-24 Thread Rick Johnson
On Friday, February 22, 2013 12:03:30 PM UTC-6, Xx7 wrote: > Hi, could somebody possibly provide a basic listview example? thanks! Depends on your definition of a "listview". We NOW know you want examples of GUI widgets; but /which/ GUI library do you plan on using? If you are not sure which l

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rick Johnson
On Tuesday, February 26, 2013 4:17:22 PM UTC-6, Jason Swails wrote: > Just to throw in my 2c -- in the same way that 'a picture > is worth a thousand words', an interactive interpreter is > worth volumes of documentation (especially one with such a > nice help()/__doc__ functionality). Yes! I don'

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rick Johnson
On Tuesday, February 26, 2013 7:48:51 PM UTC-6, Terry Reedy wrote: > On 2/26/2013 1:52 PM, Devin Jeanpierre wrote: > > > > [...snip legit complaint...] > > > Have you opened an issue, or checked for existing issue? I would be open > to the idea that entries like that for int should not be overly

Re: mp3

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 3:58:03 PM UTC-6, fabriceS wrote: > Is anybody know how to get the lenght (in seconds) of a mp3 file ? Well Mp3's have a huge header with tons of info stuffed inside. And i remember seeing a nice recipe on the Python cookbook (or maybe SO) for parsing the data. I

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 7:22:44 AM UTC-6, Antoine Pitrou wrote: > Which means that in the end you would really want a diversity of HOWTOs > targeted at different usages of the stdlib. But it is a lot of work to > write *and* maintain. So instead we maintain a "simple", albeit broken, doc t

Re: Project Based python tutorials

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 2:31:11 AM UTC-6, Alvin Ghouas wrote: > First of all: Im new to this group and i dont know if > there are any "rules" or jargon around her. If so; pleas > fill me in. The only rules are there are no rules. All we can hope is that everyone will "try" to play nicely

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 5:25:25 PM UTC-6, alex23 wrote: > Ranting on public forums is nothing but posturing at best, and at > worst an attempt to blackmail-by-shame people into doing something for > you. Same goes for calls for "the community" to "fix" things. What you call ranting is most

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 8:44:08 PM UTC-6, Chris Angelico wrote: > On Thu, Feb 28, 2013 at 1:05 PM, Rick Johnson wrote: > > This is why i will AGAIN mention my PyWarts list > > (Hypothetical at this point). We need an official place > > for the many problems of Python

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 10:18:46 PM UTC-6, alex23 wrote: > You claim that no one has time to write a bug report. I point out that > if they can spend the time ranting about the bug, then they have the > time. And i would like to point out that all your nay-saying and condemnations are ta

Re: Do you feel bad because of the Python docs?

2013-02-28 Thread Rick Johnson
On Wednesday, February 27, 2013 11:57:05 PM UTC-6, alex23 wrote: > On Feb 28, 2:53 pm, Rick Johnson wrote: > > On Wednesday, February 27, 2013 10:18:46 PM UTC-6, alex23 wrote: > [...] > * Do you care about the evolution of Python or just give > it lip service? > > I don

Re: Issue with continous incrementing of unbroken sequence for a entire working day

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 10:31:58 AM UTC-6, Morten Engvoldsen wrote: > [...] > So if the batch has 10 records and last serial number of > first batch is 10, then when the batch runs second time in > the same day, how the 'serial_number' will get the value > of 10 and then continue the serial

Re: suggestions for improving code fragment please

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 1:47:12 PM UTC-6, The Night Tripper wrote: > I'm being very dumb ... how can I simplify this fragment? > > if arglist: > arglist.pop(0) > if arglist: > self.myparm1 = arglist.pop(0) > if arglist: >

Re: Issue with continous incrementing of unbroken sequence for a entire working day

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 2:41:30 PM UTC-6, Morten Engvoldsen wrote: > > [...] > > def salesrecord(): >     serial_number = 0 >     sales_recrod = {'record1':'product1', > 'record2':'product2', > 'record3':'product3', > } > >     for

Re: raw format string in string format method?

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 8:11:17 AM UTC-6, Helmut Jarausch wrote: > Hi, > > > > I'd like to print a string with the string format method which uses > {0}, ... /What/ uses "{0}" exactly? The substring you wish to inject or the format method? If the latter, we are aware of that! > Unfortu

Re: raw format string in string format method?

2013-02-28 Thread Rick Johnson
ed ASAP! Simpleminded Sam blubbered: """ But rick, how will we format strings that contain curly braces without the "percent format" option? We can't live without "percent formatting", we are but simple minded folks! *sky-falling* """ Easy Sa

Re: need for help

2013-03-01 Thread Rick Johnson
On Friday, March 1, 2013 12:35:14 PM UTC-6, leonardo selmi wrote: > class ball: > > [...] > Now that you've gotten the exceptions sorted, it may be time to join the *other* 99% of programmers by editing that class identifier. All class symbols should start with (at minimum) a capitol letter.

Re: Is it correct this way to inherit from a list?

2013-03-02 Thread Rick Johnson
On Saturday, March 2, 2013 11:02:14 AM UTC-6, gialloporpora wrote: > I would like to inherit from the list native class. really > I expected that was possible to use native list method > without redefining them, for example the __repr__ method. > > [...] > > class vector(list): > def __init

Re: Dealing with exceptions

2013-03-02 Thread Rick Johnson
On Saturday, March 2, 2013 11:40:11 AM UTC-6, bvdp wrote: > Every time I write a program with exception handling (and > I suppose that includes just about every program I write!) > I need to scratch my brain when I create try blocks. > > For example, I'm writing a little program do copy specific >

Re: Question on for loop

2013-03-04 Thread Rick Johnson
On Monday, March 4, 2013 6:18:20 AM UTC-6, newtopython wrote: [Note: Post has be logically re-arranged for your comprehensive pleasures] > for character in secretWord: > if character not in lettersGuessed: > return True > return False > > What this code is doing is only checking

Re: listbox binding..what is the current selection?

2013-03-05 Thread Rick Johnson
On Tuesday, March 5, 2013 6:54:45 PM UTC-6, Rex Macey wrote: > I have a listbox with two strings "Fixed" and "Random". > [...] Here's the beginning of the set_lengthtype code: > > def set_lengthtype(event=None): >s=lbLengthtype.get(tk.ACTIVE) >print(s) >. > > The print(s) state

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 5:50:35 PM UTC-6, Terry Reedy wrote: > If you find a bug in this documentation or would like to propose an > improvement, please send an e-mail to d...@python.org describing the bug > and where you found it. If you have a suggestion how to fix it, include > that as w

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 7:06:56 PM UTC-6, alex23 wrote: > Why do you have such a low opinion of others that you think they're > unable to look up "Reporting Bugs" in the _documentation_? I don't have a low opinion of anybody here. However the fact that this community needs an entry level path

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 7:52:59 PM UTC-6, Terry Reedy wrote: > > How much longer are we going to "treat the symptoms" > > We would VERY MUCH like a system to make it easier for readers to report > doc bugs and developers to fix them. No one yet has come up with both a > reasonable idea and

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 8:28:42 PM UTC-6, alex23 wrote: > On Mar 7, 11:31 am, Rick Johnson wrote: > > I don't have a low opinion of anybody here. However the fact that > > this community needs an entry level path for bug/grievance reports > > is *glaringly* obviou

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 9:12:37 PM UTC-6, alex23 wrote: > Your obsession with Guido is tiring. And your false accusations that i am somehow "obsessed" with GvR have BEEN tiring for quite some time! I am neither passionate for or prejudice against the man. I simple ask that he live up to hi

Re: listbox binding..what is the current selection?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 10:38:22 PM UTC-6, Rex Macey wrote: > I have spent time with the docs, at least with the Python > v3.3 and tkinter v8.5 (pdf). Could you post links to the documents you are reading please? Actually when i said "read the docs" i did not mean the offical Python docs on

Re: Why is Ruby on Rails more popular than Django?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 8:58:12 PM UTC-6, rusi wrote: > "Where there is choice there is no freedom" > [snip link] > > Python-for-web offered so much choice -- zope, django, turbogears, > cherrypy, web.py etc etc -- that the newbie was completely drowned. > With Ruby there is only one choice to

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 3:28:41 AM UTC-6, Rui Maciel wrote: > rusi wrote: > > > Anyone who's used emacs will know this as the bane of FLOSS software > > -- 100 ways of doing something and none perfect -- IOW too much > > spurious choice. > > This is a fallacy. Just because someone claims that

Re: listbox binding..what is the current selection?

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 9:13:16 AM UTC-6, William Ray Wing wrote: > With apologies for jumping into the middle of this > discussion, but I've found the most helpful tkinter v8.5 > docs to be the set at New Mexico tech: Well these are free and open forums the last time i checked. Don't worry

Re: Need help deriving a convertion function on python

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 2:25:42 PM UTC-6, johnn...@gmail.com wrote: > I have a computer programming assignment. I am completely > lost and i need some help. These are the questions that > are confusing me > > (a) Write a function which converts from gallons to cups2 How can we help you if we ha

Re: Why is Ruby on Rails more popular than Django?

2013-03-08 Thread Rick Johnson
ween different models of the same manufacture!!! *Wise observer blubbered:* "Rick, what you describe is more a result of corporate greed than a good analogy for the ills of web programming, this is open source software, nobody is being paid. The developers are not intending to e

Any other screenwriters?

2013-03-08 Thread Rick Dooling
errors in Mac OS X; some Ruby ones and some Prince ones) and convert it to Python so I can fix it myself, because I don't know Ruby at all, and would rather work in Python. https://github.com/olivertaylor/Textplay Any pointers? Thanks a bunch, Rick Dooling -- http://mail.python.org/mailman/listinfo/python-list

Re: Any other screenwriters?

2013-03-08 Thread Rick Johnson
On Friday, March 8, 2013 3:07:59 PM UTC-6, Rick Dooling wrote: > I am an amateur Python person, and I usually learn just > enough to make one writing tool or another as I go, > because mainly I'm a writer, not a programmer. Recently, > I've been exploring a markdown synt

Re: Running external module and accessing the created objects

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 9:34:53 AM UTC-6, Kene Meniru wrote: > OK. Sorry to have caused all the confusion. Let me try > this again. Sounds to me like you should solve this problem in two manners: Interactive Input ==

Re: Running external module and accessing the created objects

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 11:21:20 AM UTC-6, Kene Meniru wrote: > Please see my last response to Dave Angel. I think it is > possible for a program to watch a file. I am not > interested in menus which is why I am going this route. I > could easily use PyQt to make this but I am not interested >

Re: how to déplace a circle in canvas python?

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 1:47:43 PM UTC-6, olsr@gmail.com wrote: > how to [translate] a circle in canvas tkinter python from > [one] position to an [another] position Well "translation" is by definition: "changing an objects position" > by a mouse click 'press' ['release'] or by delete the

Re: Any other screenwriters?

2013-03-09 Thread Rick Johnson
rams like > this and yes we use them once production starts, but it's > nice to be able to work in your text editor for as long as > possible. Faster. More versatility. I agree. > So everybody is looking for a fast way to make PDFs in > screenplay format from simple markdown t

Re: how to get id of a line from his coordonée in tkinter python?

2013-03-09 Thread Rick Johnson
ave to do is save the id into a variable. rectID = canvas.create_rectangle(...) Now you can pass that unique id into many of the methods that exist for "canvas items". canvas.delete(rectID) canvas.coords(rectID) canvas.bbox(rectID) *Sarcastic Sam quipped*: """Rick

Re: Running external module and accessing the created objects

2013-03-11 Thread Rick Johnson
On Monday, March 11, 2013 6:57:28 PM UTC-5, Kene Meniru wrote: > > -- > # contents of myapp.py > import math > > class MyApp(object): > def __init__(self): > super(MyApp, self).__init__() > self.name = "MyAppName" > > > def testFunction():

Re: how to couper contenier of a canvas in an outer canvas???

2013-03-14 Thread Rick Johnson
On Thursday, March 14, 2013 7:16:05 AM UTC-5, olsr@gmail.com wrote: > how to couper all the obejcts in a canvas in an auther canvas? Hmm, well before i can even start solving your problem, i'll need to spend some time figuring out what the hell you're problem is. o_O. "Maybe" you meant to sa

Re: how to couper contenier of a canvas in an outer canvas???

2013-03-15 Thread Rick Johnson
On Friday, March 15, 2013 7:00:15 AM UTC-5, olsr@gmail.com wrote: > i maybe don't talk english very well but at least i am not > a Rude,and you are not obligated to answering me much > less Mocking me ,i assure you that i will not post > anything anymore jackass > > thank you alex23 Wel

Re: how to couper contenier of a canvas in an outer canvas???

2013-03-15 Thread Rick Johnson
how to couper all the obejcts in a canvas in an auther canvas? On Friday, March 15, 2013 9:09:41 AM UTC-5, rusi wrote: > I dont usually bother about spelling/grammar etc. And I > think it silly to do so on a python list. However with > this question: > > On Mar 14, 5:16 pm, olsr.ka...@gmail.com w

PyWart: NameError trackbacks are superfluous

2013-03-16 Thread Rick Johnson
Sometimes many levels of trace messages can be helpful when detecting bugs, however, in the case of NameErrors, these "nuggets" ejected from deep within the bowls of the Python interpreter are nothing more than steaming piles of incomprehensible crap! We don't need multiple layers of traces f

Re: PyWart: NameError trackbacks are superfluous

2013-03-16 Thread Rick Johnson
On Saturday, March 16, 2013 4:19:34 PM UTC-5, Oscar Benjamin wrote: > > NameErrors can occur conditionally depending on e.g. the > arguments to a function. Consider the following script: > > # tmp.py > def broken(x): > if x > 2: > print(x) > else: > print(undefi

Re: PyWart: NameError trackbacks are superfluous

2013-03-16 Thread Rick Johnson
On Saturday, March 16, 2013 6:29:52 PM UTC-5, Oscar Benjamin wrote: > I wasn't looking to convince *you*, just to set the record > straight that this behaviour is sometimes useful. And you claim to "set the record strait" by posting code that *purposely* raises a NameError when some function para

Re: PyWart: NameError trackbacks are superfluous

2013-03-16 Thread Rick Johnson
On Saturday, March 16, 2013 6:48:01 PM UTC-5, Steven D'Aprano wrote: > On Sat, 16 Mar 2013 21:19:34 +, Oscar Benjamin wrote: > > [...] > > NameErrors can occur conditionally depending on e.g. the > > arguments to a function. Consider the following script: > [...] > > Correct, although in your e

Re: Python GUI questions

2013-03-19 Thread Rick Johnson
On Tuesday, March 19, 2013 2:01:24 PM UTC-5, maiden129 wrote: > Hello, > > I'm using python 3.2.3 and I'm making a program that show > the of occurrences of the character in the string in > Tkinter. > > My questions are: > > How can I make an empty Entry object that will hold a word > that a use

Re: Python GUI questions

2013-03-19 Thread Ranting Rick
On Mar 19, 8:25 pm, maiden129 wrote: > Here is my try to answer some of questions: > > [snip code] I don't understand why you are wrapping this code into a class. Are you trying to create something reuseable? > I'm just struggling with only how to create an object that > will hold a single chara

Re: Python GUI questions

2013-03-19 Thread Rick Johnson
On Tuesday, March 19, 2013 9:36:28 PM UTC-5, maiden129 wrote: > So should I redo my other code that I created with > the radioButtons to change the colors of a text? I believe so. Although you really should explain what your trying to achieve with this code. There is nothing wrong with wrapping

Re: Python GUI questions

2013-03-20 Thread Rick Johnson
On Tuesday, March 19, 2013 10:21:06 PM UTC-5, Terry Reedy wrote: > On 3/19/2013 10:16 PM, Ranting Rick wrote: > > [snip code] > > when I run this, and click the button, I get: > >TypeError: cbButton() missing 1 required positional argument: 'self' > > ...

Re: Global NameError Fix?

2013-03-22 Thread Rick Johnson
On Thursday, March 21, 2013 7:24:17 PM UTC-5, Dave Angel wrote: > On 03/21/2013 07:43 PM, maiden129 wrote: > > Hello, > > > I'm using the version 3.2.3 of Python and I am having an > > issue in my program and I don't know how to fix it: > > > counterLabel["text"] = str(counter) > > NameError: glo

Re: Python IDLE

2013-03-22 Thread Rick Johnson
On Friday, March 22, 2013 12:11:32 PM UTC-5, Steve DeMicoli wrote: > Dear Sir, Madame, > > [...message body removed for fear of legal reprisals...] > > The information in this email and any attachments are > confidential and intended solely for the use of the > individual or entity to whom they a

Re: how does the % work?

2013-03-22 Thread Rick Johnson
On Friday, March 22, 2013 12:06:18 PM UTC-5, leonardo selmi wrote: > hi guys > > i wrote this example : > > name = raw_input("What is your name?") > quest = raw_input("What is your quest?") > color = raw_input("What is your favorite color?") > > print """Ah, so your name is %s, your quest is %s,

Re: how does the % work?

2013-03-23 Thread Rick Johnson
On Friday, March 22, 2013 11:29:48 PM UTC-5, Tim Roberts wrote: > You are using Python 3. In Python 3, "print" is a function that returns > None. So, the error is exactly correct. Wait a second... if he is in-fact using Python 3, then why did the call to a non-existent function named "raw_in

Re: how does the % work?

2013-03-23 Thread Rick Johnson
On Saturday, March 23, 2013 2:38:23 AM UTC-5, Steven D'Aprano wrote: > On Fri, 22 Mar 2013 21:29:48 -0700, Tim Roberts wrote: > > print('''Ah, so your name is %s, your quest is %s, and your > > favorite color is %s.''') % (name, quest, color) > > The difference between those two statements ma

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-10 Thread Rick Wotnaz
Zeljko Vrba <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 2005-12-10, Tom Anderson <[EMAIL PROTECTED]> wrote: >> >> ED IS THE STANDARD TEXT EDITOR. >> > And: > INDENTATION > SUCKS >BIG > TIME. > > Using indentation without block termination markers

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-12 Thread Rick Wotnaz
Antoon Pardon <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Op 2005-12-11, Rick Wotnaz schreef <[EMAIL PROTECTED]>: >> >> Because you're accustomed to one set of conventions, you >> may find Python's set strange at first. Please try it, and

<    5   6   7   8   9   10   11   12   >