[Tutor] formatting sql Was: Some help Please

2012-02-15 Thread bob gailer
tanding_Amount,to make an increment? Please, is it the same thing with the withdrawing format, in case i want to decrement the account as in withdrawing?? joseph -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] arrays, while loops

2012-02-18 Thread bob gailer
se confirm or explain. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] arrays, while loops

2012-02-20 Thread bob gailer
logic. Another approach is using try and except as others have mentioned. However I doubt whether your course has introduced exception handling. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] __name__=='__main__'

2012-02-20 Thread bob gailer
except ValueError: continue new_text = MultiplyText(text, multiplier) return new_text if __name == '__main__': print GetUserInput() To fix both problems replace multiplier.isdigit() with multiplier = int(multiplier) -- Bob Gailer 919-636-4239 Chapel

Re: [Tutor] how to rewrite area.py

2012-02-21 Thread bob gailer
put('Height: ') while h <= 0: print 'Must be a positive number' h = input('Height: ') print 'Width =',w,' Height =',h,' so Area =',area(w,h) ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Help Designing a simple Program called Life

2012-02-22 Thread bob gailer
the grid to display with the initial state. Then step back, say "well done,Leo" then add code to advance to subsequent states with some limit. I'll post the code that I already have later today. -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] Recognizing real numbers

2012-02-22 Thread bob gailer
l J. Lewis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Writing to a file/changing the file name

2012-02-23 Thread bob gailer
7;2' is the question what is "recipe.txt" + 2> If you come up with anything other than "recipe.txt2" then you need to review how Python works. Another idea is: when you get an unexpected result there must be a very good reason for it. Do a little hunting. Each time you

Re: [Tutor] Attribute error message received on Card Game program

