Re: [Tutor] Code Regress

2016-02-01 Thread boB Stepp
7;) elif t == 60: your_label.config(bg='firebrick') . . . HTH! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Noob: nested if-clauses

2016-01-29 Thread boB Stepp
dow. If you go to the "Keys" tab, you can see (and edit) the key bindings IDLE uses as well as available pre-configured key binding styles. Hopefully I'm answering the question(s) you are really asking and have not gone off on a tangent! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-28 Thread boB Stepp
opinion is that it misses the forest for the trees. What I think > OOP's heart is beating is in the ability to parameterize behavior.) In response to your aside, do you have a favorite text that teaches OOP the way you feel it should be taught? And is there a Python-based version? -- boB

Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-28 Thread boB Stepp
s like a file, but > can be constructed in memory, use StringIO (or cStringIO). Isn't option D what Danny was using to make option B? Or are you saying keep things even simpler? boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-28 Thread boB Stepp
st languages (although > not in python!) I'll ask you the same question that I asked Danny: Do you have a favorite text which teaches OOP the way you feel it should be taught? And if possible, Python-based? boB ___ Tutor maillist - Tutor@pytho

Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-28 Thread boB Stepp
gram code or test code. But amongst all the things Danny clarified, he really helped me see how to do this in the context of writing classes. But in choosing what approach to use, I had not considered the possible importance of using real files in some instances, which

Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-28 Thread boB Stepp
if the "with open ..." context manager is still usable to handle simulated file closing using this technique? > So for our own unit tests, now we should be able to say something like this: > > ## > def test_foobar(

[Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-27 Thread boB Stepp
tentially promising, but looks complicated. This leads me to look at https://docs.python.org/3.4/library/unittest.mock.html, but right now I am finding this heavy going, and it will probably take me some time and further research before I feel I am really understand applying this mock proces

Re: [Tutor] Help

2016-01-26 Thread boB Stepp
In case you cannot see what we are talking about in how your message is not keeping its proper indentation, go to the Tutor Mail Archive at: https://www.mail-archive.com/tutor@python.org/msg73411.html and perhaps you can better see the difficulty we are having reading your message. boB

Re: [Tutor] Can This Script Be Modified to Read Many Files?..

2016-01-25 Thread Bob Gailer
On Jan 25, 2016 6:26 PM, "Sam Starfas via Tutor" wrote: > > Hi,I am very new to Python, but having fun learning. > I need to have a script read all of the XML files contents that are in a directory, pull out the contents of an element, in my case , and list them in an output file. I have this scri

Re: [Tutor] Value of tracebacks to malicious attackers?

2016-01-23 Thread boB Stepp
reaking of your own program. Instead, think > about what happens if someone takes over the machine and starts using > it as part of a botnet. That is often a purpose of a system > compromise: the attacker may not personally care about tic-tac-toe, > but they do care about having r

[Tutor] Value of tracebacks to malicious attackers?

2016-01-23 Thread boB Stepp
course for many applications these concerns are probably inconsequential. I don't think I would be gravely concerned if someone cracked into my ticktacktoe game deployed to some freebie site. OTOH, if I was deploying an online payment system, I would be much more concerne

Re: [Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-23 Thread boB Stepp
nail on the head here? Thanks, Alan! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-23 Thread boB Stepp
On Sat, Jan 23, 2016 at 12:55 PM, boB Stepp wrote: > I still would like to do this via a method, but I am currently stuck > on how to replace ??? with the attribute name I would like to insert: > > class Dog(object): > ... > > def add_attribute(self, attribute_

Re: [Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-23 Thread boB Stepp
g is to avoid "from M import *", but it is good to know that this style of import will not capture names of the form "_name". -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-23 Thread boB Stepp
On Sat, Jan 23, 2016 at 3:30 AM, Cameron Simpson wrote: > On 23Jan2016 01:52, boB Stepp wrote: >> I guess no matter how new one is to OOP, one nevertheless brings one's >> preconceptions, however malformed, into the learning process. In my >> case, one of mine was

Re: [Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-22 Thread boB Stepp
On Fri, Jan 22, 2016 at 11:04 PM, Cameron Simpson wrote: > On 22Jan2016 22:14, boB Stepp wrote: [...] > Consider: this is information you want assicated with a specific object. > Therefore it really _is_ an arribute of the object so that it can follow it > around. > >>

Re: [Tutor] Why is the name "self" optional instead of mandatory?

2016-01-22 Thread boB Stepp
On Thu, Jan 21, 2016 at 5:49 AM, Steven D'Aprano wrote: > On Wed, Jan 20, 2016 at 09:42:29PM -0600, boB Stepp wrote: > >> So I really only have one question: Why not make Python's >> *traditional* name, "self", mandatory? Why give the programmer this

Re: [Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-22 Thread boB Stepp
t is happening *inside* the class definition. > It also means that Python doesn't require a magic "undefined" value, > like Javascript has, or require declarations ahead of time, like static > languages such as Pascal and C require. I have come to enjoy this feature of Python as well! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Why do I not get an error when I mistakenly type "humdrum.sigh_strenght" instead of the correct "humdrum.sigh_strength"?

2016-01-20 Thread boB Stepp
was given This was my original point in doing all of this, to see what would result if I omitted "self". I am pretty sure the error is because the object instance gets automatically passed to the sigh() method, but by leaving the "self" parameter out in the method definition

[Tutor] Why is the name "self" optional instead of mandatory?

2016-01-20 Thread boB Stepp
y sleepy!!!") >>> mycat = Cat('Callie', 7) >>> mycat.happy_cat() Zzzz ... pu ... >>> mycat.whoami() My name is Callie and I am 7 years old. Now leave me be! I'm very sleepy!!! So I really only have one question: Why not make Python's *

[Tutor] How (and whether I should) use pkgutil.get_data()?

2016-01-17 Thread boB Stepp
this returned object that I could do if I used "with open..."? Is it iterable? [OK, I confess up front. I am being lazy here. I *could* create a file and try this out to see what happens, so I will understand if I get chided (or worse!).] 3) Should I be using relative imports in my

[Tutor] Should a "data" directory have a __init__.py file?

2016-01-17 Thread boB Stepp
for a data directory. Yes, files will be read there, but there will be no code there. Is this correct? -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] s.insert(i, x) explanation in docs for Python 3.4 confusing to me

2016-01-16 Thread boB Stepp
Alex sent me this off-list. I hope he does not mind me sharing part of what he wrote on-list! On Sat, Jan 16, 2016 at 4:57 PM, Alex Kleider wrote: > On 2016-01-16 14:39, boB Stepp wrote: > > >>>>> mylist[:0 or None] >> >> [100, 200, 300, 400, 500] >> &

Re: [Tutor] What is the square brackets about?

2016-01-16 Thread boB Stepp
On Sat, Jan 16, 2016 at 2:33 PM, Alan Gauld wrote: > On 16/01/16 19:35, boB Stepp wrote: > >> And so on. Until you (and I) can understand why the function produces >> these outputs with the given values of loc and thing, then we cannot >> claim we understand what is going

Re: [Tutor] s.insert(i, x) explanation in docs for Python 3.4 confusing to me

2016-01-16 Thread boB Stepp
r None]) > ... > [100] > [100, 200] > [100, 200, 300] > [100, 200, 300, 400] > [100, 200, 300, 400, 500] OK, Peter, all was going smoothly in boB-land until you added your "fix". Adding "or None" has me addled! I tried to clarify things in the interpreter (I rem

Re: [Tutor] What is the square brackets about?

2016-01-16 Thread boB Stepp
On Sat, Jan 16, 2016 at 1:14 PM, boB Stepp wrote: > > While learning I find it very helpful to either use IDLE or invoke the > Python interpreter in the shell and try these things out. Once I get > it to work, then I play around with the syntax and deliberately try to > break

Re: [Tutor] What is the square brackets about?

2016-01-16 Thread boB Stepp
rning I find it very helpful to either use IDLE or invoke the Python interpreter in the shell and try these things out. Once I get it to work, then I play around with the syntax and deliberately try to break things and see what sorts of errors are generated, figure out the limits of what the syn

Re: [Tutor] Is there a preference of "class MyClass:" or "class MyClass(object):" for Py3?

2016-01-15 Thread boB Stepp
ul at work! I'll just copy this class to my thumb drive and ..." Perhaps for all too easily confused boB explicit might be better than implicit? Seems I read that somewhere recently ... Thanks, Steve! -- boB ___ Tutor maillist -

Re: [Tutor] s.insert(i, x) explanation in docs for Python 3.4 confusing to me

2016-01-15 Thread boB Stepp
On Fri, Jan 15, 2016 at 11:32 PM, Cameron Simpson wrote: > On 15Jan2016 23:05, boB Stepp wrote: >> >> On Fri, Jan 15, 2016 at 10:53 PM, Cameron Simpson wrote: >>>>>>> >>>>>>> things.insert(-1, 'What the heck?!?') >>>

Re: [Tutor] s.insert(i, x) explanation in docs for Python 3.4 confusing to me

2016-01-15 Thread boB Stepp
On Fri, Jan 15, 2016 at 10:53 PM, Cameron Simpson wrote: > On 15Jan2016 22:20, boB Stepp wrote: >> I always get an empty list, which is actually what I was expecting, so >> I do not see how s[i:i] can ever equal [x]. > > > It isn't an equality test (==), it is an

[Tutor] s.insert(i, x) explanation in docs for Python 3.4 confusing to me

2016-01-15 Thread boB Stepp
not because: >>> things.insert(-1, 'What the heck?!?') >>> things [0, 'Hmm...', 3, 'WhackABunny', 6, 'What the heck?!?', '?'] "...at the index..." to me would mean that 'What the he

[Tutor] Is there a preference of "class MyClass:" or "class MyClass(object):" for Py3?

2016-01-15 Thread boB Stepp
Pythonic style/preference question: For strictly Python 3 code, is there any preference for class MyClass: pass versus the more explicit class MyClass(object): pass ? TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or

Re: [Tutor] new line to list of strings send by email

2016-01-08 Thread Bob Gailer
On Jan 8, 2016 11:03 AM, "Emil Natan" wrote: > > Hello list, > > I have a function which receives a string and sends it as a body of an > email. > > It is a part of a program which does certain checks on network > infrastructure. When a check fails I append error message to a > error_collector lis

[Tutor] antigravity?!?

2016-01-01 Thread boB Stepp
37.857713 -122.544543 FILE c:\python34\lib\antigravity.py Out of ever growing curiosity I went to the official Python docs site. Sure enough, no module named "antigravity" is listed. What else awaits as I explore Python??? I sure hope I don&#

[Tutor] What potential problems might I encounter installing Anaconda?

2016-01-01 Thread boB Stepp
regarding Anaconda? 4) I have only tonight started looking into this. My initial impression is that updates and new Python package installations are done in Anaconda with a "conda" command. Does this mean that pip installations can no longer be done? TIA! Happy New Year

Re: [Tutor] OT: How best to use Git for multi-directory projects?

2016-01-01 Thread boB Stepp
On Tue, Dec 29, 2015 at 11:32 PM, Martin A. Brown wrote: > > Hello there boB, > > Hey, wait a second! What time zone are you in? You can't have 2016 > resolutions already. Not even the New Zealanders are there yet! Santa gave me a peek into you know who's time machine

[Tutor] OT: How best to use Git for multi-directory projects?

2015-12-29 Thread boB Stepp
thing with a single .git file at the level of StudyBooks directory? Hoping to more effectively use Git in the new year! -- boB ___ 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 boB Stepp
make sure you do that > first or you will almost certainly have to rewrite from scratch > (and after most every other upgrade of OS or app thereafter). > And don't even think of changing your system fonts - ever! > I am at the mercy of my IS department re possible upgrades and the

Re: [Tutor] reading an input stream

2015-12-24 Thread boB Stepp
ums() >>> numStream.next() Traceback (most recent call last): File "", line 1, in numStream.next() AttributeError: 'generator' object has no attribute 'next' If I instead do this: >>> next(numStream) 0 >>> next(numStream) 1 >>

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

2015-12-24 Thread boB Stepp
On Thu, Dec 24, 2015 at 11:34 AM, Oscar Benjamin wrote: > > On 24 Dec 2015 14:55, "boB Stepp" wrote: [...] >> I find myself doing the same boring, repetitive tasks by hand, which >> amounts to copying certain information from one program and putting it >> i

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

2015-12-24 Thread boB Stepp
clicking all things that need to be clicked, etc.? This is mostly a Windows-based scenario, but if the techniques (if they exist) can be abstracted to any OS I can find plenty of uses elsewhere as well! TIA! Merry Christmas!!! -- boB ___ Tutor maillist

Re: [Tutor] interface

2015-12-16 Thread boB Stepp
quot;T") as it is copyrighted 2000. Despite this I think it is still quite useful even if you are working in Python 3 as, as far as I can tell, t/Tkinter has not changed substantially in how the coding goes. -- boB ___ Tutor maillist - Tutor@python.

[Tutor] Are there any Python-based GUI builders for tkinter

2015-10-27 Thread boB Stepp
3.5. TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] noob python question

2015-10-26 Thread Bob Gailer
Welcome to the tutor list. In order for us to help you please post the following: Python version Operating system The code you are running To trace back you are getting The trace back will be several lines of references to various programs and line numbers Once we have that information then it bec

Re: [Tutor] noob python question

2015-10-26 Thread boB Stepp
fferences between Python 2 and 3 syntax in some areas. HTH, -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I don't understand why this program is said to be "not defined" when I test it.

2015-10-17 Thread Bob Gailer
Also: Briefly describe problem 22 Show us what you did to test the program It would be better to test for integer before doing a numeric comparison There is no need ever to compare a boolean expression to true or false. All you need is either if condition or if not condition. A good short cut for a

[Tutor] How should my code handle db connections? Should my db manager module use OOP?

2015-08-26 Thread boB Stepp
a real benefit here, but, then again, I am learning how to OOP during this project as well, so I don't have enough knowledge yet to realistically answer this question. TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread boB Stepp
On Sun, Aug 23, 2015 at 11:47 AM, Peter Otten <__pete...@web.de> wrote: > boB Stepp wrote: > >> On Sat, Aug 22, 2015 at 3:18 AM, Peter Otten <__pete...@web.de> wrote: >>> boB Stepp wrote: >> ... I was not in the directory, E:\Projects\mcm. It is m

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread boB Stepp
On Sun, Aug 23, 2015 at 11:47 AM, Peter Otten <__pete...@web.de> wrote: > boB Stepp wrote: >> And am I misreading the docs at >> https://docs.python.org/3/library/unittes

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread boB Stepp
On Sat, Aug 22, 2015 at 3:18 AM, Peter Otten <__pete...@web.de> wrote: > boB Stepp wrote: > >> In the cold light of morning, I see that in this invocation, the path >> is wrong. But even if I correct it, I get the same results: >> >> e:\Projects\mcm>p

Re: [Tutor] Do not understand why test is running.

2015-08-21 Thread boB Stepp
On Fri, Aug 21, 2015 at 1:16 AM, Peter Otten <__pete...@web.de> wrote: > boB Stepp wrote: > >> On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano >> wrote: >>> On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote: >>> >>> >

Re: [Tutor] Do not understand why test is running.

2015-08-20 Thread boB Stepp
On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano wrote: > On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote: > > >> import unittest >> >> # import modules to be tested: >> import mcm.db.manager >> >> class ManagerTestCase(unittest.Test

[Tutor] Do not understand why test is running.

2015-08-20 Thread boB Stepp
er -v test_open_db (test.db.test_manager.ManagerTestCase) ... ok -- Ran 1 test in 0.000s OK Obviously I was not expecting this! Why did the test run? I thought it would not happen without those final t

Re: [Tutor] Test discovery not locating module to test

2015-08-20 Thread boB Stepp
tually *known* about this, but have not used the standard library much to this point, and this is the first time I have tried this *package* structure of a project, so that aspect is all new to me. Thanks, Peter! boB ___ Tutor maillist - Tutor@pyth

[Tutor] Test discovery not locating module to test

2015-08-19 Thread boB Stepp
-__init__.py test_mcm_db_mgr.py --ui/ __init__.py .gitignore LICENSE.txt README.txt All __init__.py files are currently empty. Alex had asked a question very similar to this situation, and I thought I had understood the answer Laura had given, but apparent

[Tutor] Is it possible to archive subsets of data from an SQLite db and restore it later?

2015-08-17 Thread boB Stepp
ealize that the method I was hoping to start coding tonight was ill-conceived! ARGH! To bed I now go ... Is TDD the programmer's version of writer's block? ~(:>) -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] How to test my code's interactions with SQLite db?

