[Tutor] close, but no cigar

2013-07-22 Thread Jim Mooney
Okay, I'm getting there, but this should be translating A umlaut to an old DOS box character, according to my ASCII table, but instead it's print small 'u': def main(): zark = '' for x in "ÀÄÄÄ": print(unichr(ord(u'x')-3), end=&

Re: [Tutor] slashes in paths

2013-07-22 Thread Jim Mooney
DOS isn't commonly used, a python program would be better anyway. -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] slashes in paths

2013-07-22 Thread Jim Mooney
On 22 July 2013 11:26, Marc Tompkins wrote: > > > > If you haven't already read it, may I suggest Joel's intro to Unicode? > http://www.joelonsoftware.com/articles/Unicode.html > I had a bad feeling I'd end up learning Unicode ;') -- Jim ___

[Tutor] unichr not working as expected

2013-07-22 Thread Jim Mooney
ord(x)-45) print(zark) unichr() arg not in range(0x10000) (narrow Python build) -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] slashes in paths

2013-07-22 Thread Jim Mooney
/f > pytree.txt might be illuminating. I piped since it took forever to print because I have python(x,y). Unfortunately, I got tiny numbers and A with umlauts instead of the nice path outlines in the dos box: ³ ³ ³ ³ ÀÄÄÄtests Jim ___ Tuto

Re: [Tutor] Best way to learn Tkinter

2013-07-15 Thread Jim Mooney
Ben Fishbein Here's a good source - and has a link to a recent book (ten bucks on kindle) http://www.tkdocs.com/ Jim On 15 July 2013 14:38, Ben Fishbein wrote: > Hello. I wrote a python program for my small business. It works fine but > it is all from command prompt and makes

Re: [Tutor] How to install package (I. Alejandro Fleischer)

2013-07-15 Thread Jim Mooney
;t always find what you want on the net so you have to download it.) A good feature of pip is pip freeze, which shows you what you've already got installed. Figuring out the Python install mess is harder than figuring out Python, IMHO ;') -- Jim If you find yourself running into a wal

Re: [Tutor] How to install package (I. Alejandro Fleischer)

2013-07-15 Thread Jim Mooney
in the future: And it's nice they're all there. I recently installed something that, only afterward the install failed, told me it needed wxPython. I checked their web page - no mention at all of the dependency. That's just not nice ;') https://www.enthought.com/products/epd

Re: [Tutor] A slight bug in IDLE

2013-07-14 Thread Jim Mooney
On 14 July 2013 18:03, Marc Tompkins wrote: > On Sun, Jul 14, 2013 at 4:18 PM, Jim Mooney wrote: > > >> I prefer import antigravity , but then I lose the rest of the day ;') >> > > Pretty sure that comes from sampling everything in the medicine cabinet >

Re: [Tutor] A slight bug in IDLE

2013-07-14 Thread Jim Mooney
7;, 'unicode_literals', 'barry_as_FLUFL'] > I prefer import antigravity , but then I lose the rest of the day ;') -- Jim Cleaning Windows 7: Start Menu > Contol Panel > Programs and Features > Java > Uninstall It's that easy ;') ___

Re: [Tutor] A slight bug in IDLE

2013-07-14 Thread Jim Mooney
input = raw_input range = xrange except NameError as err: pass Since it's the same error in both cases, and I only pass in either case, so the logic looks the same to me? Or am I missing something? --- Jim Wash your fruits and veggies, folks. Contrary to the

Re: [Tutor] A slight bug in IDLE

2013-07-14 Thread Jim Mooney
xcept using a callback would mean editing the inputter module, which I am pretending is some module code I'm importing but don't want to mess with. So I just import it and do the so-called monkey patch without actually editing the module. My thought was I could do quick tests and dummy inpu

Re: [Tutor] A slight bug in IDLE

2013-07-13 Thread Jim Mooney
port division, print_function import sys if int(sys.version_info[0]) < 3: input = raw_input range = xrange for my header macro. I'll try to remember about Tkinter. Anything else missing of great import ;') I don't want that to get too big - just the minimum. -- Jim Ou

Re: [Tutor] A slight bug in IDLE

2013-07-13 Thread Jim Mooney
On 13 July 2013 20:03, Steven D'Aprano wrote: > > I don't understand that last sentence. Ah, I can be marvelously unclear. I keep forgetting telepathy only works on my home planet ;') I wiped everything out to start fresh with Py27, so this is just a very simple example of what worked in sendi

Re: [Tutor] A slight bug in IDLE

2013-07-13 Thread Jim Mooney
ith_statement, print_function import sys if int(sys.version[0]) < 3: input = raw_input Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] A slight bug in IDLE

2013-07-13 Thread Jim Mooney
ule stuck to truncated. But either way it's good to know __future__ is not your usual sort of import. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] A slight bug in IDLE

2013-07-13 Thread Jim Mooney
orted after it. That's a gotcha to avoid ;') -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] please return flys in ointment

2013-07-08 Thread Jim Mooney
to nail procedural - I'm in no rush - but that looks simple enough. Damn, computer is overheating again. I'll be glad when the AZ heatwave is over so I can get back to more hours on the computer, but Reality intervenes ;') Jim > > > > > -- > DaveA > > >

Re: [Tutor] please return flys in ointment

2013-07-08 Thread Jim Mooney
On 8 July 2013 00:12, Steven D'Apranocatching ArithmeticError > further on), please use a custom exception > Well, an Arithmetic Error was better than bubbling up to a totally general one. I'm not sure how do custom error code. Short example,

Re: [Tutor] please return flys in ointment

2013-07-06 Thread Jim Mooney
om my program to a test program and it gets an index error after 6,000 or so tests of random integer strings. in case someone finds that, I'm already workin' on it ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscr

Re: [Tutor] please return flys in ointment

2013-07-06 Thread Jim Mooney
"Do they mean version 3 and above?" since a lot is not ready for version 3. BTW, I understand the basics of regexes, but had some problems and looked into pyparsing. Has anyone used that and does it seem better than regexes, or easier on the noggin? Jim "I asked God for a bike, but

Re: [Tutor] please return flys in ointment

2013-07-06 Thread Jim Mooney
seemed natural since a user entering Zero is, I assume, asking for what they want, and they get Zero, finissimo. But I guess I should be generous and figure they mistyped, then loop for better input. I think I already asked (or maybe not) if more than one exit is a good idea, though. -- Jim &qu

[Tutor] please return flys in ointment

2013-07-06 Thread Jim Mooney
first, second, third, last_two = (triplet[0], triplet[1], triplet[2], triplet[1:]) if triplet == '000': triplen -= 1 continue if first > '0': if last_two == '00': # special case - snip extra space separator

[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

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

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-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/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] 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,

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

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

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

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] 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] 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
;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! __

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

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

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

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

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

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

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

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

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

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

[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] 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/

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

<    1   2   3   4   5   6   >