Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread jim stockford
IMO: my experience with cms systems is that there's a big learning curve. you might have more fun (and be more productive and maybe more creative) if you use the available appropriate python modules and cobble together your own site. maintenance, especially by some one else, would be an area t

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread jim stockford
On Nov 27, 2007, at 9:40 AM, Scott SA wrote: > On 11/27/07, jim stockford ([EMAIL PROTECTED]) wrote: > >> IMO: >> my experience with cms systems is that there's a big >> learning curve. you might have more fun (and be more >> productive and maybe more cr

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread jim stockford
I'd love to know scott's definition of "framework", especially contrasting with full-blown CMS. Frameworks for Python: CherryPy · Django · Karrigell · Nevow · Porcupine · Pylons · Spyce · TurboGears · TwistedWeb · Webware · Zope per http://en.wikipedia.org/wiki/Django_(web_framework)

Re: [Tutor] lstrip removes '/' unexpectedly

2007-11-30 Thread jim stockford
it might work just to strip 'home' and leave print s1 //test/ the '/' character is a separator, so /this//that/andmore/ is, at least at the shell level, the same as /this/that/andmore/ i.e. any number of '/' characters adjacent has the effect of a single '/' character (again, at the shell level)

Re: [Tutor] Indentation Issue and Blind People

2007-11-30 Thread jim stockford
who may be interested, I have created a scheme for my screen reader > that > plays piano notes at indentations of two space increments. I made the > code > indent that way because four spaces is a lot to have on a braille > display. > If four spaces is more acceptable, I coul

[Tutor] using quotes in IDLE

2007-12-13 Thread Jim Morcombe
A really dumb question... When typing things into IDLE, how are quotes meant to work? If I type" employee.name = "Susan" then IDLE ignores the last " and I get an error. Jim ___ Tutor maillist - Tutor@python.org http://mai

[Tutor] Something I don't understand

2007-12-17 Thread Jim Morcombe
t; 200. But if I change the test to "<1" then nothing gets set to zero. Jim class student: def __init__ (self, name, row, column): self.name = name self.row = row self.column = column for student in student_seats:

[Tutor] Oops:

2007-12-17 Thread Jim Morcombe
easiest and recomended way of turning the strings into numerics? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Placing entire Application inside a class

2007-12-18 Thread Jim Morcombe
ded Python programming technique? http://student-iat.ubalt.edu/sde/students/lemaster/COSC330/Final/sec4_AppClass.html Why is this so? Surely in many cases you end up with a constructor for the class that is cumbersome and complex? Is this a recomended Python programming techn

[Tutor] constants, flags or whatever

2007-12-19 Thread Jim Morcombe
In a program, I want to set some kind of variable or object to indicate what "mode" the program is currently in. What is the most elegant way of doing this? Jim --- constant: moving = "m" cons

[Tutor] re-initialising shells

2007-12-20 Thread Jim Morcombe
it is using an old version of qwerty. I close down all my python windows, start it again and the changes are picked up. What are the rules with "shells" and so on? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Microsoft Access

2007-12-27 Thread Jim Morcombe
Are there any simple tutorials on using MS Access from Python? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Microsoft Access

2007-12-27 Thread Jim Morcombe
-- From: Darren Williams To: Jim Morcombe ; tutor@python.org Sent: Friday, December 28, 2007 11:12 AM Subject: Re: [Tutor] Microsoft Access Typing 'Using MS Access from Python' into Google returned a few results, one in particular - http://wwwmarkcarter.me.uk/computing/python/a

[Tutor] Closing GUI program

2007-12-27 Thread Jim Morcombe
message "The program is still running. Do you want to kill it?" How do I get the program to terminate when the window is closed? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Closing GUI program

2007-12-27 Thread Jim Morcombe
Oops! Here's the program: --- from Tkinter import * root = Tk() z = Label(root, text="Hello World!") z.grid() root.mainloop() ------ Jim - Original Message ----- From: Jim Morcombe To: python tutor mailing list

[Tutor] How do I get GASP

2008-02-26 Thread Jim Morcobe
Hi, I'd like to download a copy of GASP to run on Windows XP. Is there a simple Windows installer available anywhere so I can do it with minimal effort? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python oddity

