Re: [Tutor] Python help

2015-08-24 Thread William
oop went a = 0 #increments with each loop c = 0 while (c<5): b = a+1 c = a+b a += 1 print(c) print("Number of loops until c >= 5:", a) I think that is all that is being asked here. HTH! -William ___ Tutor maillist

[Tutor] (no subject)

2014-11-29 Thread William
the following error Traceback (most recent call last): File "/home/william/Desktop/Pygame/Python 3X/Drawing_Shapes.py", line 48, in font = pygame.font.SysFont('Calibri', 25, True, False) File "/usr/local/lib/python3.4/dist-packages/pygame/sysfont.py", line 614, in S

[Tutor] Upgrade to 2.4

2004-12-04 Thread William Allison
I compiled Python 2.3.4 from source, but now I would like to upgrade to 2.4. There doesn't seem to be a "make uninstall" target for 2.3.4. Will compiling 2.4 overwrite the older version, or will I have two versions of Python on my system? Thanks, Will __

Re: [Tutor] Upgrade to 2.4

2004-12-05 Thread William Allison
Danny Yoo wrote: On Sat, 4 Dec 2004, William Allison wrote: I compiled Python 2.3.4 from source, but now I would like to upgrade to 2.4. There doesn't seem to be a "make uninstall" target for 2.3.4. Will compiling 2.4 overwrite the older version, or will I have two versions

Re: [Tutor] datetime, time zones, and ISO time

2010-02-17 Thread William Witteman
suitable for every application.[1] I suspect that it'll take some fooling around to see how it works though - use the interpreter or ipython to test things out. [1] http://docs.python.org/library/datetime.html -- yours, William ___ Tutor mail

Re: [Tutor] datetime, time zones, and ISO time

2010-02-17 Thread William Witteman
ent* offset between local time and >utc. I know the system has this information already; it doesn't >require any kind of fancy calculations about global politics or >anything. Well, does time.timezone help? It returns time offset from UTC in seconds. -- yours, William _

Re: [Tutor] What Editori?

2010-02-24 Thread William Witteman
itors. Certainly you would find many who would (perhaps strenuously) refute a suggestion that vi[m]|emacs are not "powerful". Of the many editors mentioned in this thread at least vim, emacs and geany have integration available for any version contr

Re: [Tutor] has it gone quiet or is it just me?

2010-07-21 Thread William Witteman
been hearing crickets as well. -- yours, William ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Scrabble Help

2010-09-05 Thread William Allison
I'd like to write a program to help find words for Scrabble but I've been having trouble right from the beginning. tiles = 'aeirstw' dictionary = ['aardvark', 'cat', 'dog', 'taste', 'stare', 'wrist'] for word in range(len(dictionary)): for letter in range(len(dictionary[word])): if d

[Tutor] Long list error

2009-03-08 Thread William Stephens
teger Is there a type or something that I can do to prevent this error? Or am I on the wrong track for such large primes? Thanks, William Stephens ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Tokenizing Help

2009-04-22 Thread William Witteman
cipate what will be found What I am looking for is some help to get started, either with explaining the implementation of one of the modules with respect to my format, or with an approach that I could use from the base library. Thanks. -- yours, W

Re: [Tutor] Tokenizing Help

2009-04-22 Thread William Witteman
an appropriate tool and hints on possible >algorithms. I hope this helps. I spent quite some time with pyparsing, but I was never able to express the rules of my grammar based on the examples on the website. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tokenizing Help

2009-04-22 Thread William Witteman
I could use from the base library. >> > > What is your ultimate goal? These references will populate a django model. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tokenizing Help

2009-04-22 Thread William Witteman
he only type of file I'd need to parse, I'd agree with you, but this is one of at least 4 formats I'll need to process, and so a robust methodology will serve me better than a regex-based one-off. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Having trouble with a dictionary of lists

2009-09-03 Thread William Witteman
= 0 for term in sslist: # The line below is where my program barfs. sortedtermdict[term][counter] = term counter = counter + 1 for row in sortedtermdict: fn.writerow(row) -- yours, William ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Having trouble with a dictionary of lists

2009-09-04 Thread William Witteman
f_columns)] sortedtermlist = termdict.keys() sortedtermlist.sort() counter = 0 for sslist in sslists: for term in sslist: #debug print(counter) #debug print(term) termdict[term][counter] = term counter = counter + 1 for term in sortedterml

