Re: [Tutor] print 'hello world' - invalid syntax

2012-05-20 Thread boB Stepp
On Sun, May 20, 2012 at 1:08 PM, Quidam S-enfuit wrote: > > I have installed python on the windows 7 machine. (Tried 64 bit version > also; same error). > I tried print "Hello world" and  print 'hello world'.  It stated syntax > error!?... > Thanks. > ===copied from python (interactive command

[Tutor] While learning Py: To IDE or not to IDE?

2012-05-20 Thread boB Stepp
Programming background; 1975-1978: FORTRAN, BASIC, some machine language/assembler. 1988: A summer of FORTRAN. Post-1988: No programming until past 1.5 yr. FORTRAN was used during pursuit of physics degree. Others while playing around developing games for minicomputers. Structured programming para

[Tutor] Teaching an 8-year-old programming.

2012-05-20 Thread boB Stepp
This is, in a sense, a related question to the ones I just posted. While observing me studying programming, my son has become interested in learning how to program as well. I have given him a very old Gateway PC to play around with. It was new when W95 came out. I have started him out with QBASIC,

Re: [Tutor] Teaching an 8-year-old programming.

2012-05-20 Thread boB Stepp
On Sun, May 20, 2012 at 4:15 PM, Devin Jeanpierre wrote: > I've heard remarkable things about http://www.programbydesign.org/ , > but it's aimed at students a little older. Its design might help you; > although, it also probably depends on motivation / what you want to > teach. > > Anyway, that's

Re: [Tutor] While learning Py: To IDE or not to IDE?

2012-05-20 Thread boB Stepp
On Sun, May 20, 2012 at 4:44 PM, Brian van den Broek wrote: > These are close to religious questions :-) > > With you polyglot agenda, I would say you would be much better off to learn > a powerful multipurpose editor well than to try to find the best of breed of > each class of special purpose t

Re: [Tutor] Teaching an 8-year-old programming.

2012-05-20 Thread boB Stepp
On Sun, May 20, 2012 at 6:16 PM, Robert Sjoblom wrote: > "Snake wrangling for kids" is pretty good for teaching Python; it's > also free (which is a bonus): > http://www.briggs.net.nz/snake-wrangling-for-kids.html > Thanks everyone for all of the good suggestions! After spending most of the day

[Tutor] Optimally configuring Emacs for W7-64bit and Python

2012-05-21 Thread boB Stepp
Many thanks for all of the helpful input to my original questions. The deciding factors came down to the fact that GNU Emacs, vintage year 2001, is available on the Sun Blade at work, I already own the book "Learning GNU Emacs" and it would be nice to have my fingers trained the same way for both w

Re: [Tutor] Optimally configuring Emacs for W7-64bit and Python

2012-05-22 Thread boB Stepp
> Install python mode. > Learn how to get the python shell running inside emacs. > Learn how to get a cmd shell running inside emacs > Learn how to do split windows On some of the pages I recall looking at, it was mentioned that Emacs comes with two major modes for Python. It was not clear to me w

Re: [Tutor] Optimally configuring Emacs for W7-64bit and Python

2012-05-22 Thread boB Stepp
but I will not be able to provide much (any?) help in the immediate future. > > (If emacs seems like you will stick to it, do have a look at orgmode.) > Brian, does org-mode amount to a personal information manager? What are the things you especially like about it? Cheers! boB __

Re: [Tutor] [OT] Re: Optimally configuring Emacs for W7-64bit and Python

2012-05-27 Thread boB Stepp
> I'd be happy to answer any further questions you might have. But, 1) I won't > be prompt due to travel, and 2) if you write about org-mode, let us go > off-list as we've strayed from tutor's purpose. > Brian, my primary question(s) are how to best configure Emacs for Python development. Is the e

[Tutor] Civil discourse from a newbie's perspective

2012-10-01 Thread boB Stepp
itive, frustrated or tentative newbies! -- Cheers! boB Stepp ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Civil discourse from a newbie's perspective

2012-10-02 Thread boB Stepp
On Tue, Oct 2, 2012 at 7:25 AM, Francois Dion wrote: > Even worse would be the case of a young aficionado. It is very hard > to infer the age of a person from a post. As Python is making inroads > in the K-12 sector and through inexpensive computing platforms such as > OLPC, the Raspberry Pi and

Re: [Tutor] Civil discourse from a newbie's perspective