2008-02-27 Thread jim stockford
i'm guessing this is the "post-it effect". aa = range(0,10) print aa [0,1,2,3,4,5,6,7,8,9] # what you've done is to use the range function to # create the list of 0 to 9, then you associated the # name aa to the list. a popular teaching analogy # is that of putting a post-it that says aa on the l

Re: [Tutor] Python oddity

2008-02-28 Thread jim stockford
i'd like to know, too. my take so far is * don't make any copies if you can avoid doing so, * make shallow copies if need be, * make deep copies only if you can't think of any other way to accomplish what you're up to. what's the truth? I'm hoping there's an OTW answer (OTW ~> "One True Way").

[Tutor] Sorting a list of lists aka nested lists

2005-08-13 Thread Jim Roush
I have a python script that creates a list of lists like so: Quant.append( [ db_ticker, stock_close, MTD, 0, QTD, 0, YTD, 0, 0, 0 ] ) After Quant is created, I want to sort it by MTD. If I use a simple Quant.sort(), I assume its going to sort by 'db_ticker' which is not what I want. I've

Re: [Tutor] Sorting a list of lists aka nested lists

2005-08-13 Thread Jim Roush
Danny Yoo wrote: >On Sat, 13 Aug 2005, Jim Roush wrote: > > > >>I have a python script that creates a list of lists like so: >> >>Quant.append( [ db_ticker, stock_close, MTD, 0, QTD, 0, YTD, 0, 0, 0 ] ) >> >>After Quant is created, I want to sort

[Tutor] What does import really do?