2015-08-16 Thread boB Stepp
On Sun, Aug 16, 2015 at 7:55 PM, Alan Gauld wrote: > On 17/08/15 00:52, boB Stepp wrote: > >>> sqlite3> .read populate_base_data.sql >> >> >> I am assuming that the .read command would be replaced inside the >> program by the cursor.executescript() me

Re: [Tutor] How to test my code's interactions with SQLite db?

2015-08-16 Thread boB Stepp
bjects; although we can use > real files, we can find in-memory structures like io.StringIO useful, > since they leave no residue once the tests are completed. Likewise thanks for opening my eyes to this perspective as well! -- boB ___ Tuto

Re: [Tutor] How to test my code's interactions with SQLite db?

2015-08-16 Thread boB Stepp
On Sun, Aug 16, 2015 at 6:04 PM, Alan Gauld wrote: > On 16/08/15 23:29, boB Stepp wrote: > >> http://www.sqlite.org/download.html > > > You definitely want this. > You treat it like the >>> prompt in Pyython. I had just finished installing and testing the in

Re: [Tutor] How to test my code's interactions with SQLite db?

2015-08-16 Thread boB Stepp
On Sun, Aug 16, 2015 at 4:03 AM, Steven D'Aprano wrote: > On Sun, Aug 16, 2015 at 01:18:06AM -0500, boB Stepp wrote: >> 1) It would seem that I need to install a stand-alone version of >> SQLite, so that I can create this test db. Either that or write a >> separate

