Re: [Tutor] keyboard interrupt

2013-05-26 Thread Jim Mooney
On 26 May 2013 15:33, Marc Tompkins wrote: > On Sun, May 26, 2013 at 6:17 AM, eryksun wrote: StackOverflow may be good but I just had an unpleasant experience wanting to add New .py file to my Windows context menu. The first advice I saw was missing a backslash and had me adding the string to th

Re: [Tutor] making a string

2013-05-26 Thread Jim Mooney
On 26 May 2013 17:20, Steven D'Aprano wrote: > On 27/05/13 07:40, Jim Mooney wrote: > >> Good to know that compile doesn't check syntax, since I erroneously >> thought it did. > > > compile does check syntax. I'm unclear on something. The code below

Re: [Tutor] making a string

2013-05-26 Thread Jim Mooney
On 26 May 2013 17:38, eryksun wrote: > On Sun, May 26, 2013 at 8:20 PM, Steven D'Aprano wrote: >> On 27/05/13 07:40, Jim Mooney wrote: >> >>> Good to know that compile doesn't check syntax, since I erroneously >>> thought it did. >> >>

Re: [Tutor] keyboard interrupt

2013-05-26 Thread Jim Mooney
se could possibly cause a registry crash. It just didn't work since a backslash in the path to windows\shellnew was missing, probably due to typing too fast. -- Jim Mooney There are those who see. Those who see when they are shown. And those who do not see.

[Tutor] bytecode primer, and avoiding a monster download

2013-05-27 Thread Jim Mooney
install Visual Studio (Express, of course ;'). I'm on a very slow connection, right now. Is there any alternative to downloading this monster 600 Mb ISO just to install a package, or am I doomed to getting Visual Studio? -- Jim Mooney Atlantis Anyone? http://www.pnas.org/content/early/2013/

Re: [Tutor] bytecode primer, and avoiding a monster download

2013-05-27 Thread Jim Mooney
n that a Name in Python is not the Data, it confused me at first what he meant. But I could literally see the disjunction in bytecode. I'm sure it's not for everyone - just aging Assembler hackers ;') Thanks for the Python(x,y) tip. That's probably useful for other stuff, too. -

Re: [Tutor] bytecode primer, and avoiding a monster download

2013-05-28 Thread Jim Mooney
code. Ah good, how do I do that? What's the module? Thanks. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] bytecode primer, and avoiding a monster download

2013-05-28 Thread Jim Mooney
On 27 May 2013 16:32, Steven D'Aprano wrote: > On 28/05/13 06:01, Jim Mooney wrote: > Shall we guess what package that is? I love guessing games! > > Ah, who am I kidding. No I don't. > Well, I would hate to keep you guessing ;') It's called decompyle - p

Re: [Tutor] bytecode primer, and avoiding a monster download

2013-05-28 Thread Jim Mooney
On 28 May 2013 04:18, Dave Angel wrote: > On 05/28/2013 07:02 AM, Jim Mooney wrote: > Alan and Devin already gave more specifics, but to repeat, > > import dis > > dis.dis(myfunction) > > will disassemble one function. I think authors miss a didactic opportunity by

Re: [Tutor] a little loop

2013-05-28 Thread Jim Mooney
On 28 May 2013 19:34, Steven D'Aprano wrote: The standard method for assembling a string from a collection > of substrings is to do it in one go, using the join method, Wow, that means I can do this: print ''.join('But this parrot is dead!') -- Jim O

Re: [Tutor] a little loop

2013-05-28 Thread Jim Mooney
parrot is dead'.split())) Which has the same effect. There is an autodidactic purpose. I kept confusing the join statement by putting the joined string first, them the joiner, bur fooling around like this solidifies things in my mind ;') Jim Ornhgvshy vf orggre guna htyl _

[Tutor] RLPy

2013-05-31 Thread Jim Mooney
d Python) http://www.kurzweilai.net/how-computers-can-learn-better - description http://acl.mit.edu/RLPy/ - download from -- Jim Ornhgvshy vf orggre guna htyl ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://

Re: [Tutor] got text switched