2006-08-14 Thread jim stockford
For example, import os import sys My take is that one uses the import keyword in a program. The Python interpreter reads the program and generates machine code. The import keyword directs the Python interpreter to find some library (which is not necessarily named, certainly not necess

Re: [Tutor] What does import really do?

2006-08-14 Thread jim stockford
y way of explaining my avoidance above. Might help to know I very much liked working in assembler and infer possible assembler correspondences when I wonder about code behavior. Your rundown of search order is helpful. more thanks. jim On Aug 14, 2006, at 7:52 PM, Luke Paireepinart wrote:

Re: [Tutor] Which Book

2006-08-17 Thread jim stockford
i think it's a mistake to concentrate on one book. Cull responses and pick three books to start with. The benefit is that where one book presents a poor explanation, another will do a good job (and one book will omit certain things that another presents). Also, you'll probably find you

Re: [Tutor] first programming project

2006-08-18 Thread jim stockford
i hope this helps: what a fun idea! do it! my way is to do a bad job fast then re-visit the plans and reimplement and test and re-visit and reimplement and test and consider writing a main program that does the primary work and outputs as text-only. maybe then create four clas

Re: [Tutor] looping problem

2006-09-23 Thread jim stockford
keep a counter in your loop. is this a homework question? On Sep 23, 2006, at 8:34 AM, kumar s wrote: > hi, > > the reason could be that I did not quite understand > the concept of looping > > I have a list of 48 elements > > I want to create another two lists , listA and listB > > I want to loo

Re: [Tutor] looping problem

2006-09-23 Thread jim stockford
t; Now I want to select ''GeneName ' into listA > and 'ATTAAGGCCAA' into listB > > so I want to select 0,3,6,9 elements into listA > and 2,5,8,11 and so on elements into listB > > then I can do dict(zip(listA,listB)) > > however, the ve

[Tutor] what.built-in

2006-09-29 Thread jim stockford
from http://docs.python.org/lib/built-in-funcs.html some functions are always available--the built-in functions. (from elsewhere) everything in python is an object. hey, from abs() to zip() there's type() and super() and str() and setattr() and ... dir() and... they're the

Re: [Tutor] Matching on multiple log lines

2006-10-28 Thread jim stockford
so it's guaranteed that 'Writing Message to' will always be followed by 'TRANSPORT_STREAM_ID' before the next occurrence of 'Writing Message to' and all text between can be ignored, and we increment the counter if and only if there is a newline immediately after 'TRANSPORT_STREAM_I

Re: [Tutor] 'elp!!!!!!!1Totally Clueless Newbie In Distress

2007-01-21 Thread jim stockford
no need for apology on my side. there's no agreed-upon and expressed policy. i like the model that we accept each other as we are. On Jan 20, 2007, at 7:10 AM, Karl Wittgenstein wrote: > Sorry for the swear words... > > 2007/1/20, Kent Johnson <[EMAIL PROTECTED]>: Karl Wittgenstein w

[Tutor] Squlite3 problem

2007-03-13 Thread Jim Roush
I'm geting the following error message and I'm stumped Traceback (most recent call last): File "C:\markets\source\QuantScan\QuantScan4_3.py", line 1362, in db.close() sqlite3.OperationalError: Unable to close due to unfinalised statements Here 's the relevant code db = sqlite.conn

Re: [Tutor] self-learning Python

2008-03-08 Thread jim stockford
i'm working (gratefully) with a small python study group and preparing an intro to python class. if you like, i'll send you my lessons and hope for your questions and feedback.mine is certainly not the best python material (i think it's not bad), but it comes with the ability for you t

Re: [Tutor] question concerning Boolean operators

2008-03-20 Thread jim stockford
i'm guessing assignment, which actually associates a reference, will skip referencing an identifier to a null and will make the association (assignment) to the first non-null value in the expression, which is string2 in this case. that the identifier is non_null is immaterial; you could write

[Tutor] destroying windows

2008-06-30 Thread Jim Morcombe
error is displayed at the bottom of the program listing. Jim -- from Tkinter import * class display_Colour_Selector_window(): def __init__(self): window1 = Tk() window1.title("Colour Sel

[Tutor] regular expressions

2008-08-05 Thread Jim Morcombe
Could someone please give me some help using the "re" module. This works: import re text = "Jim is a good guy" s2 = re.sub('Jim', 'Fred', text) print s2 and I get "Fred is a good guy" --

[Tutor] names and variables

2008-08-20 Thread Jim Morcombe
want to have a line of code: something like this: print myObject.myAttribute and have Python interpret it as meaning "print myObject.colour" and hence print "red" Can this be done? If so, how? Jim Morcombe ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Calling Python Programs from Word, pdfs, etc

2008-09-04 Thread Jim Morcombe
does anyone have any experience with ebooks that launch Python Applications? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Simple physics simulations)

2008-09-14 Thread Jim Morcombe
and simple objects, and allowing the User to do the same. So the question - What is the best thing to use to draw and manipulate simple 2D objects in an application like this? Jim Morcombe ___ Tutor maillist - Tutor@python.org http

[Tutor] Finding the IP address for your own PC

2008-10-12 Thread Jim Morcombe
Hopefully this is an easy one. How do you get the IP address of the Windows PC that your Python program is running on? Jim Morcombe ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Multi-User file system

2008-11-01 Thread Jim Morcombe
I want to have a couple of files that can be updated simultaneously be several users. I don't want to go to the effort of having the users set up a RDMS and would like to control everything from Python. I am after something like shelve, but with record locking. Is there such a thing?

Re: [Tutor] Multi-User file system

2008-11-01 Thread Jim Morcombe
Would pySQLite be a reasonable choice for this? Jim Morcombe Jim Morcombe wrote: I want to have a couple of files that can be updated simultaneously be several users. I don't want to go to the effort of having the users set up a RDMS and would like to control everything from Python.

[Tutor] Using Python to replace javascript

2008-11-06 Thread Jim Morcombe
Is there any way to write python code inside a HTML page instead of using Javascript? Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] cgi scripts

2008-11-07 Thread Jim Morcombe
I want to print a list of the keys and their values passed to a cgi script by an HTML form. I have tried this, but just seems to crash. Any ideas? Jim Morcombe #!C:\python25\python.exe import cgi, sys # import cgitb; cgitb.enable() #Send errors to browser sys.stderr = sys.stdout #Parse

Re: [Tutor] cgi scripts

2008-11-08 Thread Jim Morcombe
Bt "Crash", I mean the browser displays: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. The code I sent before had a silly mistake in it. Here is a better example of the things I am trying and failing at. I can

Re: [Tutor] cgi scripts

2008-11-08 Thread Jim Morcombe
might have been producing illegal HTML code before. I think I'd better brush up on my HTML skills. Jim Alan Gauld wrote: "Jim Morcombe" <[EMAIL PROTECTED]> wrote The code I sent before had a silly mistake in it. Here is a better example of the things I am trying

Re: [Tutor] cgi scripts

2008-11-10 Thread Jim Morcombe
y not all. Jim Don Jennings wrote: Hi, Jim. Actually, improper HTML would cause a problem with the browser and what it may or may not display. An "Internal Server Error" does indicate that you had a problem with your code. I suggest referring back to Alan's po

[Tutor] cgi on novell/Appache

2008-12-02 Thread Jim Morcombe
on it. I have to change the script, give it to the admin guy and let him load it. He knows nothing about cgi, python, etc. ) What is the novel equivalent of "/usr/bin/python"? Jim ___ Tutor maillist - Tutor@python.org http://mail.pyt