[Tutor] How to test my code's interactions with SQLite db?

2015-08-15 Thread boB Stepp
ser(s) will populate are in agreement? Or am I over-analyzing here? TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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

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

2015-08-15 Thread boB Stepp
s probably not its function. And I don't know what set-up needs setup.py would typically serve. I will have to search for answers to these. Does this cover everything I need to be concerned about as far as project organization so that I do

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] 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
s.path.exists()? That is, in what types of circumstances would it be both appropriate and safe to use? boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] SQLite, Python and SQL injection attacks

2015-08-14 Thread boB Stepp
SQL strings will be rejected? Having seen this example, are there any other security surprises that I need to avoid by adopting certain coding techniques when I am using Python with SQLite? -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or

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

2015-08-14 Thread boB Stepp
te the main part of your function? Also, just before your function returns its result, it could clear/rewrite the label. Additionally, tkinter has the ability to change the cursor to an hourglass. You could handle this analogously to what I already said. HTH, -- boB ___

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

2015-08-14 Thread boB Stepp
is one wasn't his fault." So obviously the quality control process let this one slip through the cracks. -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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
gether.) ... I have been thinking in terms of only my wife using the software. If I have the good (or mis-) fortune to create a successful and utile bit of software, I might find others using the program. So your points suggest I should look for a more flexible approach that any potential user will

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-13 Thread boB Stepp
ot allowed to have contact with their children, legal guardians who are not parents, etc. Ay, yi, yi! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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