2013-05-31 Thread Jim Mooney
oods a lot, so I had to come here asking dumb questions. That's a big timesaver. So I recommend the Lutz book, which despite its size, he says is only the Python intro. His second book is on practical programming in depth. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] got text switched

2013-05-31 Thread Jim Mooney
t we'd finish the book in a semester packed with other courses ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] when is a generator "smart?"

2013-06-01 Thread Jim Mooney
it in different ways further on? def uneven_squares(x,y): squarelist = (c**2 for c in range(x,y) if c%2 != 0) return squarelist #returning a generator print(list(uneven_squares(10,1))[2:10]) #slows as y gets bigger, then dies -- Jim Ornhgvshy vf o

Re: [Tutor] when is a generator "smart?"

2013-06-01 Thread Jim Mooney
On 1 June 2013 21:20, Steven D'Aprano wrote: > On 02/06/13 13:58, Jim Mooney wrote: >> >> It's a little unclear to me where generators are more efficient. > > > When there are a lot of items, and you access the items one at a time, not > all at once. If there

Re: [Tutor] when is a generator "smart?"

2013-06-02 Thread Jim Mooney
On 2 June 2013 03:39, Dave Angel wrote: > On 06/01/2013 11:58 PM, Jim Mooney wrote: > I'm astounded nobody has asked you what version of Python this is for. in > Python 2.x, the range(x,y) function produces the whole list, and then the > expression around it converts that to a

Re: [Tutor] when is a generator "smart?"

2013-06-02 Thread Jim Mooney
by the climb-the-mountain "Programming Python." Only Programming Python has all examples in 3 and scants 2, while the only "Learning Python" book available is mostly for 2 (I think the new edition of "Learning" comes out this month, bu

Re: [Tutor] when is a generator "smart?"

2013-06-02 Thread Jim Mooney
installed, didn't like, and uninstalled, but it didn't clean up the registry (a lot of programs do that). Only its pythonpath was for 3.3, explaining the trouble, since installing was the Last thing I did. I forgot that the counter to the Law of Unintended Consequences is "What did I d

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
On 2 June 2013 23:56, eryksun wrote: > On Mon, Jun 3, 2013 at 12:44 AM, Jim Mooney wrote: >> On 2 June 2013 20:33, eryksun wrote: > > I looked into PC/getpathp.c. The value of PythonPath shown above is > only a fallback for when Python is embedded. Otherwise the interpret

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
g-out, print(), staring-at, and getting a cup of coffee seem to work best for now. Maybe later, too. I'm beginning to feel that if it's longer than a page and looks like it needs a debugger, it needs breaking up so it doesn't look that way. My brain can only hold so much befo

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
are for one Py and some are for another. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
g since it's the free version and doesn't do projects. So you have to reconfig every time to run different Pys from the IDE unless you do that trick. No doubt there's something similar in Linux. Jim > > There is progress on improving this situation by formalising the > meta

Re: [Tutor] Future Python

2013-06-05 Thread Jim Mooney
On 5 June 2013 13:38, Walter Prins wrote: > Jim, > > You might be interested to know there's several incarnations of Python for > browser already available. PyJS and PyJaco are Python to Javascript > compilers, and Brython is basically a Python subset that allows you to &g

Re: [Tutor] On a looping input, subsequent inputs are hidden

2013-06-11 Thread Jim Mooney
I don't have, it may be a windows-only response I can get around by changing the code a bit. But I do like the idea of using plain old words, like "bad" as a switch, instead of some inscrutable program-switch ;') Jim Jim ___ Tutor m

Re: [Tutor] On a looping input, subsequent inputs are hidden

2013-06-11 Thread Jim Mooney
>> First you are effectively creating an entire Tkinter app >> inside popup() each time. Actually, that was the source of the error. When I put the app creation above the function, the dots no longer appeared. As to why, I'm not even going to try to figure that out ;') --

Re: [Tutor] On a looping input, subsequent inputs are hidden