2012-10-02 Thread boB Stepp
ith English comprehension? Sheer stubbornness? Or something more innocent? I have no clue. But fellow newbies: Please (!!!) read the contents of the welcome message. It spells out in great detail the expectations for posting here and might help you get your questions answered much more quickly and

Re: [Tutor] Civil discourse from a newbie's perspective

2012-10-02 Thread boB Stepp
On Tue, Oct 2, 2012 at 6:25 PM, boB Stepp wrote: > This is the beginning of exactly the same message I received when I > first joined this mailing list. Honestly, newbie or not, I do not > understand why many of the posts from newcomers so routinely violate > the contents of

[Tutor] Why difference between printing string & typing its object reference at the prompt?

2012-10-02 Thread boB Stepp
After much diddling around I have finally settled on a text to study (Programming in Python 3, 2nd edition, by Mark Summerfield) and have defaulted to using IDLE, deferring worrying about editors/IDEs until I feel comfortable in Python. I am puzzled by the results of the following: >>> x = "Test"

Re: [Tutor] Why difference between printing string & typing its object reference at the prompt?

2012-10-03 Thread boB Stepp
Thanks to all who responded. There was much more going on here than I ever would have suspected. I am glad I asked the questions I did. This has been very informative. On Tue, Oct 2, 2012 at 11:53 PM, Dave Angel wrote: > > There are two operations supported by (most) objects that produce a > str

Re: [Tutor] Why difference between printing string & typing its object reference at the prompt?

2012-10-03 Thread boB Stepp
On Wed, Oct 3, 2012 at 1:38 AM, Steven D'Aprano wrote: > The long answer is a bit more subtle, and rather long. I had initial suspicions this would be the case Thanks for yours and Dave's detailed exposition! [...] > Python is no different: words, text if you will, that are part of the > code

Re: [Tutor] string rules for 'number'

2012-10-07 Thread boB Stepp
On Oct 7, 2012 12:47 PM, "Arnej Duranovic" wrote: > > When I type this in the python idle shell ( version 3...) : > '0' <= '10' <= '9' > The interpreter evaluates this as true, WHY? 10 is greater than 0 but not 9 Since they are strings it looks at these character by character. Since '

Re: [Tutor] Why difference between printing string & typing its object reference at the prompt?

2012-10-08 Thread boB Stepp
Steve, On Thu, Oct 4, 2012 at 6:28 AM, Steven D'Aprano wrote: > > Now, ask me about *raw strings*, and the difference between Unicode > and byte strings :) How can I resist asking! I am not in chapter 2 of my study text yet, but looking ahead raw strings seem to be a method of declaring everyth

Re: [Tutor] Why difference between printing string & typing its object reference at the prompt?

2012-10-10 Thread boB Stepp
On Tue, Oct 9, 2012 at 4:29 AM, eryksun wrote: > Python 3 lets you use any Unicode letter as an identifier, including > letter modifiers ("Lm") and number letters ("Nl"). For example: > > >>> aꘌꘌb = True > >>> aꘌꘌb > True > > >>> Ⅰ, Ⅱ, Ⅲ, Ⅳ, Ⅴ = range(1, 6) > >>> Ⅰ, Ⅱ, Ⅲ, Ⅳ, Ⅴ

[Tutor] Objects, object references, object values and memory addresses

2012-10-17 Thread boB Stepp
>From Programming in Python 3, 2nd edition (p. 22-23): >>> a = ["Retention", 3, None] >>> b = ["Retention", 3, None] >>> a is b False >>> b = a >>> a is b True My current understanding is as follows: On the first two lines, two separate objects are defined, stored in two separate blocks of memory

[Tutor] IDLE shell indentation?

2012-10-18 Thread boB Stepp
>>> if zero: print(zero) else: print(phrase) Wild Swans by Jung Chang >>> Is there some special way for typing in multiline blocks of code into the shell in IDLE? The above works, but it bothers me that "else" does not line up with "if". Also, in the IDLE shell the "p" in

Re: [Tutor] IDLE shell indentation?

2012-10-18 Thread boB Stepp
On Thu, Oct 18, 2012 at 9:46 PM, eryksun wrote: > You're right that the alignment changed because of the font rendering > of the tab character. In Firefox I use the following to get a > monospace font in Gmail: > > http://userstyles.org/styles/15618/gmail-monospace-font-for-body-messages-textare

[Tutor] How to print ALL contents of a scrolled Tkinter window?