[Tutor] Confused about __setitem__

2008-12-03 Thread Jim Hodgen
I am learning Python with a minesweeper-engine project. Future activities turn my attention to exploring the use of dictionaries as sparse matrices, hence the representation of the gameboard. Why can't I fill the dictionary-as-a-matrix with an instance of class Square? Why do I need a custo

[Tutor] Need help with the property function

2011-04-13 Thread Jim Byrnes
it__ self.name = name AttributeError: can't set attribute If I change [1] to [3] the program runs with no errors. Could someone please explain why I am seeing these results. Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Need help with the property function

2011-04-14 Thread Jim Byrnes
Steven D'Aprano wrote: Jim Byrnes wrote: I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. What's Dawson's book? Python Programming for the absolute beginner, by Michael Dawson Thanks for the exp

Re: [Tutor] Need help with the property function

2011-04-14 Thread Jim Byrnes
Dave Angel wrote: On 01/-10/-28163 02:59 PM, Jim Byrnes wrote: I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. class Critter(object): """ A virtual pet """ def __init__(self, name): print

Re: [Tutor] Unpack requires a string argument of length 8

2011-05-03 Thread Jim Richardson
On Mon, May 2, 2011 at 1:17 PM, Marc Tompkins wrote: > On Mon, May 2, 2011 at 12:36 PM, Susana Iraiis Delgado Rodriguez > wrote: >> >> I'm working on getting information that comes from a dbf file (database), >> this dbf file is related to another file in the system, a shapefile. My code >> is tr

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Jim Richardson
On Mon, Jun 13, 2011 at 7:22 AM, Fred G wrote: > Hello-- > I'm a pre-med student interested in decision-making as applied to medical > decisions.  I am trying to build a medical decision-making algorithm and am > pretty stuck on a few things. > I've built a file that contains a list of many diseas

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Jim Richardson
On Mon, Jun 13, 2011 at 3:35 PM, Fred G wrote: > Thanks guys for all the feedback. > re Jim's comments: I completely agree that the difference b/t "slight" fever > and "returning" fever, etc will pose some problems.  My hunch is that > initially I'll just do something like make "fever" be the only

[Tutor] learning how to convert script to python

2011-06-27 Thread Jim Syyap
I am learning python at the moment--this is something I would like to work on/convert. It's a poker application that opens a table for you every x-minutes. The project has been discontinued and I would like to convert it to python, then use it. Can you tell me what language this is--lisp or autoho

[Tutor] Lotka-Volterra Model Simulation Questions

2012-09-28 Thread Jim Apto
27;) pylab.show() The issue i'm having is the logic in the lists. How can I create the simulation function using lists and make it perform the expected task of creating a graph? I can't seem to get the logic right. Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Fraction - differing interpretations for number and string - presentation

2015-04-16 Thread Jim Mooney
ction(string(float)). In terms of user presentation, the string usage has smaller numbers for the ratio, so it would be more understandable and should, I assume, be chosen for GUI display. -- Jim The Paleo diet causes Albinism ___ Tutor maillist - Tu

Re: [Tutor] Fraction - differing interpretations for number and string - presentation

2015-04-16 Thread Jim Mooney
d, be more accurate if used in certain calculations rather than being normalized to a float - such as in a Fortran subroutine or perhaps if exported to a machine with a longer bit-length? That's mainly what I was interested in - if there is any usable difference between the two results. Jim The Pa

[Tutor] sample dictionairies

2015-04-19 Thread Jim Mooney
Where could I download Python sample dictionaries on different subjects. They're hard to type and I can only do small, limited ones to practice with. -- Jim The probability of a piano falling on my head is 50%. After it falls on my head the probability is 100%. My confidence in the

Re: [Tutor] sample dictionairies

2015-04-20 Thread Jim Mooney
er, so making big dicts was easy. Naturally, I tried emailing one of the addresses - aliq...@nunc.org - but it appears to be dead ;') Come to think of it, since I used | as a delimiter, what happens if you generate a CSV file from data that already has commas in the text? -- Jim ___

[Tutor] bin to dec conversion puzzlement