2013-06-11 Thread Jim Mooney
triple quote docstrings to change the error message in the duplicate app. Good Lord, nothing worse than a problem caused by two different things ;') -- Jim Today is the day that would have been tomorrow if yesterday was today ___ Tutor maillis

Re: [Tutor] On a looping input, subsequent inputs are hidden

2013-06-12 Thread Jim Mooney
I guess that would be hard on Ben Flinkelstein ;') But I guess I could still have give_cake = True to be more understandable. Or keep the program the way it is, use if '' in msg , and sell it to Guantanamo. Jim On 11 June 2013 19:19, Steven D'Aprano wrote: > On 12/

[Tutor] Value Error

2013-06-12 Thread Jim Mooney
example of something that is the "right type but an inappropriate value"? -- Jim A noun is just a verb with the hiccups ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Value Error

2013-06-12 Thread Jim Mooney
27;blah') wouldn't be a type error rather than a value error. Jim > > ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Value Error

2013-06-12 Thread Jim Mooney
On 12 June 2013 14:16, Steve Willoughby wrote: > or if you try to take the square root of a negative number, etc. > Or the log of -10. Although sqrt(-1) works fine for cmath.sqrt(-1) - I think I get it. Come to think of it you can do cmath.log(-10), but that's getting sca

Re: [Tutor] Value Error

2013-06-12 Thread Jim Mooney
to enlist instead. And that was during Vietnam ;') Jim A noun is just a verb with the hiccups ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] sound implementation problems

2013-06-13 Thread Jim Mooney
s in my program directory, though. Of course, if you have an IDE or editor that lets you set the default directory that's no problem. If your editor doesn't do default directories but has startup scripts this will work (changing the directoy in chdir to your system, of course) import os

Re: [Tutor] find a tutorial for starting with python and netbeans (Igor Fleischer)

2013-06-13 Thread Jim Mooney
, called IDLE, which should be already installed. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] sound implementation problems

2013-06-13 Thread Jim Mooney
ide it. ActiveState makes it clear so I used them. I'm pretty sure Canopy is for 2.7 but I'm not going to do a huge download on a slow connection when they don't tell you. -- Jim A noun is just a verb with the hiccups ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] sound implementation problems

2013-06-14 Thread Jim Mooney
On 13 June 2013 21:53, Dave Angel wrote: > On 06/13/2013 11:55 PM, Jim Mooney wrote: > >> Alan Gauld >> > This is for my own convenience on my own machine. As a former webmaster I'm of course used to idiot-proofing anything released into the wild so it is usable by

Re: [Tutor] What are these two string-formatting styles called?

2013-06-14 Thread Jim Mooney
convoluted ways to use {}, which can get convoluted indeed ;') -- Jim A noun is just a verb with the hiccups ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] sound implementation problems

2013-06-14 Thread Jim Mooney
and it > looks like they're still in win 7. > -- Jim A noun is just a verb with the hiccups ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What are these two string-formatting styles called?

2013-06-14 Thread Jim Mooney
t? On the one hand, it's more memorizing, but on the other it might be a simpler syntax. My little finger has trouble finding the : key. All those odd characters are hard to find - they didn't design keyboards for programming. Maybe someday. Now you're going to tell me there&#

Re: [Tutor] What are these two string-formatting styles called?

2013-06-14 Thread Jim Mooney
On 14 June 2013 10:56, Steven D'Aprano wrote: > On 15/06/13 03:32, Jim Mooney wrote: > > Now you're going to tell me there's a programmer's keyboard ;') >> > > http://en.wikipedia.org/wiki/**Space-cadet_keyboard<http://en.wikipedia.org/wiki/Spac

Re: [Tutor] What are these two string-formatting styles called?

2013-06-14 Thread Jim Mooney
this is getting marvelously off-topic, so I'll end it there ;') -- Jim Then there is the lysdexic keyboard, which corrects letter-reversals as you tpye them... ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription option

Re: [Tutor] What are these two string-formatting styles called?

2013-06-14 Thread Jim Mooney
On 14 June 2013 13:47, Dave Angel wrote: > On 06/14/2013 03:09 PM, Jim Mooney wrote: > > You mean you don't write your own microcode in hex? New fangled computers > get between us and the hardware. Give me instructions that directly > manipulate voltages, and I'll b