2015-04-17 Thread boB Stepp
Solaris 10, Python 2.4.4 Thanks to earlier help from this list, I can now print a particular Tkinter-generated window. But this will only print what is currently viewable on the screen. In the case of scrolled information that is currently outside the viewing area, it would be missed by such a pri

Re: [Tutor] How to print ALL contents of a scrolled Tkinter window?

2015-04-17 Thread boB Stepp
On Fri, Apr 17, 2015 at 9:29 AM, Laura Creighton wrote: >>While I can probably make this >>approach work (It *seems* conceptually simple.), I cannot help but >>feel there is a much better way... > > Tkinter is very old software. This sort of scrolling you want was > in no way common when Tkinter

Re: [Tutor] How to print ALL contents of a scrolled Tkinter window?

2015-04-18 Thread boB Stepp
t of OS hassle. In my particular scenario I would desire the ability to output both postscript and pdf, though if I have the first it is easy to get the latter. boB Stepp ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Star imports, was Re: How to get a Tkinter window to print a color copy of itself as a .pdf file?

2015-04-18 Thread boB Stepp
On Thu, Apr 16, 2015 at 2:54 AM, Peter Otten <__pete...@web.de> wrote: > boB Stepp wrote: > >>> import Tkinter as tk >> >> Question: I have been using "from Tkinter import *" as suggested in >> "Programming Python" by Lutz. He remarks t

Re: [Tutor] How (not!) lengthy should functions be?

2015-04-18 Thread boB Stepp
On Thu, Apr 16, 2015 at 1:43 PM, Peter Otten <__pete...@web.de> wrote: > However, there's more to it. You are working in an environment where people > may be harmed if you get your numbers wrong, and nothing hinders you to swap > the arguments in your percent2Gy() function or even pass it a length

Re: [Tutor] How (not!) lengthy should functions be?

2015-04-18 Thread boB Stepp
On Thu, Apr 16, 2015 at 4:03 PM, Alan Gauld wrote: > On 16/04/15 17:47, boB Stepp wrote: [...] > 2) I have seen varying recommendations as to number of lines of code > > Most of these come from the days when we worked on dumb terminals with 24 > line screens. Actual measurements

Re: [Tutor] How to print ALL contents of a scrolled Tkinter window?

2015-04-18 Thread boB Stepp
On Fri, Apr 17, 2015 at 2:28 PM, Alan Gauld wrote: > On 17/04/15 14:26, boB Stepp wrote: >> >> Solaris 10, Python 2.4.4 >> [...] > That's why GUI printing generally uses an entirely different > technique to print things (see my earlier email). In essence > thi

Re: [Tutor] lists, name semantics

2015-04-18 Thread boB Stepp
On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote: > On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote: > >> Bill Allen wrote: >> >> > Everyone that responded, >> > >> > Thanks very much for the excellent explanations! The distinction between >> > a reference to an object and a sepe

Re: [Tutor] How (not!) lengthy should functions be?

2015-04-18 Thread boB Stepp
On Sat, Apr 18, 2015 at 5:46 PM, Dave Angel wrote: > I'd still point out that eventually people will presumably get to believing > in your program. They'll subconsciously assume that if they mess up, the > program will notice, so they don't have to be as careful as they otherwise > would. Well

Re: [Tutor] lists, name semantics

2015-04-18 Thread boB Stepp
On Sat, Apr 18, 2015 at 10:03 PM, Bill Allen wrote: > > On Apr 18, 2015 4:11 PM, "boB Stepp" wrote: >> >> On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote: >> > On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote: >>

Re: [Tutor] lists, name semantics

2015-04-18 Thread boB Stepp
On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote: > Sometimes you want a "deep" copy, where "b" would have got a copy of the > iriginal x-y list. See the "copy" module's "deepcopy" function, which > supplies this for when it is needed: > > https://docs.python.org/3/library/copy.html#copy.

Re: [Tutor] lists, name semantics

2015-04-19 Thread boB Stepp
On Sun, Apr 19, 2015 at 12:24 AM, Cameron Simpson wrote: > On 19Apr2015 15:09, Cameron Simpson wrote: >> >> On 18Apr2015 23:26, boB Stepp wrote: >>> >>> On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote: [...] >>> "Two problems often e

Re: [Tutor] lists, name semantics

2015-04-19 Thread boB Stepp
On Sun, Apr 19, 2015 at 6:47 AM, Dave Angel wrote: > On 04/19/2015 12:07 AM, boB Stepp wrote: [...] >> I hope this is helpful, and, if there are any misstepps, that when >> they are revealed both of our understandings will be enhanced! >> > > Some of your knowledge of