2015-08-13 Thread boB Stepp
ut() This duck has a wide orange bill and a long tail. >>> duck0 = Duck(bill0, tail0) >>> duck0.about() This duck has a wide orange bill and a long tail. >From this I am forced to conclude that composition will only work with particular instances of objects and not with

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] 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
Beware! Lengthy post!! Sign of a confused boB. ~(:>) I believe that I understand now all of the things I want my project (Tentatively named "Montessori Classroom Manager".) to *do*. But I am currently spinning my wheels on how to implement classes, SQLite, and the kivy UI, so

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

2015-08-02 Thread boB Stepp
t present in the Gmail App. Why it would not be beats me, but unless there is a hidden setting or gesture I have missed, both by futzing around my actual iPad as well as searching the 'Net, then it is not available. -- boB ___ Tutor mail

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

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

2015-08-01 Thread boB Stepp
sophisticated server-based db in the future incarnations of this project. Thoughts? -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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

2015-08-01 Thread boB Stepp
in plain text emails. If someone would tell me if I have been successful or not, I would be very appreciative! If successful, Python questions will soon follow. Thanks! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change

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

2015-07-25 Thread boB Stepp
ut I cannot (yet) bring it to mind. And for (5), surely I should never violate this one? It seems that in some future edition of Python they might add any particular __name__ that I might try to use presently in their future version of Python (however miniscule

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

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
e. It's easy to use, share, and collaborate. It works in the browser >>or you can use their mobile apps. You can set up checklists, attach images >>and files, work with due dates, comment and activity streams, etc. Plus, >>using their RESTful API, you could whip up some slick

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
out of sheer necessity. As things develop more concretely and I get puzzled and stumped, I will post more detailed questions. Thanks for your thoughts! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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
assessment project, it is going to have to be without all the desired bells and whistles to have something that will be practically useful for her when school starts. Especially when I am certain Vonda is still figuring out what she *really* needs! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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

2015-07-17 Thread boB Stepp
the code looks even simpler than tkinter. Does everything have to be written as classes? Thanks, Laura! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[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
ing at least this one project? Of course, I have not a clue as to how to do any of this (yet!). As always, many thanks in advance! P.S.: My wife has researched existing software and has found everything lacking. She wants custom solutions to her custom needs. Oh, joy. But very interesting! -

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

2015-07-17 Thread boB Stepp
e more an advertisement for a new touch screen monitor for Raspberry Pi. In fact most of the search results I got earlier involve the Raspberry Pi. Nothing leaped out at me. I may have to sift through those results more carefully if nothing else turns up. But thanks

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

2015-07-17 Thread boB Stepp
what happens! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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

2015-06-01 Thread boB Stepp
e raised errors. I guess my question was not clearly worded. The idea is that function 1 calls another function. Function 1 checks for possible errors that are relevant. Some or all of these checks are also relevant to the called function. Should the called function also include these relevant err

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

2015-06-01 Thread boB Stepp
2 is only ever called by function 1? My inclination is to say yes, as in some future incarnation of the program function 2 might get called in new ways. What are your thoughts? -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change

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

2015-05-27 Thread boB Stepp
n this stored pid, what is the likelihood that the pid will be reassigned to something other than one of my program's windows left open? -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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

2015-05-09 Thread boB Stepp
system and version of Python; think carefully about your question(s) and trim your code down to something that is self-contained and shows the exact problem you are experiencing; and, always post the *full* error report Python generates. HTH, -- boB ___ T

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
e it crashing. While still there I typed "git clone remote_repo_location" and voila! My files returned!! I don't totally understand everything yet, but it makes a lot more sense now. boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

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-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] Python 2.4 (was comparison operators)

2015-04-30 Thread boB Stepp
me tons of time. Even though the link you gave was for a package add, I just *know* there will be missing dependencies. Guess I will have to learn how to resolve all the issues that come up. Should be fun! Thanks, Laura! -- boB ___ Tutor maillist

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

<    1   2   3   4   5   6   7   8   9   10   >