Re: [Tutor] sound implementation problems

2013-06-14 Thread Jim Mooney
instantly, which means DOS is much, much faster than my IDE, since the entire list had to be figured before printing (which took a long time in the IDEs ;') Which means the IDE could fool me into thinking something takes forever to run when it gallops in DOS. Useful to know. Jim _

Re: [Tutor] sound implementation problems

2013-06-14 Thread Jim Mooney
On 14 June 2013 08:49, eryksun wrote: > On Thu, Jun 13, 2013 at 11:55 PM, Jim Mooney > wrote: > > C:\>python -i -c "import os; os.chdir('C:/Python33')" > Well, that didn't work anyway. Got me the right directory and the interpeter, but I coul

Re: [Tutor] What are these two string-formatting styles called?

2013-06-14 Thread Jim Mooney
cratch.mit.edu/projects/editor/?tip_bar=getStarted> >> > Hey, that's fun - although my cat kept hitting the wall ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What are these two string-formatting styles called?

2013-06-15 Thread Jim Mooney
rint statement, since a lot of Py 3 stuff was backported to 2.7. There is also a program that comes with Python, called 2to3, which will translate a Py 2.7 program to a Py 3.3 program. Sometimes it works and sometimes it doesn't - if my IDE doesn't make a disagreeable honk and give m

[Tutor] Is there a programmatic use for keys() and values()

2013-06-15 Thread Jim Mooney
ay 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32. *** >>> d.keys() dict_keys(['alpha', 'olf', 'bog', 'dog']) -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-15 Thread Jim Mooney
I expect and presents me with something useful. All I can do is look at the d.keys or d.values result. But then, I could look at a usable list or tuple just as easily, so I'm surprised they made it kind of useless. -- Jim After indictment the bacon smugg

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-15 Thread Jim Mooney
ess. I already remapped Caps Lock to End. Every time I turn around I'm inside something where I need to be at the end, and have to find the right arrow or End key, so remapping was an amazing time saver. I never use Caps Lock. It's Internet rudeness. And if I need all caps for a big

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-15 Thread Jim Mooney
7;s for another day. Too many all at once would just be going backward. That may not seem important but while Python is fun to learn, hunting keys far off from the home keys is annoying, at least to me. Or maybe I'm just really lazy, since I recline way back while typing ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
is NOT equal to false ##Empty string is NOT equal to False ##Empty list is NOT equal to false ## ##Zero is equal to False ##None is equal to false ##Empty string is equal to False ##Empty list is equal to False -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
;> not '' True >>> Why the difference here? -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
n look out for - and throwing in the 1, 0 baloney, which I was hoping to get away from when I decided to do Python instead of Javascript. I may be lazy but I really don't need to substitute 0 for False. -- Jim After indictment the bacon smuggler was put

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
t types ## ## "Because not has to invent a value anyway, it does not bother to return a ## value of the same type as its argument, so e.g., not 'foo' yields False, not ''." ## ## Finally, 1 and 0 are oh-so-special standins for True and False, that should have ## been strangle

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
bject such as empty string, empty list, empty tuple, or empty dict, is always True. But it appears that idea fails for an empty class: class NobodyHome: pass x = NobodyHome() print(not x) # Result is False when I thought this would be True. -- Jim After indictment the bacon smuggler was put on th

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
e gate level, why not the quantum level, where they are now building gates that use the square root of Not. (And I thought the square root of minus one was bad ;') -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillis

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
hat's a breath of fresh air - talk about freedom ;') Makes me eager to get to classes so I can redefine sets as tagged sets. -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] What is the difference between checking false?

2013-06-15 Thread Jim Mooney
On 15 June 2013 22:32, Steven D'Aprano wrote: > http://mail.python.org/pipermail/python-list/2013-June/649710.html A succinct list - worth putting in my Keep file ;') - Jim After indictment the bacon smuggler was put on the no-fry list

[Tutor] The Whole Tree