Re: [Tutor] Having trouble with a dictionary of lists

2009-09-04 Thread William Witteman
On Fri, Sep 04, 2009 at 09:54:20AM -0700, Emile van Sebille wrote: >On 9/4/2009 9:09 AM William Witteman said... >>On Thu, Sep 03, 2009 at 11:26:35AM -0700, Emile van Sebille wrote: >> >>Thanks to Emile for pointing out the error. There were several other >>errors - in

[Tutor] Recursive user input collection problem

2009-10-13 Thread William Witteman
This works fine if I put in good input, but not if I pass in a bad value. Can anyone show me where I have gone astray? Thanks. -- yours, William ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Recursive user input collection problem

2009-10-14 Thread William Witteman
how I was doing it). Lie's suggestion that I didn't understand the calling structure of Python was right on the money, and his included link helps with that, too. Thanks again. -- yours, William ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Recursive user input collection problem

2009-10-15 Thread William Witteman
On Thu, Oct 15, 2009 at 07:54:23AM -0400, Dave Angel wrote: >William Witteman wrote: >>Thanks to all who responded. There were several good points about the >>code itself, all of which both helped and work. >> >>I will likely use Alan's example because I find it

Re: [Tutor] database applications with Python - where to start

2005-05-05 Thread William O'Higgins
gratefully received. Vague questions are hard to answer specifically, but they are often worth asking. You may find more success decomposing your vague questions into specific sub-questions - they are easier to answer quickly. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python versions and Debian?

2005-05-11 Thread William O'Higgins
there gotchas based on that minor-version change? Your insight is appreciated, thanks. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] *nix-specific Python Scripting

2005-05-12 Thread William O'Higgins
nt, or do I construct my command lines in pieces and hand them to os.execl one at a time? Thanks. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] *nix-specific Python Scripting

2005-05-12 Thread William O'Higgins
On Thu, May 12, 2005 at 09:37:03PM +0200, Roel Schroeven wrote: >William O'Higgins wrote: >> It is a simple check to see if the X server is running (this is >> inelegant, but it works - if you have a better way, I'd love to know >> about it, but I would like to be

Re: [Tutor] Perl to Python phrasebook

2005-05-13 Thread William O'Higgins
l bet a lot of readers know about it already, but I just stumbled on it >and thought that some readers might also find it useful. That's excellent, thank you Terry! My hovercraft is no longer full of eels! -- yours, William signature.asc Description: Digital signature _

[Tutor] Testing for commandline args

2005-05-13 Thread William O'Higgins
So I'm doing something wrong. I looked at getopt, but that seemed to be doing what I was already doing, except in a way I could not follow :-( Any tips would be appreciated, thanks. -- yours, William signature.asc Description: Digital signature _

[Tutor] Lists of files

2005-05-14 Thread William O'Higgins
tter way to create a list of files in a directory? And, how do I populate my list to get all of the filenames. I've also tried "pics + [file]", but that gave me an empty list. -- yours, William signature.asc Description: Digital signature

Re: [Tutor] Lists of files

2005-05-16 Thread William O'Higgins
" and "use warnings" pragmas in Python? Thanks. -- yours, William #!/usr/bin/python import os, sys, random, imghdr # This is a little program I call via cron to change my desktop every # few minutes. With no arguments it goes to my directory of backdrop # images and picks a v

[Tutor] dictionary values in strings

2005-05-19 Thread William O'Higgins
is: AttributeError: 'dict' object has no attribute 'key' I don't know how to interpret that error (well, I know I screwed up, but ... :-) Thanks. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] dictionary values in strings

2005-05-20 Thread William O'Higgins
On Thu, May 19, 2005 at 09:47:50PM +0100, Max Noel wrote: > >On May 19, 2005, at 20:49, William O'Higgins wrote: > >>I am trying to discover the syntax for call on a dictionary of >>lists by >>key and index. >> >>The data structure looks like this:

[Tutor] creating files on open()

2005-05-20 Thread William O'Higgins
When I am open()-ing a file, I sort of expect that if the file doesn't exist that it would be created, but it doesn't, it whines about it instead. So, how do I create a file with Python? I've looked all over, but I'm obviously missing something. Thanks. -- yours, Will

Re: [Tutor] creating files on open()