2015-04-20 Thread Jim Mooney
plying digits by successive powers of two, and adding, like so: B = '11011101' sum = 0 for exp, num in enumerate(reversed(B)): sum += int(num) * 2**exp print(sum) >> 221 Both methods work but I just can't see how the first

Re: [Tutor] sample dictionairies

2015-04-20 Thread Jim Mooney
> Which is why you should use the csv module to work with csv files, > it knows how to deal with these various exceptional cases. > -- > Alan G > I should have known to simply try importing csv. Must-remember-batteries-included ;') -- Jim _

Re: [Tutor] bin to dec conversion puzzlement

2015-04-20 Thread Jim Mooney
f the binary number by it's respective power of two, and sum them all at once. I hear Py 3.5 will have vector abilities. I wonder it if would do something like that. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscripti

[Tutor] enhanced subtration in an exponent

2015-04-21 Thread Jim Mooney
Why does the compiler choke on this? It seems to me that the enhanced subtraction resolves to a legitimate integer in the exponent, but I get a syntax error: B = '11011101' sum = 0 start = len(B) for char in B: sum += int(char) * 2**(start -= 1) ## syntax error print(sum

[Tutor] calling a method directly

2015-04-21 Thread Jim Mooney
Is there any difference between these two since they give the same result, and when is the second preferred? >>> x = 'ABE' >>> x.lower() 'abe' >>> str.lower(x) 'abe' -- Jim ___ Tutor maillist

[Tutor] name shortening in a csv module output

2015-04-23 Thread Jim Mooney
ox 538, 4484 Sem Avenue|81833 Duncan|Hutchinson|donec.vi...@integer.co.uk|Dublin|Leinster|Ap #847-2344 Feugiat. St.|9222 ... My result: Ï»¿First NameLast Name # odd characters on header line == Stewartrewqrh

Re: [Tutor] name shortening in a csv module output

2015-04-23 Thread Jim Mooney
.. > Ï»¿ > > is the UTF-8 BOM (byte order mark) interpreted as Latin 1. > > If the input is UTF-8 you can get rid of the BOM with > > with open("data.txt", encoding="utf-8-sig") as csvfile: > Peter Otten I caught the bad arithmetic on name length, but where is the byte order mark coming from? My

Re: [Tutor] name shortening in a csv module output

2015-04-23 Thread Jim Mooney
> > By relying on the default when you read it, you're making an unspoken > assumption about the encoding of the file. > > -- > DaveA So is there any way to sniff the encoding, including the BOM (which appears to be used or not used randomly for utf-8), so you can then use the proper encoding, or

Re: [Tutor] name shortening in a csv module output

2015-04-24 Thread Jim Mooney
an I assume just using utf-8-sig as my default encoding, even on a non-BOM file, would do no harm? Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Spongebob Pythonpants

2015-04-24 Thread Jim Mooney
#x27; .' _.' .' | `-.-' /-.__ ' .-' .' `-.` '.|='=.='=.='=.='=|._/_ `-'.' `-._ `. |/\_|`-.' .' ).| '=' '='\/ '=' | `._.` '---' //___\ //___\ || || LGB ||_.-. ||_.-. (_.--__) (_.--__) >>> -- Jim No comment ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Spongebob Pythonpants

2015-04-24 Thread Jim Mooney
ol on a bright Summer day, instead of playing with Python. I wonder if there's a Unicode for Idiots book ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] name shortening in a csv module output

2015-04-24 Thread Jim Mooney
nd utf-8) I see no aliases for utf_8_sig, so I'm surprised the utf-8-sig I tried using, worked at all. Actually, I was trying to find the file where the aliases are so I could change it and have utf_8_sig called up when I used utf8, but it appears to be hard-coded. -- Jim __

[Tutor] sig no matter what

2015-04-24 Thread Jim Mooney
quot;utf_8_sig") 'many moons ago I sat on a rock' >>> str(farf, encoding="utf-8-sig") 'many moons ago I sat on a rock' >>> str(farf, encoding="utf_8-sig") 'many moons ago I sat on a rock' >>> str(farf, encoding="utf-8_sig

[Tutor] Making an alias

2015-04-24 Thread Jim Mooney
e end of your alias, it breaks Python (or my Pyscripter editor, anyway ;') -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Spongebob Pythonpants

2015-04-25 Thread Jim Mooney
ied the Unicode Consortium website at unicode.org, but forget that - I'd rather pull my own teeth than wade through it ;') Jim If you only had one hour left to live, would you spend it on Facebook, Twitter, or Google Plus? ___ Tutor maillist