2013-06-16 Thread Jim Mooney
got a bunch of specific wheeze. What I want is a list of the whole tree. Is there such, or a way I can generate it? -- Jim Everyone has made bad decisions; it's just that some pretend they haven't. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-16 Thread Jim Mooney
On 15 June 2013 23:30, Dave Angel wrote: >>> The sort() method doesn't work, but sorted does. How many times have I read you can't sort a dictionary in Python. Was I just misreading or was that true of older Pythons? -- Jim After indictment the bacon smuggler was put

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-16 Thread Jim Mooney
ll public, takes considerably longer. Although an editor that's been around since the stone age probably doesn't blow up. I doubt VIM has a constant stream of upgrades (not always compatible), bug fixes, and security fixes ;') -- Jim After indictment the bacon smuggler was put

Re: [Tutor] just cleared the moderation queue., sorry for the backlog.

2013-06-16 Thread Jim Mooney
et you with a phony letter from your bank or "You won a Prize" or something more devious. Although the appeals from Nigerian princes have dropped way off ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] The Whole Tree

2013-06-16 Thread Jim Mooney
nt. I was thinking of an actual visible tree, but it doesn't go that deep, so that wouldn't be of use. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Getting the real exception clause

2013-06-16 Thread Jim Mooney
ception I need to use in the except clause from the more English-like message? ''' #Using C:\Python33\python.exe on Win 7 in c:\python33\jimprogs try: fh = open('nosuchdirectory/text/truthyfalsey.txt') for line in fh: print(line,end='') fh.clo

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-16 Thread Jim Mooney
> There is also an active community writing third-party plugins for Vim > and this is probably where the bulk of significant new features are > developed. So as Dr. Frankenstein exclaimed: "It's Alive!" ;') -- Jim After indictment the bacon smuggl

Re: [Tutor] Getting the real exception clause

2013-06-16 Thread Jim Mooney
nd red traceback screen I get from my IDE, then having to close the message-box so I can see the interpreter again ;') Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillist - Tutor@python.org To unsubscribe or cha

Re: [Tutor] Getting the real exception clause

2013-06-16 Thread Jim Mooney
> I'd look closer at the IDE and see if it's configurable to remove ugly > features. Well, at least the BUNG! which sounds like a spring flew out of my front end. It's a jarring "feature" ;') Jim ___ Tutor maillist

Re: [Tutor] Python and Symbolic Math for beginners

2013-06-16 Thread Jim Mooney
ed, and it didn't look like you needed solve(expr,x, dict=True) the first time since it's repeated in pprint, so I ditched it. Then it worked nicely. That's a nice little package. Just about self-explanatory, and you don't need a big, honking GUI or TeX. I think I'll ke

Re: [Tutor] Python and Symbolic Math for beginners

2013-06-16 Thread Jim Mooney
7)*I/6}] ## Oops, looks like I accidentally went complex ;') I certainly like a module where you don't have to search and ponder, and it works about like you expect. It seems very straightforward. -- Jim After indictment the bacon smuggler was put on the no-fry list __

Re: [Tutor] Python and Symbolic Math for beginners

2013-06-16 Thread Jim Mooney
ain since this package is just basics and not some Huge graphical overkill. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Is there a programmatic use for keys() and values()

2013-06-17 Thread Jim Mooney
docs. Now I can remap CapsLock to something else ;') -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python and Symbolic Math for beginners

2013-06-17 Thread Jim Mooney
, so I sometimes forget to reset it to text, when I'd like a Default to text. I only want to set rich text on a per-message basis, if I have a picture to include. If a program offers a new "convenience" it should also offer to un-convenience the convenience and simply use a default ;&

Re: [Tutor] The Whole Tree

2013-06-17 Thread Jim Mooney
On 16 June 2013 22:02, eryksun wrote: > http://docs.python.org/3/library/abc > http://docs.python.org/3/library/numbers Thanks. My left eye burns when I stare at the monitor too long, so I think I'll print out the Data Model and those for bathroom reading. I can be the Potty Progamm

Re: [Tutor] Need help appending data to a logfile

2013-06-17 Thread Jim Mooney
ays wants an object, even if you don't see it: import builtins help(builtins.open) works to get the supercalifragilisticexpialidocoius genormous help file for open, which tells you more things about open than you could possibly want to know unless you are really Hardcore ;') But it is not

Re: [Tutor] Need help appending data to a logfile

2013-06-17 Thread Jim Mooney
nd close needs the file handle. Nope. close() is not in the built-in function list: http://docs.python.org/3/library/functions.html We've caught them in a boo-boo ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or chang

Re: [Tutor] Need help appending data to a logfile

2013-06-17 Thread Jim Mooney
ke to see my name in lights, I didn't discover it, Dave did, so that would be dishonest ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Need help appending data to a logfile

2013-06-17 Thread Jim Mooney
r to think everyone else is them and knows what they know, in which case why write it at all? It's not written at a consistent level. -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor maillist - Tutor@python.org

[Tutor] unstring

2013-06-18 Thread Jim Mooney
Is there a way to unstring something? That is str(object) will give me a string, but what if I want the original object back, for some purpose, without a lot of foofaraw? -- Jim After indictment the bacon smuggler was put on the no-fry list ___ Tutor

Re: [Tutor] unstring

2013-06-18 Thread Jim Mooney
;bob', age=50) That doesn't bother me so much - fewer quotes and no colons - so I threw my module to the winds. Still, I'm learning a lot of Python trying to use Python to find lazy ways to do things ;') -- Jim Scorn that fancy food - put bread in your head! __

Re: [Tutor] unstring

2013-06-18 Thread Jim Mooney
ot;Bob" and Python thinks Bob is a nonexistent variable name and shouts at you. -- Jim Scorn that fancy food - put bread in your head! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] unstring

2013-06-18 Thread Jim Mooney
On 18 June 2013 19:41, Steven D'Aprano wrote: > On Tue, Jun 18, 2013 at 06:41:01PM -0700, Jim Mooney wrote: >> Is there a way to unstring something? That is str(object) will give me >> a string, but what if I want the original object back, for some >> purpose, without

Re: [Tutor] EXE Problem

2013-06-19 Thread Jim Mooney
it really is good to know how to use DOS first. And if you're not using Windows, all this typing will be useful to someone else. But Bayesian inference tells me you most likely are ;') Jim Sci-fi novel in one line: Congratulations miss, you have twins - but one is dark matter. __

Re: [Tutor] jessica peters

2013-06-19 Thread Jim Mooney
Just remember - the first three letters in Diet is DIE I'll stick with my cheeseburgers ;') Jim On 19 June 2013 05:17, jessica peters wrote: > http://piranhadvertising.com/yi/eem/lbabm/kfghr/skhnig/uaozl.html > > jessica

[Tutor] Opinion - help could use more examples

2013-06-19 Thread Jim Mooney
e it. I think the name is confusing zip with compacting, too. Although to be fair. choosing_nth_item_from_parallel_sequences_until_there_is_no_match_on_n() might be too much typing compared to zip() ;') -- Jim Sci-fi novel in one line: Congratulations miss, you have

Re: [Tutor] Opinion - help could use more examples

2013-06-19 Thread Jim Mooney
a bit better but still finds garbage you must sift through. So builtin help would be preferable if it were just a bit less concise and had some examples. It's only an opinion. The gods of Python may do otherwise as they choose. Jim > -- Jim Sci-fi novel in one line: Congratulations miss, yo

Re: [Tutor] Opinion - help could use more examples

2013-06-19 Thread Jim Mooney
en black is out of style except for Goth kids, who do look kinda kewl ;') Jim A pride of lions, a gaggle of geese, a pack of wolves, and a sewer of bankers. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: htt

Re: [Tutor] Opinion - help could use more examples

2013-06-19 Thread Jim Mooney
big push for Usability, which I would assume includes visibility - but it appears to be totally forgotten in the lust for gray on gray to look kewl ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http:

Re: [Tutor] Opinion - help could use more examples

2013-06-19 Thread Jim Mooney
ten a first language, have two-tier help - offer a learner help Lhelp(), that omits the __garbola__ and uses the space saved for simple examples. With a proviso on top to go to real help or the docs once you get past the elementary phase. Just a thought. Or encourage docstring writers that an example now

Re: [Tutor] Data persistence problem

2013-06-21 Thread Jim Mooney
value every time. So far I have a next(gen) as a parameter into the function but that's exactly not what I want - since I need to increment three different numbers that will persist in the function. I tried a few examples I saw but I keep getting the same number, so I'm doing something wron

Re: [Tutor] Data persistence problem

2013-06-21 Thread Jim Mooney
On 21 June 2013 14:59, ALAN GAULD wrote: > > Give us a clue, show us your code! I was hoping you wouldn't say that since it's another of my insane Lazy Typer programs to avoid typing, which are no doubt considered frivolous. Although I'm learning a lot doing them ;') Okay, I have a snippet that

Re: [Tutor] Data persistence problem

2013-06-21 Thread Jim Mooney
roblems. Although some of them are from the IDE. But others might be from the OS, and there are different OSes so this wouldn't be portable. -- Jim A pride of lions, a gaggle of geese, a pack of wolves, a sewer of bankers. ___ Tutor maillist - Tu

Re: [Tutor] Data persistence problem

2013-06-21 Thread Jim Mooney
zippy = zip([1,2],[3,4,5,6,7,8,9]) >>> D = dict(zippy) >>> D {1: 3, 2: 4} # dict works fine >>> next(zippy) # exhausting zippy raises StopIteration Traceback (most recent call last): File "", line 301, in runcode File "", line 1, in StopIter

Re: [Tutor] Data persistence problem

2013-06-22 Thread Jim Mooney
(There is a big difference between managers and entrepreneurs, which an entrepreneur once pointed out to me, though.) -- Jim A pride of lions, a gaggle of geese, a pack of wolves, a sewer of bankers. ___ Tutor maillist - Tutor@python.org To u

[Tutor] How convert an int to a string

2013-06-22 Thread Jim Byrnes
t;>> b = str(a) >>> b[:2] '25' >>> b '25035' >>> I was confused at first but then realized that the 0 makes it octal. I thought str() would do it but it didn't. Reading about str() it talks of string represe

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Jim Byrnes
On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. >>> a = 060713 >>> a[:2] Traceback (most recent call last): File "", line 1,

Re: [Tutor] How convert an int to a string

2013-06-23 Thread Jim Byrnes
On 06/22/2013 06:24 PM, Dave Angel wrote: On 06/22/2013 07:03 PM, Jim Byrnes wrote: On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. >>> a = 060713

Re: [Tutor] "farkadoodle" or: unique global names, was Re: Data persistence problem

2013-06-23 Thread Jim Mooney
e ninety_nine dictionary entries to do that. I'm too lazy a typer ;') -- Jim Resistance is futile, but running away is often surprisingly effective. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How convert an int to a string

2013-06-23 Thread Jim Byrnes
On 06/23/2013 06:50 PM, Dave Angel wrote: On 06/23/2013 12:43 PM, Jim Byrnes wrote: On 06/22/2013 06:24 PM, Dave Angel wrote: On 06/22/2013 07:03 PM, Jim Byrnes wrote: On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes [2013-06-22 16:01]: I need to convert a series of digits like

Re: [Tutor] "farkadoodle" or: unique global names, was Re: Data persistence problem

2013-06-24 Thread Jim Mooney
if a dumb pol is reading his teleprompter he'll get brain freeze trying to cipher numerals that big, but he can just read out words. -- Jim Resistance is futile, but running away is often surprisingly effective. ___ Tutor maillist - Tutor@pytho

[Tutor] mistaken about splitting expressions over lines

2013-06-24 Thread Jim Mooney
avoid, but what if you're adding five or six very long things, like some really long strings? -- Jim Never run on gravel with a lightbulb in your mouth (personal experience - don't ask.) ___ Tutor maillist - Tutor@python.org To unsubscribe

<    1   2   3   4   5   6   >