2005-05-20 Thread William O'Higgins
On Fri, May 20, 2005 at 01:48:19PM -0500, Kristian Zoerhoff wrote: >On 5/20/05, William O'Higgins <[EMAIL PROTECTED]> wrote: >> When I am open()-ing a file, I sort of expect that if the file doesn't >> exist that it would be created, but it doesn't, it whine

[Tutor] strip is deprecated, so what do I use?

2005-05-24 Thread William O'Higgins
I need an alternative syntax today, and I haven't been able to see what I should use instead. Anyone have a suggestion? -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.pyt

[Tutor] Wizards in Tkinter

2005-05-24 Thread William O'Higgins
m. Thanks. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] strip is deprecated, so what do I use?

2005-05-24 Thread William O'Higgins
On Tue, May 24, 2005 at 01:16:21PM -0400, Michael P. Reilly wrote: > On 5/24/05, William O'Higgins <[EMAIL PROTECTED]> wrote: > > As the subject says, I was looking for an analog to chomp, and found > strip() and friends (rstrip() and lstrip()), but they are depr

[Tutor] Expression order problem

2005-05-26 Thread William O'Higgins
ut pointers as to technique to avoid this would be appreciated. Thanks. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Where to start?

2008-02-01 Thread William Kilmartin
Here's what I'm trying to accomplish; I track statistics at work. E.g. calls out, $ collected etc.. The graph has a rough guess of highest possible at the top and the lowest number in the past 3 months at the bottom. It's a simple line graph, week after week. I need to be able to add names of

Re: [Tutor] Tutor Digest, Vol 48, Issue 2

2008-02-02 Thread William Kilmartin
Subject line so it is more specific > than "Re: Contents of Tutor digest..." > > > Today's Topics: > >1. matrix-vector multiplication errors (Dinesh B Vadhia) >2. Where to start? (William Kilmartin) >3. Re: Where to start? (Alan Gauld) > > >

[Tutor] Guess my number game

2005-12-15 Thread William Mhlanga
I have been trying to write a guess my number game (using Michael Dawsons book), where the computer guesses the number that I thought of. Here is my code so far,#The Guess My Number Game ##The computer picks a random number between 1 and 50#The player tries to guess it and the computer lets#the pla

[Tutor] Python app and UNIX commands

2006-03-31 Thread William Mhlanga
Hello, I have come up with an idea of an app that I would like to write using python but I need some guidance. I would like to write an app for Linux/Unix that fetches a gzipped or bzipped file from a remote server by http or ftp.  The file will be downloaded to a temporary directory, unzipped and

[Tutor] Invoking bash from python

2006-08-07 Thread William Mhlanga
I'd like to write an app that helps a user install a program on Linux after fetching it from a remote site. The program is packaged as a bin file and when run from bash, the user has to agree to a licence agreement by entering "y" or "n" and enter a path for installation. It seems like I need to fi

Re: [Tutor] Invoking bash from python

2006-08-07 Thread William Mhlanga
I think I found a solution to my problem and thats to use the os module (os.system function). I'm still open to any suggestions you may have.--WillOn 8/7/06, William Mhlanga <[EMAIL PROTECTED]> wrote: I'd like to write an app that helps a user install a program on Linux after fe

[Tutor] <> and chomp

2006-09-14 Thread William Allison
Hi, I'm new to programming and started with Perl but have been reading a lot of good things about Python. Thought I would switch before I have too much time invested in Perl. Anyway, my question is, is there something in Python similar to the diamond operator and chomp from Perl? I'm trying to re

[Tutor] <> and chomp

2006-09-14 Thread allison . william
Thanks for all the responses guys. I was actually able to figure out the infile = open('infilename.txt', 'r') for line in infile: Just wasn't sure if it was Pythonic or not. Had no clue about the line = line.rstrip('\n') so thanks again. I'll get to reading those links. P.S. David, I'm su

[Tutor] Better way to substitute text?

2006-09-29 Thread William Allison
Hi, Just learning Python, on chapter 6 of Learning Python 2nd Ed. So, on to the question. Is there a better way to implement the code below? It scans a saved html file and highlights certain keywords is a bold, red font. It works, but I suppose I'm wondering if it's the "Pythonic" way. Thanks

Re: [Tutor] Better way to substitute text?

2006-09-30 Thread William Allison
Shantanoo Mahajan wrote: > +++ William Allison [29-09-06 18:55 -0400]: > | Hi, > | Just learning Python, on chapter 6 of Learning Python 2nd Ed. So, on to > | the question. Is there a better way to > | implement the code below? It scans a saved html file and highlights > | c