Re: [Tutor] lists, name semantics

2015-04-19 Thread boB Stepp
On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote: > On 04/19/2015 03:08 PM, boB Stepp wrote: >> >> Or is the real point that we are adding an abstraction >> layer so we don't even have to think about where objects are >> physically stored in RAM? > > >

[Tutor] OT: Is there a good book that covers the history/evolution of software? [Inspired by the thread: lists, name semantics]

2015-04-19 Thread boB Stepp
In the beginning (I assume.) there was machine code and only machine code. And I imagine this was not very good. Then I assume the next step was assembler, which probably only moderated the (then) tedium of coding. Then real high level languages were started to be developed, and this was very good.

[Tutor] How to close a Tkinter window from a different thread?

2015-04-19 Thread boB Stepp
I am not certain that my terminology is correct in the subject line. Let me explain my issue. Scenario A: 1) I start out inside a commercial software environment (Abbreviated CSA henceforth). 2) I initiate a script in the CSA's scripting language. 3) This script calls an external Python script.com

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-04-20 Thread boB Stepp
On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote: > On 20/04/15 04:34, boB Stepp wrote: > >> So, how do I: >> 1) Check for the existence of an already open window from a previous >> running of the script? >> 2) If such a window exists, how do I close it from th

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-04-20 Thread boB Stepp
On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote: > On 20/04/15 04:34, boB Stepp wrote: > >> So, how do I: >> 1) Check for the existence of an already open window from a previous >> running of the script? >> 2) If such a window exists, how do I close it from th

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-04-24 Thread boB Stepp
On Fri, Apr 24, 2015 at 8:41 AM, Steven D'Aprano wrote: > On Sun, Apr 19, 2015 at 10:34:43PM -0500, boB Stepp wrote: > >> Scenario B: >> 1) I start out inside the CSA. >> 2) I initiate a script in the CSA's scripting language. >> 3) This script calls a

[Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-24 Thread boB Stepp
I have just started reading "Test-Driven Development by Example" by Kent Beck during my lunch breaks at work. This book was a suggestion by Danny Yoo in another thread. So far it has been good reading. My current programming work flow is to add a little bit of code, run a *manual* test(s), inspect

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-24 Thread boB Stepp
On Fri, Apr 24, 2015 at 5:03 PM, Alan Gauld wrote: > On 24/04/15 20:09, boB Stepp wrote: >> >> allowed to install anything else, strange as this may sound! Since the >> only functional editors in these bare-bones Solaris 10 environments >> are some simplistic defaul

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-24 Thread boB Stepp
On Fri, Apr 24, 2015 at 3:00 PM, Laura Creighton wrote: > In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes: > You need the testing-in-python mailing list. Come on over ... > http://lists.idyll.org/listinfo/testing-in-python > You will find lots of familiar

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-24 Thread boB Stepp
I saw something on Python-List that I think is worth getting on this list as Mark gave a very good reference... >Mark Lawrence wrote on Python-List: >>On 25/04/2015 01:51, Terry Reedy wrote: >>Based on my experience reading newbie posts on python list and >>Stackoverflow, learning to write real f

[Tutor] Questions (and initial responses) on using version control [Was: Introductory questions on test-driven development and implementing Git version control.]

2015-04-25 Thread boB Stepp
id not include those portions of the original thread here. In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes: [...] >My wife (A teacher.) has been after me a lot lately to write some >programs to make her teaching life better. So I would like to start >one of her projects us

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 3:21 AM, Alan Gauld wrote: > Having looked at this thread and its early responses I think it > would be good to break it up into its two natural parts. TDD > and version control are pretty much separate concepts and > should be on separate threads. > > Bob, could you please

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 3:20 AM, Laura Creighton wrote: > In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes: >>The Python versions at work are 2.4.4 and 2.6.4(?)(Not certain about >>the last digit there.) Based on responses to date, the fact that >>unitte

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 10:58 AM, boB Stepp wrote: > On Sat, Apr 25, 2015 at 3:20 AM, Laura Creighton wrote: >> In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes: >>>I think that I can get an exception here (See a post in response that >>>I made

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Fri, Apr 24, 2015 at 7:36 PM, Steven D'Aprano wrote: > So many questions... let's hope I don't miss any... :-) > > On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote: > >> First question: What testing modules/frameworks should I start out >> with?

Re: [Tutor] Questions (and initial responses) on using version control [Was: Introductory questions on test-driven development and implementing Git version control.]

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 10:30 AM, boB Stepp wrote: > On Fri, Apr 24, 2015 at 7:36 PM, Steven D'Aprano wrote: >>On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote: > > [...] > >>> And what would be the best approach to integrating Git with these >>>

[Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-29 Thread boB Stepp
I now have Git installed on my Windows 7 PC at work. The files that I wish to put under Git version control exist on a Solaris 10 workstation. In the Git bash provided, I can ssh into the Solaris 10 machine. I also can the CuteFTP program on my Windows PC to move/copy/etc. files between the two mac

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 12:04 PM, Albert-Jan Roskam wrote: > > -- > On Wed, Apr 29, 2015 4:21 PM CEST boB Stepp wrote: > >>I now have Git installed on my Windows 7 PC at work. The files that I >>wish to put under Git version control exist on a

[Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

2015-04-29 Thread boB Stepp
Python 2.4.4, Solaris 10. I have some functions that I believe I could collapse into a single function if I only knew how: def choose_compare(operator, value0, value1, pass_color, fail_color): """ Perform the comparison indicated by operator. Return pass_color if true, fail_color if false

Re: [Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 3:46 PM, Marc Tompkins wrote: > On Wed, Apr 29, 2015 at 1:10 PM, boB Stepp wrote: >> >> Python 2.4.4, Solaris 10. >> >> I have some functions that I believe I could collapse into a single >> function if I only knew how: >> >>

Re: [Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 3:50 PM, Laura Creighton wrote: > I forget. You are writing these things as functions rather than > methods of a class, because you don't know how to use classes yet? You forget nothing! ~(:>)) > Because you are absolutely correct that there are ways to simplify this, >

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 9:40 PM, Cameron Simpson wrote: > On 29Apr2015 12:12, boB Stepp wrote: >>> >>> ... (3) install git if needed ... >> >> >> It seems Git is needed, but I am not allowed to install it on the >> Solaris workstation. So is there

Re: [Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 4:42 PM, Mark Lawrence wrote: > This isn't a job for Bicycle Repair Man!!! Not even if we only use the latest, greatest, computer-aided bicycle repair technology??? > ... It smacks to me of dictionaries > and the operator module but I'm too bone idle to look it up mysel

Re: [Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 5:49 PM, Peter Otten <__pete...@web.de> wrote: > boB Stepp wrote: >> So I have stumbled (With your gracious help!) into a legitimate use of >> eval()? > > No. To expand on Marks hint here's how to do it without evil eval(

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-29 Thread boB Stepp
On Wed, Apr 29, 2015 at 10:39 PM, Cameron Simpson wrote: > On 29Apr2015 22:10, boB Stepp wrote: >> On the smart enterprise where we (now) do our clinical planning they >> are very strict: no installing any external software; no accessing the >> Internet; no email; etc. Not

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-30 Thread boB Stepp
On Wed, Apr 29, 2015 at 11:38 PM, Dave Angel wrote: > On 04/30/2015 12:28 AM, boB Stepp wrote: >> >> The main danger as I see it is that if I am not careful, then the code >> on the dev environment could diverge from the state of code on my >> Windows PC, i.e., I for

Re: [Tutor] Ancient Python versions (was: Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?)

2015-04-30 Thread boB Stepp
On Thu, Apr 30, 2015 at 12:15 AM, Ben Finney wrote: > boB Stepp writes: > >> One problem I have with searching the Python documentation is this: >> https://docs.python.org/release/2.4.4/lib/lib.html > > If you actually need to read the documentation specifically for a P

Re: [Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

2015-04-30 Thread boB Stepp
ttempted to push to the remote repository and got this: boB Stepp@DREAMMACHINE1 /e/Projects/project_name (master) $ git push origin master Counting objects: 5, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 328 bytes | 0 bytes/s, don

Re: [Tutor] Python 2.4 (was comparison operators)

2015-04-30 Thread boB Stepp
On Thu, Apr 30, 2015 at 1:02 AM, Laura Creighton wrote: > Python 2.4 is really old, right now. OpenCSW has 2.6.9 > http://www.opencsw.org/package/python/ > > Any chance you could use that? Laura, I may just attempt this on the dev machine. I have mentioned before that the production environment

Re: [Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

2015-05-01 Thread boB Stepp
On Thu, Apr 30, 2015 at 11:21 PM, Alex Kleider wrote: > On 2015-04-30 20:39, boB Stepp wrote: >> >> I created my remote repository on, say my C-drive, with "git init". I >> then copied and pasted a file to that location and put it under >> version control wi

Re: [Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

2015-05-01 Thread boB Stepp
On Fri, May 1, 2015 at 1:41 PM, Albert-Jan Roskam wrote: > > > On Fri, May 1, 2015 5:39 AM CEST boB Stepp wrote: > >>I created my remote repository on, say my C-drive, with "git init". > > Not with 'git init --bare'?

Re: [Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

2015-05-02 Thread boB Stepp
On Sat, May 2, 2015 at 3:15 AM, Albert-Jan Roskam wrote: > Check out this page: > http://stackoverflow.com/questions/7861184/what-is-the-difference-between-git-init-and-git-init-bare > > Isn't the error you mentioned before the same? After reading everything on the page you link to, plus the lit

Re: [Tutor] Help Learn python - Step by Step

2015-05-09 Thread boB Stepp
On Sat, May 9, 2015 at 3:23 AM, acolta wrote: > > Hi guys, > > I want to start coding in python. My background is Linux/Bash/Perl > (begginner). > My appreciate if somebody will recommend books/tutorials + exercises to > practice. This question comes up quite frequently. If you have not done so

Re: [Tutor] How to close a Tkinter window from a different thread?

2015-05-27 Thread boB Stepp
Python 2.4.4, Solaris 10 I realize that this is a bit old, but I got severely sidetracked! ~(:>) On Mon, Apr 20, 2015 at 2:10 AM, Alan Gauld wrote: > I would suggest forgetting about windows and think about > the processes that create them. Use the OS tools (via > the os module) to see if the

[Tutor] Should error checking be duplicated for both functions if one function calls another one?

2015-06-01 Thread boB Stepp
Suppose in a given state of a program, function 1 calls function 2. Function 1 includes checks for possible error conditions. If there are no issues, then function 2 should execute with no issues as well. The question is, should function 2 include the error checking done in function 1 if function 2

Re: [Tutor] Should error checking be duplicated for both functions if one function calls another one?

2015-06-01 Thread boB Stepp
On Mon, Jun 1, 2015 at 9:33 AM, David Palao wrote: > Hello, > Not sure if I got it, but, in my opinion functions should do only one > thing.So if function 2 finds an error, it should raise it. There > should be another function (function 1 in your case?) taking care of > possible raised errors.

[Tutor] How to use tkinter with a touch screen device?

2015-07-17 Thread boB Stepp
Apparently I will be finding myself having to write some programs to run on a Samsung Slate tablet, manufactured circa 2011. It has Windows 7 home edition 64-bit as its OS. Hopefully Python 3 will be easily installed, and I will be able to run Python 3 programs on it. Operating under this assumpt

Re: [Tutor] How to use tkinter with a touch screen device?

2015-07-17 Thread boB Stepp
On Fri, Jul 17, 2015 at 5:32 PM, Mark Lawrence wrote: > A possible starter > http://sumerulabs.in/blog/2015/02/21/touch-screen-for-the-new-raspberry-pi-2-available-in-india-sumerulabs/ > ??? I had briefly glanced at that, but other than a short snippet of code, it seemed to be more an advertisem

[Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-17 Thread boB Stepp
My wife (a Montessori teacher of 7th through 9th grades) is trying to coerce me to create some helpful software for her classroom. She has lots of things she *wants*: Some involve only her and her record keeping. Some will involve both her and students. Some would additionally involve parents.

Re: [Tutor] How to use tkinter with a touch screen device?

2015-07-17 Thread boB Stepp
On Fri, Jul 17, 2015 at 10:13 PM, Laura Creighton wrote: > The place to ask this question is > https://mail.python.org/mailman/listinfo/tkinter-discuss but I think you are > out of luck... This would explain why I am having trouble finding much information. I *think* I could get things to work

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-17 Thread boB Stepp
On Fri, Jul 17, 2015 at 11:18 PM, Laura Creighton wrote: > I have a plug in usb keyboard that I can just plug into my tablet. > It works great for data entry... I suggested this to my wife and believe she is looking into it. However, whenever she is walking about her classroom, she does not want

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-18 Thread boB Stepp
On Sat, Jul 18, 2015 at 4:58 PM, Brandon McCaig wrote: > Rather than worrying about technology, frameworks, peripherals, > and protocols you need to focus on the real problem. Have her > describe exactly what she'll do with it. Try to get her to put it > into context of what she does NOW without

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-19 Thread boB Stepp
On Sun, Jul 19, 2015 at 5:28 PM, Laura Creighton wrote: > In a message of Sun, 19 Jul 2015 18:11:36 -0400, Dave P writes: >>On Jul 19, 2015 5:43 AM, "Laura Creighton" wrote: >>> >>> In a message of Sun, 19 Jul 2015 16:27:13 +1000, "Steven D'Aprano" writes: >>> >I'm not sure if it runs on Macs, bu

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-19 Thread boB Stepp
On Sun, Jul 19, 2015 at 1:27 AM, Steven D'Aprano wrote: > On Sun, Jul 19, 2015 at 12:49:50AM -0500, boB Stepp wrote: > >> In this thread, I kept it very general on purpose. I was probing this >> community for their thoughts on two things: 1) Should I make the >>

Re: [Tutor] Design question: Web-based vs. desktop-based vs. desktop-based with data backed up to web server with a tablet thrown in for all cases?

2015-07-19 Thread boB Stepp
On Sun, Jul 19, 2015 at 8:23 PM, boB Stepp wrote: > Would it be off-putting later to ask specific questions about > implementing features of kivy on this list? I imagine that they would > tend to be basic questions that would probably apply to any GUI > development. But I'm sur

[Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread boB Stepp
After having a long discussion with my wife on her user requirements, I am convinced that an OO approach is required. Which is just as well as that has been one of my next areas of learning to do. I am currently reading "Python 3 Object Oriented Programming" by Dusty Phillips, which so far seems

[Tutor] OT: Test to see if ibisMail app is truly sending in plain text

2015-08-01 Thread boB Stepp
I apologize for the noise, but I felt it better to get this question answered definitively prior to posting questions from my iPad. I am on a brief vacation and only brought my iPad. I have been having a devil of a time searching the Internet for an iPad app that will truly send and display in

[Tutor] How to design object interactions with an SQLite db?

2015-08-01 Thread boB Stepp
I have never written programs to interact with a db. I have never written an OO program. So this is getting interesting rather quickly! As I continue to ponder my project design, I see many of the classes I wish to create map naturally to db tables. For instance the class Student can potenti

Re: [Tutor] OT: Test to see if ibisMail app is truly sending in plain text

2015-08-01 Thread boB Stepp
rare times when I must communicate with programming fora from my iPad. At least you have demonstrated that it is truly in plain text! I show in its entirety what I see just for the record: > On Sat, Aug 01, 2015 at 10:27:27AM -0500, boB Stepp wrote: > > > I apologize for the noise, b

Re: [Tutor] OT: Test to see if ibisMail app is truly sending in plain text

2015-08-02 Thread boB Stepp
On 2 Aug 2015 Oscar Benjamin wrote: > Have you tried using the Gmail app? Yes. That is my normal mail app. > I'm using the Gmail app here on my phone. I've just looked at your message, > hit reply-all and then "respond inline". Then I can see/edit the > attribution line and your message. I've

[Tutor] How to effectively use a Student class with SQLite [Was Re: How to design object interactions with an SQLite db?]

2015-08-13 Thread boB Stepp
tive: The teacher will naturally want to interact with the program using the student's name, possibly even a student's nickname. These can be non-unique. I like Alan's suggestion: On Sat, Aug 1, 2015 at 12:30 PM, Alan Gauld wrote: > On 01/08/15 17:34, boB Stepp wrote: >&

Re: [Tutor] How to effectively use a Student class with SQLite [Was Re: How to design object interactions with an SQLite db?]

2015-08-13 Thread boB Stepp
Whew, Alan! You've given me quite a lot to mull over. Thank you very much for the time you've invested in your responses!! On Thu, Aug 13, 2015 at 6:38 PM, Alan Gauld wrote: > On 13/08/15 20:18, boB Stepp wrote: > [...] > Yes, that's a standard problem in any HR type

[Tutor] Does composition only work with particular instances of objects?

2015-08-13 Thread boB Stepp
I was looking at an example illustrating composition from the book, "Introducing Python" by Bill Lubanovic on p. 140: >>> class Bill: def __init__(self, description): self.description = description >>> class Tail: def __init__(self, length): self.length = l

Re: [Tutor] How to effectively use a Student class with SQLite [Was Re: How to design object interactions with an SQLite db?]

2015-08-13 Thread boB Stepp
On Thu, Aug 13, 2015 at 11:13 PM, Laura Creighton wrote: > If your students need to provide a unique email address, then that is > a possibility to use to distinguish between ones with the same name. Many of my wife's students do have their own email accounts, but, alas, not all of them. I have

Re: [Tutor] Does composition only work with particular instances of objects?

2015-08-13 Thread boB Stepp
On Thu, Aug 13, 2015 at 11:46 PM, Zachary Ware wrote: > On Thu, Aug 13, 2015 at 11:31 PM, boB Stepp wrote: >> I was looking at an example illustrating composition from the book, >> "Introducing Python" by Bill Lubanovic on p. 140: >> >>>>> class B

Re: [Tutor] How to effectively use a Student class with SQLite [Was Re: How to design object interactions with an SQLite db?]

2015-08-14 Thread boB Stepp
On Fri, Aug 14, 2015 at 4:49 AM, Laura Creighton wrote: > You've found the 'variety of parents' problem. Listing the parents' > names will only let your wife know she has the correct student if she > habitually thinks of the parent names when she thinks of the student. This came to mind because

Re: [Tutor] Does composition only work with particular instances of objects?

2015-08-14 Thread boB Stepp
On Fri, Aug 14, 2015 at 2:50 AM, Alan Gauld wrote: > > So, unless the book explains why this is bad practice and > goes on to show a good example, I must conclude its a very > bad example. I found the errata pages for the book (http://www.oreilly.com/catalog/errata.csp?isbn=0636920028659) and a J

Re: [Tutor] cannot get a label message to display immediately

2015-08-14 Thread boB Stepp
On Fri, Aug 14, 2015 at 11:32 AM, Bill Allen wrote: > > I am working in Tkinter. The scenario is that I click a button that > starts a function running. No problem there. However, the function may > take some time to run and I do not want the user to be worried. I am > wanting to immediate

[Tutor] SQLite, Python and SQL injection attacks

2015-08-14 Thread boB Stepp
I was just looking at the sqlite3 docs at https://docs.python.org/3/library/sqlite3.html?highlight=sqlite#module-sqlite3 and found the following cheery news: "Usually your SQL operations will need to use values from Python variables. You shouldn’t assemble your query using Python’s string operat

Re: [Tutor] try and file existence

2015-08-15 Thread boB Stepp
On Fri, Aug 14, 2015 at 10:39 PM, Steven D'Aprano wrote: > > On Fri, Aug 14, 2015 at 06:28:09PM -0700, Clayton Kirkwood wrote: > > what is the best way to find out if a file exists? > > Try to open it and see what happens. If the open() succeeds, then the > file exists and can be read. If it fail

[Tutor] How best to determine if a db exists before trying to open it? [Was: try and file existence]

2015-08-15 Thread boB Stepp
On Sat, Aug 15, 2015 at 6:00 PM, Cameron Simpson wrote: > On 15Aug2015 15:20, Clayton Kirkwood wrote: >>> >>> Behalf Of Laura Creighton > > [..] >>> >>> To: boB Stepp >>> In a message of Sat, 15 Aug 2015 14:24:21 -0500, boB Stepp writes:

Re: [Tutor] try and file existence

2015-08-15 Thread boB Stepp
On Sat, Aug 15, 2015 at 6:41 PM, Steven D'Aprano wrote: > On Sat, Aug 15, 2015 at 02:24:21PM -0500, boB Stepp wrote: >> I understand your points, but wonder then what is the intended use for >> os.path.exists()? That is, in what types of circumstances would it be >> bo

[Tutor] Where should unit test files go in a project directory structure and some related questions?

2015-08-15 Thread boB Stepp
In this Montessori Classroom Project (mcm) I am working on, I hope to incorporate as much of the advice I've gotten here as I can remember. So I want to do version control, TDD, etc., and do it as well as I can. Especially since this thing looks to grow considerably over time. I have not ever tho

Re: [Tutor] Where should unit test files go in a project directory structure and some related questions?

2015-08-15 Thread boB Stepp
On Sat, Aug 15, 2015 at 9:10 PM, boB Stepp wrote: > Right now I am trying to figure out how to arrange my unit test > file(s). My initial thoughts are to have a single test directory with > separate subdirectories corresponding to each folder which has source > code. Is this a go

  1   2   3   4   5   6   7   >