2012-02-24 Thread bob gailer
(most recent call last): File "C:/Python27/Card Game.py", line 69, in print my_hand File "C:/Python27/Card Game.py", line 25, in __str__ for card in self.card: AttributeError: 'Hand' object has no attribute 'card' >>> /*Would you please help me as to where I got it wrong with this program

Re: [Tutor] Help with Python Program

2012-02-24 Thread bob gailer
ct), an if-elif-else statement, and the use of Python's random number generator. Do you know how to create a loop? If not, why not? Do you know how to test for low or high? If not why not? If your answers to these questions is no then (IMHO) you are in the wrong class. -- Bob Gailer 91

Re: [Tutor] roman to arabic

2012-02-26 Thread bob gailer
ommand" If I was running your program and saw that I'd have to give up since I have no idea what is expected. print "Please enter command - r for roman-arabic" would be much better. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] initialising all elements of a matrix

2012-02-28 Thread bob gailer
On 2/28/2012 11:40 AM, Peter Otten wrote: def product(factors, product=1): for factor in factors: product *= factor return product can be "simplified" def product(factors): import operator return reduce(operator.mul, factors) -- Bob Gailer 919-636-4239 Chap

Re: [Tutor] how to stop a program in python which is running for long time , I am using windows

2012-02-29 Thread bob gailer
GUI - task manager cmd line - taskkill " running for long time" is relative and irrelevant. Above stops regardless. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opt

Re: [Tutor] number of mismatches in a string

2012-03-02 Thread bob gailer
the above in the hopes of gaining insight. Perhaps you could restate the problem in a way that makes it crystal clear. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Creating a Polyline Feature class

2012-03-03 Thread bob gailer
of points feat.shape = lineArray #insert the feature cur.insertRow(feat) lineArray.removeAll() lineArray.add(coord) ## add coordinate array to my Dictionary (list of rhinos) rhinoTracks[rhino] = coordAr

Re: [Tutor] Creating a Polyline Feature class

2012-03-04 Thread bob gailer
r__ return setattr(self._arc_object, attr, ao) RuntimeError: ERROR 99: Error executing function." Any ideas? I'm feeling a little lost at this point. Diagnosing that requires a knowledge of ArcGIS which I lack. -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] seeing the results of a python program in windows7

2012-03-14 Thread bob gailer
the try-finally construct ensures that any exception in your code will be visible. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Unable to open .py files directly

2012-03-19 Thread bob gailer
ean double-click or what? The more precise you are regarding what you want and what you do makes it a lot easier for us to help. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opt

Re: [Tutor] Unable to open .py files directly

2012-03-21 Thread bob gailer
produce the behavior you want. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Unable to open .py files directly

2012-03-21 Thread bob gailer
yw" -e "%1" in your case that should read "C:\Python27\pythonw.exe" "C:\Python27\Lib\idlelib\idle.pyw" -e "%1" If you don't have an Edit with IDLE entry, click New and add one. If you want that to be the double-click behavior click Set Default. If yo

Re: [Tutor] Library of Module for Analyzing Answer Cards

2012-03-22 Thread bob gailer
forms. Worked like a charm. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Library of Module for Analyzing Answer Cards better link

2012-03-22 Thread bob gailer
100,000 copies of 4 different forms. Worked like a charm. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Library of Module for Analyzing Answer Cards

2012-03-24 Thread bob gailer
Remember to always reply-all so a copy goes to the list. On 3/24/2012 7:49 AM, Khalid Al-Ghamdi wrote: thanks a lot that was extremely helpful.  On Fri, Mar 23, 2012 at 3:58 AM, bob gailer <bgai...@gmail.com>

Re: [Tutor] I/O operation on closed file?

2012-03-27 Thread bob gailer
argument.test(2,"C:/a1.txt","C:/a2.txt") File "c:\argument.py", line 28, in test for line_data in f:" Could you please advise the resolution for this? What does " I/O operation on closed file" suggest to you? -- Bob Gail

Re: [Tutor] Syntax error help

2012-03-30 Thread bob gailer
t (do you know what to do?) then you should get a syntax error for line15. Why is there a : at the end of that line? then you have 1 more trailing : to deal with. then there is a missing ) then there is a missing ( Once you fix all the problems then you should see good bye since that is the only

Re: [Tutor] Syntax error help

2012-03-30 Thread bob gailer
On 3/30/2012 6:20 PM, x23ch...@gmail.com wrote: Thanks I've fixed Great. Please share with us your new program and tell us what you do to run it. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscri

Re: [Tutor] Problem Stripping

2012-03-30 Thread bob gailer
Then, of course, there's "15:45".replace(':','') -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Syntax error help

2012-03-30 Thread bob gailer
n use an IDE such as IDLE. within IDLE you can write the program in an edit window then RUN or you can use the interactive window and type >>>import Area Which of these (or what else) do you do -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] Syntax error help

2012-03-31 Thread bob gailer
e >>>import Area or you can use an IDE such as IDLE. within IDLE you can write the program in an edit window then RUN or you can use the interactive window and type >>>import Area Which of these (or what else) do you do -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Open source projects build using Python

2012-04-03 Thread bob gailer
#x27; and write them to functions.txt. There is much more that can be accomplished. --- end reply --- If this sparks your interest I will send you the developer's guide. -- Bob Gailer 919-636-4239 C

Re: [Tutor] generators

2012-04-04 Thread bob gailer
" (e.g.) in for statements. >>> for i in y:print i 0 1 2 x in this case is equivalent to xrange() with exactly 1 argument. There is more that can be said regarding x.next(). x.send(), raise StopIteration but I've said enough for now. -- Bob Gailer 919-636-4239 Chapel Hill NC _

[Tutor] How to reply - best practice.

2012-04-04 Thread bob gailer
questions but I feel confident that I have your support. Glad we could help. To make our lives easier please only include relevant text, and make the subject also relevant. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor

Re: [Tutor] Game of python, help please.

2012-04-09 Thread bob gailer
u might also consider giving space an extra row at the top and one at the bottom, ditto for extra columns. That will make calculating the neighbor count a lot easier, at the cost of maintaining the extra rows/columns. for r in range(1,x+1): for c in range1,(y+1): surrounding = sum(

Re: [Tutor] Game of python, help please.

2012-04-10 Thread bob gailer
On 4/9/2012 10:56 PM, Dave Angel wrote: On 04/09/2012 10:33 PM, bob gailer wrote: On 4/9/2012 2:26 AM, leo degon wrote: Hello all, Im trying to learn python and programming in my free time, and I'm trying to do a little personal project to trying and gain some skills. Im trying to do ve

Re: [Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread bob gailer
lling of 3rd party software. True? I presume that policy is to prevent malicious code from running. True? Please say more about your objectives. Can you export the Access data and operate on it outside the Access environment? -- Bob Gailer 919-636-4239 Chapel Hi

Re: [Tutor] Iterate Suggestion

2012-04-15 Thread bob gailer
utput serverA serverB serverC serverD serverE serverF serverG print '\n'.join(' '.join(mylist[i:i+3]) for i in range(0,len(mylist),3)) -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Iterate Suggestion

2012-04-16 Thread bob gailer
On 4/15/2012 10:54 PM, bob gailer wrote: On 4/14/2012 11:27 AM, Tom Tucker wrote: Hello all. Any suggestions how I could easily iterate over a list and print the output 3 across (when possible)? One method I was considering was removing the recently printed item from the list, checking

Re: [Tutor] Game of python, help please.

2012-04-18 Thread bob gailer
self as well as the neighbors. Easy to fix. Originally I suggested: for r in range(1,x+1): for c in range1,(y+1): surrounding = sum([sum(space[r+z][c-1:c+2]) for z in(-1,0,1)]) New suggestion: def determinelife(surronding,space,i,j): return sum(space[i-1][j-1:j+2]) + sum(space[i][j-1:j+

Re: [Tutor] How to exit this loop in the interpreter

2012-05-03 Thread bob gailer
On 5/3/2012 9:57 AM, spa...@gmail.com wrote: Hello all, I have encountered the following scenario. Here is the code - on IDLE on Windows XP. *>>> while True:* Please do not use color. Post plain text. That is very hard for me to read and there is no need for color. -- Bob Gaile

Re: [Tutor] Displaying data in columns

2012-05-07 Thread bob gailer
there is a more elegant solution. I am not against reading documentation, just can't find the right module to read about. the basic tool you'd use is string formatting. I prefer the original %. "%24s%24s%8s%7s" % -- Bob Gailer 919-636-4239 Chapel Hill NC _

Re: [Tutor] Curious dictionary printing

2012-05-07 Thread bob gailer
tion. Asking why does it not do what I want is not IMHO the best way to win friends here. Taking this steps further - what does it mean to be "in order". To some it is the order in which items are added rather than some collating sequence. - Do you want order by key or by value? - ho

Re: [Tutor] (no subject)

2012-05-12 Thread bob gailer
d syntax Thanks for posting the traceback. All we need is to see more of the program (especially the lines before the one you posted. It is always a good idea to post more of the code regardless of the problem. -- Bob Gailer 919-636-4239 Chapel Hill NC

Re: [Tutor] syntax error

2012-05-12 Thread bob gailer
oh - and always provide a specific meaningful subject -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] threading mind set

2012-05-12 Thread bob gailer
carlo: in future please post plain text rather than HTML. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] threading mind set

2012-05-12 Thread bob gailer
else: S = DirGetSize(x) print 'the file size of', x, 'is',S -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] syntax error

2012-05-14 Thread bob gailer
, as I can only guess, and don't want to spend time doing better guessing. Please sign up with pastebin and post your code there. That will guarantee we can copy it as you wrote it. Also please refer to your program as a program or script. It is not a command. -- Bob Gailer 919-636-4239

Re: [Tutor] syntax error

2012-05-14 Thread bob gailer
compiling. PLEASE ONLY PASTEBIN code that we can run! Line 26 ends with ; should be )) Line 28 is split Line 31 - is that a comment if so put # in front of it. Line 38-51 must be indented Line 44 ifdata[1] == "join": Line 51 will never be executed. -- Bob Gailer 919-636-4239 Chap

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread bob gailer
ble (as in dBase) a collection of tables (as an Access file) a database management system (MySQL)? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.o

Re: [Tutor] table to dictionary and then analysis

2012-05-14 Thread bob gailer
e usually reserve all caps names for constants. You have way too many dictionaries. Your program seems very complex for a very simple task. I will not attempt to figure out what it does. ___ Tutor maillist - Tutor@python.org To unsubscribe or chan

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread bob gailer
t I wasn't aware of. Seems like a good idea. Right tool for right purpose. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] table to dictionary and then analysis

2012-05-17 Thread bob gailer
On 5/17/2012 3:27 AM, Russel Winder wrote: Should we be promoting use of the format method in strings rather than the % operator? % is deprecated now. I for one do not like seeing % deprecated. Why? It is not broken, and IMHO the easiest to use of all formatting options. -- Bob Gailer 919-636

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

2012-05-20 Thread boB Stepp
Apparently one of the significant changes from Python 2.x versions to the new Python 3.x versions is that print is now treated as a function. So instead try: print('hello world') I think that should work for your version of Python. -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

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

2012-05-20 Thread boB Stepp
Java, etc., or, instead, look for the best one that can handle all of the languages I plan to learn and use. Thanks for any guidance you can provide! -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://

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

2012-05-20 Thread boB Stepp
, which comes with W95. He seems to be doing fine, but I am wondering if this is the best way to start him in the world of programming? Any thoughts about this? Thanks! -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change

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

2012-05-20 Thread boB Stepp
oduced him to some new commands, like generating random numbers, he combined a number guessing game with his self-composed musical theme. Has anyone experience using this book? -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

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

2012-05-20 Thread boB Stepp
as my future projects get larger and more involved will it be able to do everything I would want it to do? Would I find myself wanting a full-fledged IDE? I don't have enough technical knowledge to answer these questions right now. Your thoughts? Cheers! boB __

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

2012-05-20 Thread boB Stepp
with it myself today) is pretty cool. Now I just have to get Jeremy some updated hardware, so that he can both connect to the Internet and run Python 3. This is an obvious opportunity to convince my wife to allow me to update "my" hardware, so that both she

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

2012-05-21 Thread bob gailer
). I have no concern with there being features I might not use. I am delighted with the ones I do use. There are numerous IDES for Python that run on Linux systems (most are free). You too may find such IDEs a better choice. -- Bob Gailer 919-636-4239

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

2012-05-21 Thread boB Stepp
y for both work and home study. What is the best way for me to get my W7-64bit laptop configured for Python programming? My consultations with the Google oracle have yielded inconclusive results this evening, though I confess I am quite tired, so I may be missing the obvious. -- C

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

2012-05-22 Thread boB Stepp
s is of no use to me as the same scripts have to be able to run on all three machines. However, there are plans after July 1st to upgrade all three machines to thin clients connected to an enterprise server. Hopefully if this actually happens then Python will be available on everything. Cheers

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

Re: [Tutor] How to deploy Django project in Google App Engine

2012-05-26 Thread bob gailer
go-on-App-Engine? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to deploy Django project in Google App Engine

2012-05-26 Thread bob gailer
On 5/26/2012 5:41 AM, Surya K wrote: I wrote a Django project and would like to deploy on Google App Engine. also: https://developers.google.com/appengine/articles/django-nonrel -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor

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

2012-05-27 Thread boB Stepp
he keyboard movement and editing commands. Once I feel semi-comfortable with these then I will more thoroughly investigate configuration options for Python within Emacs. Hope you are enjoying your travel time! -- Cheers! boB ___ Tutor maillist - Tutor@pyt

Re: [Tutor] How to deploy Django project in Google App Engine

2012-05-28 Thread bob gailer
st such as django-us...@googlegroups.com. Thanks Surya -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Joining all strings in stringList into one string

2012-05-30 Thread bob gailer
On 5/30/2012 12:21 PM, Akeria Timothy wrote: In addition to the other comments I point out that join is not a /command/, it is a /string method/. Python does not have commands. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor

Re: [Tutor] Dictionary

2012-06-18 Thread bob gailer
On 6/17/2012 2:26 PM, Selby Rowley-Cannon wrote: [snip] Do you have any programming (algorithm development) experience? Do you want to translate words independent of context? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor

Re: [Tutor] Factor Analysis

2012-07-05 Thread bob gailer
funky, through-the-web console that uses Python to drive lots of math software. Note that there's a public server so you can easily take it for a spin: http://www.sagenb.org/ -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist -

Re: [Tutor] extracting a column from many files

2012-07-13 Thread bob gailer
On 7/13/2012 5:20 AM, susana moreno colomer wrote: [snip] Please post the entire traceback. You did not tell us what error or where in option 1. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or

Re: [Tutor] How to print something just after 3 attempts?

2012-07-17 Thread bob gailer
Simpler solution: for i in range(3): if input("Password: ") == "unicorn": print("Welcome in..") break else: print("That must have been complicated..") -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] writing function changeColor

2012-07-18 Thread bob gailer
sense. The way this function needs to be written, -0.1 decreases red by 10% Where can I find information on these two topics? Google? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscriptio

Re: [Tutor] Recursive optimization function, binary tree

2012-08-10 Thread bob gailer
a graphical testing tool for such a task? Perhaps - but I'd need more details. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/lis

Re: [Tutor] Power of Two Function

2012-08-31 Thread bob gailer
amp; and the result will be 0. Thus num & (num - 1)) == 0 will be one only for powers of 2. The function returns 1 or 0 which may be interpreted as True or False by the caller. Why the function does not ensure that its argument is of type int is a problem. HTH. --

Re: [Tutor] How to get MAC address using Python at windows 7

2012-09-06 Thread bob gailer
use Popen (in subprocess module) to run ipconfig /all, capture the output and parse it for the desired Ethernet adapter, then parse that section for the Physical Address. There may be another (better?, easier?) way but this will work. -- Bob Gailer 919-636-4239 Chapel Hill NC

Re: [Tutor] simon says

2012-09-10 Thread bob gailer
n says game"? if not see http://en.wikipedia.org/wiki/Simon_says -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to print a variable from an if/else statement

2012-09-12 Thread bob gailer
. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Print List

2012-09-12 Thread bob gailer
ld correct the use of "neatly" and "column"- these are ill-defined terms! Specifications should leave nothing to be guessed or assumed -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe

[Tutor] Translate PHP to Python

2012-09-28 Thread bob gailer
ver responding to a request, or standalone? If it is web server responding to a request then you might consider using a Python based web framework. Why do you want to translate it to Python? Which version of Python? How much expertise do you have in Python coding? -- Bob Gailer 919-636-4239 Chapel H

Re: [Tutor] Translate PHP to Python

2012-09-28 Thread bob gailer
! Thanks for the information. Please always reply-all so a copy goes to the list. I will cc this for that purpose. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] html checker

2012-10-01 Thread bob gailer
get this far and then fail so miserably? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[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] what's wrong with my code? (was HELP!)

2012-10-01 Thread bob gailer
pay other than the fun of assisting). -- Bob Gailer 919-636-4239 Chapel Hill NC ___ 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
ccessible from the Internet is of too much utility to forbid him its access. I will just prepare myself for some interesting questions in the near future! ~(:>)) -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Thanks for all your comments regarding how we communicate.

2012-10-02 Thread bob gailer
e compassionate; put our effort where it does the best; but continue asking for cooperation from the questioner. If I had more time I probably could make the above shorter. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.o

[Tutor] How can we help?

2012-10-02 Thread bob gailer
ur post was not very communicative. Did you want to ask or say something? Please note paragraph above starting with "When replying" and follow those guidelines. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsu

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
g? If an explanation is in one of my several books, it is currently eluding me. -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] forcing the None values of a dictionary

2012-10-03 Thread bob gailer
ot read or heed any lengthy legalese at the end of emails. I think they do more to irritate recipients than to protect anything. Be warned: this message has no intention to do anything but inform. You may do anything with it you like. So there. -- Bob Gailer 919-636-4239 Chapel Hill N

Re: [Tutor] reloading a module

2012-10-03 Thread bob gailer
? I was wondering how can i reload or otherwise refresh the module. python3 on linux Answer: >>> import x >>> # make some changes to x.py >>> reload(x) -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tuto

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

2012-10-03 Thread boB Stepp
st, it'll call str() on the whole list. But the list object's logic > will in turn call repr() on each of its elements, and put the whole > thing together with braces and commas. > As I go along in my study of Python will it become clear

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

2012-10-03 Thread boB Stepp
the designers of Python made this decision. I guess it had to be one way or the other. > print, on the other hand, displays the str() of the object directly to > the screen. For strings, that means the delimiters are not shown, > because they are not part of the string itself. Why s

Re: [Tutor] string rules for 'number'

2012-10-07 Thread boB Stepp
re strings it looks at these character by character. Since '0' < '1' < '9' , the 0 in '10' has no effect on the order. Compare 'a' < 'ba' < 'i' . boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] finding digit in string

2012-10-08 Thread bob gailer
ses a lot of typing. My way is: import string tt = string.maketrans('0123456789','00') ts = asdf3456'.translate(t) # yields 'asdf' ts.find("0") # finds the next "0" which is in the same position as corresponding digit -- Bob G

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

2012-10-08 Thread boB Stepp
have specific questions. -- Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

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

2012-10-10 Thread boB Stepp
t; b'spam'[:3] > b'spa' > >>> b'spam'[0] > 115 > >>> list(b'spam') > [115, 112, 97, 109] > > bytes have string methods as a convenience, such as find, split, and > partition. They also have the method

Re: [Tutor] instance method call issue

2012-10-14 Thread bob gailer
ws a lot more about why. Could not the developers have presented that information as well? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] PYTHON NEWBIE HELP!

2012-10-14 Thread bob gailer
esults of each step by entering the lines at the interactive prompt, then displaying the value of the newly created variable. You will be surprised by what you see! My personal guess is that you have not done the prior exercises or else the instructor is

Re: [Tutor] program for a problem

2012-10-17 Thread bob gailer
you as you make effort and run into problems. Mark's response indicates that we will write code for you for pay. If you want help, show us what you've done and where you are stuck. Is this a homework assignment? How is one to obtain the "current exchange rate"? -- Bob

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

2012-10-17 Thread boB Stepp
use the same object (since the value is the same and is immutable) for the sake of efficiency..." I ask: Which implementations of Python do this? In trying to make any code I write portable across as many platforms as possible, should I avoid using the identit

<    8   9   10   11   12   13   14   15   16   17   >