Re: [Tutor] Better way to substitute text?

2006-09-30 Thread William Allison
open('test_highlight.html', 'a').write(in_put) > > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of William Allison > Sent: Saturday, September 30, 2006 8:10 AM > To: tutor@python.org > Subject: Re: [Tuto

Re: [Tutor] question

2007-02-14 Thread William Allison
Caicedo, Richard IT2 NSWC wrote: > > I am trying to get the $ python promt I can't seem to get it. I can > get the python shell but when I press enter I don't get the $ python? > > > > ___

[Tutor] datetime.timedelta Output Format

2007-04-01 Thread William Allison
Is there a way to have the output of "print tis" in the same format as "print now" and "print tafmsd" in the code below? Thanks, Will savage:~ wallison$ python Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits

Re: [Tutor] datetime.timedelta Output Format

2007-04-02 Thread William Allison
Alan Gauld wrote: > "R. Alan Monroe" <[EMAIL PROTECTED]> wrote > > >>> Is there a way to have the output of "print tis" in the same format >>> as >>> "print now" and "print tafmsd" in the code below? >>> > > >>> >>> now = datetime.date.today() >>> >>> print now >>> 2007-04-01 >>> >

Re: [Tutor] datetime.timedelta Output Format

2007-04-02 Thread William Allison
Kent Johnson wrote: > > It looks like Gustavo Niemeyer's dateutil module will at least do the > year/month/day calculation if not the formatting: > > In [1]: from datetime import date > In [2]: from dateutil import relativedelta > In [3]: now = date.today() > In [9]: rd = relativedelta.relativedel

Re: [Tutor] Need a Clean Start

2007-04-06 Thread William Allison
Keegan Johnson wrote: > I need to get the pygames, py2app, etc on my computer > (I have a Macintosh). Is there any way to clean up all these files > that I've accrued trying to get things to work? I've been able to do > a little bit but nothing more than that. Also, what should I use? > Th

Re: [Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread William Allison
Wayne Watson wrote: > That's the question in Subject. For example, the difference between > 08/29/2008 > and 09/03/2008 is +5. The difference between 02/28/2008 and 03/03/2008 is 4, > leap year--extra day in Feb. I'm really only interested in years between, > say, > 1990 and 2050. In other wor

[Tutor] New user Knows nothing about python I Need HELP

2012-01-30 Thread William Stewart
hello I am trying to make a math functions program which includes ADDITION: 2+2=4 SUBTRACTION: 4-2=2 MULTIPLICATION: 4*2=8 DIVISION: 4/2=2 EXPONENT: 2**3=8 REMAINDER: 5%2=1 I have no Idea how to start this task I have never used ANY programming programs before And I dont Know the language eit

[Tutor] Question on how to do exponents

2012-02-06 Thread William Stewart
Hello everyone, I am making a calculator and I need to know how to make it do exponents and remainders How can I input this info in python? Any help would be appreciated Thanks --- On Mon, 2/6/12, Steven D'Aprano wrote: From: Steven D'Aprano Subject: Re: [Tutor] Sandbox Game To: "tutor" Date

[Tutor] string integers?

2012-02-12 Thread William Stewart
I am trying to get 2 string variables and 2 integer variables to be able to be multiplied can anyone tell me what I did wrong   str1 = raw_input("Type in a String: ") str2 = raw_input("Type in a String: ") int1 = raw_input("Type in a integer variable: ") int2 = raw_input("Type in a integer variabl

Re: [Tutor] string integers?

2012-02-12 Thread William Stewart
these days I know you all dont have alot of time either and thats why I am extremely appreciative of everyones help     --- On Sun, 2/12/12, Dave Angel wrote: From: Dave Angel Subject: Re: [Tutor] string integers? To: "William Stewart" Date: Sunday, February 12, 2012, 5:07 PM On 02

Re: [Tutor] string integers?

2012-02-12 Thread William Stewart
Thank you for the reply It worked fine ! --- On Sun, 2/12/12, Steven D'Aprano wrote: From: Steven D'Aprano Subject: Re: [Tutor] string integers? To: tutor@python.org Date: Sunday, February 12, 2012, 6:50 PM William Stewart wrote: > this is the code I have >  str1 = raw_

[Tutor] how to rewrite area.py

2012-02-21 Thread William Stewart
hello I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). I am horrible at math and I cannot even figure out what I need to do for this Any help would be appreciated All I have is the menu which

Re: [Tutor] how to rewrite area.py

2012-02-22 Thread William Stewart
On 2/21/2012 6:51 PM, William Stewart wrote: hello I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). "Need to"" - why? Is this a homework assignment? I

Re: [Tutor] how to rewrite area.py

2012-02-22 Thread William Stewart
width+width+width+width = 4*width RECTANGLES:     area = width*height     perimeter = width+height+width+height = 2*(width+height) CIRCLES:     area = pi*radius**2     circumference = 2*pi*radius         --- On Tue, 2/21/12, Alan Gauld wrote: From: Alan Gauld Subject: Re: [Tutor] how

Re: [Tutor] Python web script to run a command line expression

2013-05-18 Thread William Ranvaud
I'm not sure if this is what you are looking for or if this will work on WAMP but python has a virtual terminal emulator called Vte or python-vte. I use it to display the terminal and run commands. I'm using it on Linux by adding "from gi.repository import Vte". Hope it helps. On 18-05-2013

[Tutor] library:

2013-08-21 Thread William Crowder
I am reading posts and watching videos. I am following along with the shell, i am retaining the info. But WHAT is a library? Thanks, everyone. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://ma

[Tutor] New dealing with Pythong and programming

2014-08-06 Thread William Vargas
Hello My name is Will, I live in Costa Rica and I really want to learn how to program. In the past, a friend said to me that was really cool but I did not feel the call to learn, but now I was talking to a new friend and he said to me code was really great then I ask what was the best language and

[Tutor] (no subject)

2014-10-09 Thread William Becerra
I'm new to programming. Started reading the book 'How to think like a computer Scientist-learning with python'. I'm now in chapter 3 sub-chapter 3.4 Math functions. When I write the following code: import maths; decibel = math.log10 (17.0); angle = 1.5; height = math.sin(angle); print height; I

Re: [Tutor] (no subject)

2014-10-09 Thread William Becerra
It is working now. Thank you everyone. It was very helpfull. On Fri, Oct 10, 2014 at 2:36 AM, Alan Gauld wrote: > On 09/10/14 19:38, William Becerra wrote: > > import maths; >> > > Python, like most languages speaks American English > so its math not maths. > &g

[Tutor] keyword colors disappear

2014-10-11 Thread William Becerra
Hey, I'm new to programming. Only have about 2 weeks of experience. Using Python 2.7.8 and running Windows 8 I'm having the following problem. I open Python shell press file, new file and write my code(any code) then all the Python keywords appear in their different *colors*, for example print ap

[Tutor] Infinite Recursion

2014-10-12 Thread William Becerra
Hey, I'm new to programming. Using python 2.7.8 and running windows8 OS I'm reading 'How to think like a computer scientist, learning with Python' I'm in chapter 4 sub-chapter 4.11 Infinite recursion According to the book if I write def recurse(): recurse() I should get the following error F

[Tutor] Return Statement error

2014-10-12 Thread William Becerra
error appears The window says the following There's an error in your program: ***'return' outside function (C:/Users/William/Desktop/Python Files/Function compare.py, line6) What am I doing Wrong? I noticed that if i substitute all the return keywords with print the code runs corr

Re: [Tutor] Return Statement error

2014-10-13 Thread William Becerra
I am familiar with funtions, i didn't realize i had to write the return statement inside a function...Thank you all..that was very helpful On 13 Oct 2014 01:03, "Steven D'Aprano" wrote: > On Sun, Oct 12, 2014 at 04:38:54PM +0200, William Becerra wrote: > > Hello

[Tutor] Differentiating vowels from consonants

2014-10-26 Thread William Becerra
Hello, I'm new to programming Running Python 2.7.8 on Windows 8 OS I was reading http://www.sthurlow.com/python/lesson07/ Here there is an example of the for loop with a Cheerleader program but the program is not able to print grammatically correct. word = raw_input("Who do you go for? ") for l

[Tutor] Flow of execution of execution

2014-11-03 Thread William Becerra
hey, I'm new to programming. running Python 2.7.8 on windows 8 OS Im on chapter 6 of a book called 'How to Think Like a Computer Scientist-Learning with Python' here is the code: def printMultiples(n, high): i = 1 while i<=high: print n*i, "\t", i = i + 1 print def multi

Re: [Tutor] Flow of execution of execution

2014-11-03 Thread William Becerra
Thank you guys On Mon, Nov 3, 2014 at 11:26 PM, Alan Gauld wrote: > On 03/11/14 18:04, William Becerra wrote: > > def printMultiples(n, high): >> i = 1 >> while i<=high: >> print n*i, "\t", >> i = i + 1 >>

[Tutor] Strings

2014-11-05 Thread William Becerra
Hey, I'm new to programming running Python 2.7.8 Windows 8.1 I was reading 'How to Think Like a Computer Scientist- Learning with Python' chapter 7 sub-chapter 7.7 I have the following code: names = "John, Cindy, Peter" def find(str, ch, s): index = 0 while index < len(str): if s==

Re: [Tutor] Strings

2014-11-06 Thread William Becerra
Thank you guys On Thu, Nov 6, 2014 at 3:39 AM, Dave Angel wrote: > William Becerra Wrote in message: > > > > have the following code: > names = "John, Cindy, Peter" > def find(str, ch, s): > index = 0 > while index < len(str): >

[Tutor] hexodecimal to decimal form

2014-11-11 Thread William Becerra
Hello, I'm new to programming using Python 2.7.8 and Windows 8 OS I'm reading How to Think Like a Computer Scientist - learning with python on chapter 12.2 theres the following code: class Point: pass blank = point() blank.x = 3.0 blank.y = 4.0 >>print blank.x 3.0 >>print blank.y 4.0 >>prin

Re: [Tutor] hexodecimal to decimal form

2014-11-11 Thread William Becerra
Thank you for your time On 11 Nov 2014 15:02, "Dave Angel" wrote: > William Becerra Wrote in message: > > Hello, I'm new to programming using Python 2.7.8 and Windows 8 OSI'm > reading How to Think Like a Computer Scientist - learning with pythonon > chapter 1

Re: [Tutor] Trouble creating a pygame.font.SysFont, was Re: (no subject)

2014-12-01 Thread William Becerra
It seems I forgot to write pygame.init() Thank you guys for your time it is much appreciated.  On Saturday, 29 November 2014, 15:31, Peter Otten <__pete...@web.de> wrote: William wrote: Hello William; please provide a meaningful subject line so that your readers get a hint w

[Tutor] Fahrenheit to Celsius Conversion with if else statements

2017-06-12 Thread William Gan
uted instead. The if block was skipped. Enter C for Celsius to Fahrenheit or F for Fahrenheit to Celsius. Enter C or F:c Enter temperature:100 100 F is equivalent to 37.78 C. I could not figure out my mistake. For advice, please. Thank you. Best regards william _

Re: [Tutor] Fahrenheit to Celsius Conversion with if else statements

2017-06-12 Thread William Gan
Alan Gauld [mailto:alan.ga...@yahoo.co.uk] Sent: Tuesday, June 13, 2017 1:36 AM To: tutor@python.org Subject: Re: [Tutor] Fahrenheit to Celsius Conversion with if else statements On 12/06/17 15:17, William Gan wrote: > print('Enter C for Celsius to Fahrenheit or F for Fahrenheit to > Ce

[Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm

2017-06-14 Thread William Gan
Good day Everyone, I am seeking help on two issues. ISSUE 1: Yesterday I posted a problem on this tiny script I wrote for temperature conversion (as practice for a newbie). My error was pointed out to me that there is a difference in upper and lowercase letters. After correcting that error, I

Re: [Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm

2017-06-15 Thread William Gan
] Sent: Thursday, June 15, 2017 2:15 AM To: tutor@python.org Subject: Re: [Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm On 14/06/17 15:20, William Gan wrote: > print('Enter C for Celsius to Fahrenheit or F for Fahrenheit to > Celsius.') > >

Re: [Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm

2017-06-15 Thread William Gan
...@graniteweb.com] Sent: Thursday, June 15, 2017 2:04 AM To: tutor@python.org Subject: Re: [Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm > On Jun 14, 2017, at 09:20, William Gan wrote: > > However, today I modified only the print instruction a little

Re: [Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm

2017-06-15 Thread William Gan
, June 15, 2017 1:53 AM To: William Gan ; tutor@python.org Subject: Re: [Tutor] Fahrenheit to Celsius Conversion another problem and Programming Paradigm Hi William, Glad to see the tutor list is being of help in your learning. On 14/06/17 09:20, William Gan wrote: > if unit == 'C' or

[Tutor] UTF-8 filenames encountered in os.walk

2007-07-03 Thread William O'Higgins Witteman
are treated as UTF-8? Thanks. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] UTF-8 filenames encountered in os.walk

2007-07-04 Thread William O'Higgins Witteman
elements. I suspect that my program will have to make sure to recast all equivalent-to-ascii strings as UTF-8 while leaving the ones that are already extended alone. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] UTF-8 filenames encountered in os.walk

2007-07-04 Thread William O'Higgins Witteman
t converting an >ascii string to a unicode string. Then what does mystring.encode("UTF-8") do? -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] UTF-8 filenames encountered in os.walk

2007-07-04 Thread William O'Higgins Witteman
party tools and inconsistent data I introduced errors in my Python code. The problem was in treating all filenames the same way, when they were not being created the same way by the filesystem. Thanks for all the help and suggestions. -- yours, William _

[Tutor] gotoxy

2007-08-01 Thread Robert William Hanks
hi folks, is there in python a gotoxy like in pascal so i can print stuff in other parts of the screen? what about some thing like it for the gui in windows? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread William O'Higgins Witteman
equire that the list change behaviour to what I consider to be the "right" thing (who cares what I think), but if the list decided to change their policy then nothing changes (the header would be changed to itself). -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Matching dictionary entries by partial key

2005-10-06 Thread William O'Higgins Witteman
d containing the original key:value pair as a list within it, but that seems cumbersome. Any one have a suggestion? Thanks. -- yours, William signature.asc Description: Digital signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Matching dictionary entries by partial key

2005-10-07 Thread William O'Higgins Witteman
On Thu, Oct 06, 2005 at 10:28:23PM -0400, Kent Johnson wrote: >William O'Higgins Witteman wrote: >> I'm trying to traverse a dictionary looking for partial matches of the >> key, and I'm not sure how. Here's a sample dictionary: >> >> dict =

[Tutor] Regex help

2006-08-26 Thread William O'Higgins Witteman
I won't need to be clever with precedence. Any help you could provide with the syntax of this pattern would be greatly appreciated. Thanks. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Regex help

2006-08-28 Thread William O'Higgins Witteman
On Sat, Aug 26, 2006 at 09:45:04AM -0400, Kent Johnson wrote: >William O'Higgins Witteman wrote: >> I want a case-insensitive, verbose pattern. I have a long-ish list of >> match criteria (about a dozen distinct cases), which should be all "or", >> so I won

Re: [Tutor] Regex help

2006-08-28 Thread William O'Higgins Witteman
On Mon, Aug 28, 2006 at 11:36:18AM -0400, Kent Johnson wrote: >William O'Higgins Witteman wrote: >> Thank you for this. The problem is apparently not my syntax, but >> something else. Here is a pared-down snippet of what I'm doing: >> >> In [1]: import r

[Tutor] Injecting Data into XML Files

2006-09-11 Thread William O'Higgins Witteman
an write it back to the file. Any pointers are appreciated. Thanks. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Injecting Data into XML Files

2006-09-11 Thread William O'Higgins Witteman
On Mon, Sep 11, 2006 at 09:57:28AM -0700, Dave Kuhlman wrote: >On Mon, Sep 11, 2006 at 12:11:37PM -0400, William O'Higgins Witteman wrote: >> I have a large number of XML documents to add data to. They are >> currently skeletal documents, looking like this: >> >>

Re: [Tutor] Injecting Data into XML Files

2006-09-11 Thread William O'Higgins Witteman
On Mon, Sep 11, 2006 at 02:38:46PM -0400, Kent Johnson wrote: >>>On Mon, Sep 11, 2006 at 12:11:37PM -0400, William O'Higgins Witteman >>>wrote: >>>>What I want is to open each document and inject some data between >>>>specific sets of tags. I&

[Tutor] Excluding branches while walking directory tree

2006-09-13 Thread William O'Higgins Witteman
x27;m looking for something reasonably scalable, 'cause I'm sure to need to update these rules in the future. Thanks. -- yours, William ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Excluding branches while walking directory tree

2006-09-14 Thread William O'Higgins Witteman
On Wed, Sep 13, 2006 at 11:34:25AM -0400, Kent Johnson wrote: >William O'Higgins Witteman wrote: >> I have to walk a directory tree and examine files within it. I have a >> set of directory names and filename patterns that I must skip while >> doing this walk. How do

  1   2   >