Re: [Tutor] name shortening in a csv module output

2015-04-25 Thread Jim Mooney
> > > I wouldn't use utf-8-sig for output, however, as it puts the BOM in the > file for others to trip over. > > -- > DaveA Yeah, I found that out when I altered the aliases.py dictionary and added 'ubom' : 'utf_8_sig' as an item. Encoding didn't work out so good, but decoding was fine ;') _

Re: [Tutor] sig no matter what

2015-04-25 Thread Jim Mooney
: 'utf_8', 'utf8_ucs4' : 'utf_8', 'ubom' : 'utf_8_sig' So of course my favorite is u8 - less typing, and ubom for decoding if I get those funny bytes ;') -- Jim If you only had one hour left to

Re: [Tutor] Codec lookup, was Re: name shortening in a csv module output

2015-04-25 Thread Jim Mooney
coding ---") > b'Hello' > > ;) > Peter Otten > __ > Or normalize almost any mistyping ;'): >>> encodings.normalize_encoding('utf&&$%##8') 'utf_8' -- Jim If you only had one hour left to live, would you spend it on Facebook, Twitter, or Google Plus?

[Tutor] REPL format

2015-04-25 Thread Jim Mooney
;\r\n' '\r\n' ... bunch of stuff ... '\t\t\t222\t\r\n' '\t\t\r\n' '\r\n' '\r\n' '\r\n' '\t\r\n') -- Jim If you only had one hour left to live, would you spend it on Facebook, Twitter, or Google Plus? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] REPL format

2015-04-26 Thread Jim Mooney
', 'eggs', 'spam' >>> a 'ham' >>> b ['eggs', 'spam'] >>> *b = 'eggs', 'spam' SyntaxError: starred assignment target must be in a list or tuple >>> -- Jim If you only had one hour left to live, would you spend it on Facebook, Twitter, or Google Plus? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Please disable “digest mode” before participating (was: Tutor Digest, Vol 134, Issue 86)

2015-04-26 Thread Jim Mooney
be some other mail services have this, too. You'd have to look. -- Jim If you only had one hour left to live, would you spend it on Facebook, Twitter, or Google Plus? ___ Tutor maillist - Tutor@python.org To unsubscribe or change sub

[Tutor] Calculation error with a simple program

2015-12-12 Thread Jim Gallaher
a couple fees. For example, if I put in a value of 1, it will output 752.12 as the sub total and 753.12 as the grand total. It's off by 1 on sub total and 2 on grand total. Thanks in advance! Jim Gallaher # Car Salesman Calculator # User enters the base price of the car and the progra

Re: [Tutor] Calculation error with a simple program

2015-12-12 Thread Jim Gallaher
Hi Alan, I'm 100 percent sure I'm wrong. :-) I verified it when I fixed the mistake. The problem was it was adding in the basePrice and the fixed rates/percentages each time. So I figured it out when Ian said something about that. Thanks for everyone's help! :-)

[Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Jim Byrnes
o run programs with it? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT: How to automate user interactions with GUI elements of closed-source programs?

2015-12-24 Thread Jim Byrnes
sure about Chrome. Both also have user forums. Regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-24 Thread Jim Byrnes
roper environment. I know Pythoncard is not maintained any more. I have one program I wrote using it that I use often so I wanted to see it worked on 14.04. It will be a good learning experience to rewrite it for python 3 using something else. Regards,

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-24 Thread Jim Byrnes
On 12/24/2015 04:03 PM, Ben Finney wrote: Jim Byrnes writes: Thanks for all the info guys. I got myself confused because I thought that python 3 was the default for Ubuntu 14.04, but it is just installed by default. Even if that were true, the ‘python’ command will likely still invoke a

[Tutor] Variable in tkinter?

2016-07-23 Thread Jim Byrnes
is wrong because the program does work. Could someone explain to me why it works? Regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Variable in tkinter?

2016-07-24 Thread Jim Byrnes
On 07/24/2016 02:08 PM, Alan Gauld via Tutor wrote: On 23/07/16 16:38, Jim Byrnes wrote: # the views frame = tkinter.Frame(window) frame.pack() button = tkinter.Button(frame, text='Up', command=click_up) button.pack() button = tkinter.Button(frame, text='Down', command=cli

[Tutor] OOP help needed

2016-07-26 Thread Jim Byrnes
tuations look the same to me but they must be different somehow and I just don't see the difference. Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OOP help needed

2016-07-27 Thread Jim Byrnes
On 07/26/2016 11:38 PM, Ben Finney wrote: Jim Byrnes writes: So I decided to give it another try. When I got to the chapter on tkinter I decided to solve all the exercises using OOP even though the book solutions did not use OOP. Hmm, that sounds ill advised. OOP is one tool among many

Re: [Tutor] OOP help needed

2016-07-27 Thread Jim Byrnes
On 07/27/2016 03:12 AM, Peter Otten wrote: Jim Byrnes wrote: OOP has always driven me crazy. I read the material and follow the examples until I feel I understand them, but when I try to implement it I end up with an error filled mess. So I decided to give it another try. When I got to the

Re: [Tutor] OOP help needed

2016-07-27 Thread Jim Byrnes
On 07/27/2016 04:04 AM, Alan Gauld via Tutor wrote: On 27/07/16 04:44, Jim Byrnes wrote: OOP has always driven me crazy. I read the material and follow the examples until I feel I understand them, but when I try to implement it I end up with an error filled mess. That suggests that its not

[Tutor] Regex/Raw String confusion

2016-08-03 Thread Jim Byrnes
import re phoneNumRegex = re.compile(r'(\(\d\d\d\)) (\d\d\d-\d\d\d\d)') mo = phoneNumRegex.search('My phone number is: (415) 555-4242.') print(mo.group(1)) print() print(mo.group(2)) Both examples work, but one place he says you can't escape raw strings and t

Re: [Tutor] Regex/Raw String confusion

2016-08-03 Thread Jim Byrnes
On 08/03/2016 06:21 PM, Alan Gauld via Tutor wrote: On 03/08/16 20:49, Jim Byrnes wrote: Regular Expressions he talks about the python escape character being a '\' and regex using alot of backslashes. In effect there are two levels of escape character, python and the regex

Re: [Tutor] Regex/Raw String confusion

2016-08-04 Thread Jim Byrnes
On 08/04/2016 03:27 AM, Alan Gauld via Tutor wrote: On 04/08/16 02:54, Jim Byrnes wrote: Is the second example a special case? phoneNumRegex = re.compile(r'(\(\d\d\d\)) (\d\d\d-\d\d\d\d)') I ask because it produces the same results with or without the ' r '. That's

[Tutor] tkinter/sqlite3?

2016-08-25 Thread Jim Byrnes
o tkinter and am curious why it works in the pythoncard version and not the tkinter version. I'm not sure where it is coming up with the 8 bindings it said are supplied? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] tkinter/sqlite3?

2016-08-26 Thread Jim Byrnes
On 08/26/2016 02:03 AM, Peter Otten wrote: Jim Byrnes wrote: I am working with Python 3.4.3 on Ubuntu 14.04. I am learning tkinter so I decided to rewrite a program I had written in pythoncard in tkinter. I found that a sqlite3 SELECT statement that works in pythoncard throws an error in

Re: [Tutor] tkinter/sqlite3?

2016-08-26 Thread Jim Byrnes
On 08/26/2016 04:22 AM, Alan Gauld via Tutor wrote: On 26/08/16 02:34, Jim Byrnes wrote: Exception in Tkinter callback Traceback (most recent call last): ... File "tk_pwds.py", line 56, in fill_accounts_lb cur.execute('''SELECT Account FROM pwds WHERE Ca

[Tutor] pip says no downloads for PyMedia

2016-09-10 Thread Jim Byrnes
line 277, in find_requirement raise DistributionNotFound('No distributions at all found for %s' % req) pip.exceptions.DistributionNotFound: No distributions at all found for PyMedia I am using python3 could that be the problem? I looked but couldn't find any i

Re: [Tutor] pip says no downloads for PyMedia

2016-09-12 Thread Jim Byrnes
On 09/12/2016 06:06 PM, boB Stepp wrote: On Sep 10, 2016 7:20 PM, "Jim Byrnes" wrote: I am using python3 could that be the problem? I looked but couldn't find any info on what version of python is needed. I went to pymedia.org. The copyright at the bottom of the pa

<    1   2   3   4   5   6   >