[Tutor] Error message

2014-08-10 Thread RICHARD KENTISH
Hi! Ive installed Python 2.7.8 and pygame 1.9.1 onto a macbook pro 10.9.4 Mavericks. The code is taken direct from the 'making games' book. Here it is pasted from idle: import pygame, sys from pygame.locals import * pygame.init() displaysurf = pygame.dispaly.set_mode((400, 300))

Re: [Tutor] Error message

2014-08-10 Thread Steven D'Aprano
On Sun, Aug 10, 2014 at 10:32:52AM +0100, RICHARD KENTISH wrote: Hi! Ive installed Python 2.7.8 and pygame 1.9.1 onto a macbook pro 10.9.4 Mavericks. The code is taken direct from the 'making games' book. Here it is pasted from idle: Whenever you have a mysterious error in Python that

[Tutor] Error in printing out totalSystolic on paper (1018)

2014-08-10 Thread Ken G.
Receiving the following error from the terminal screen: Traceback (most recent call last): File Blood Pressure05Print45.py, line 95, in module pr.write(totalSystolic) TypeError: expected a character buffer object Portion of strip: = pr.write ( ), pr.write (pulse),

Re: [Tutor] Error in printing out totalSystolic on paper (1018)

2014-08-10 Thread Peter Otten
Ken G. wrote: Receiving the following error from the terminal screen: Traceback (most recent call last): File Blood Pressure05Print45.py, line 95, in module pr.write(totalSystolic) TypeError: expected a character buffer object Portion of strip: = pr.write (

Re: [Tutor] Error in printing out totalSystolic on paper (1018)

2014-08-10 Thread Ken G.
On 08/10/2014 10:38 AM, Alex Kleider wrote: On 2014-08-10 06:41, Ken G. wrote: Receiving the following error from the terminal screen: Traceback (most recent call last): File Blood Pressure05Print45.py, line 95, in module pr.write(totalSystolic) TypeError: expected a character buffer object

Re: [Tutor] Error in printing out totalSystolic on paper (1018) [SOLVED]

2014-08-10 Thread Ken G.
Thanks you to the list for helping me solve my problem. I never had problem using and printing on paper pr.write in my coding until this latest one popped up. Yeah, this old dog is still learning new tricks here. LOL. Again, thanks. Ken ___ Tutor

[Tutor] Using Python and Regex

2014-08-10 Thread Bill
Hi, I'm relatively new to Python and I'm trying to write a script to iterate through a series of text files in folder searching for some specific text and write it to a CSV. I plan to use Regex to match the text and I have already identified the Regex to do this. I've also got as far as

Re: [Tutor] Error message

2014-08-10 Thread RICHARD KENTISH
Hi All, I have found a work around - not entirely sure what I did but followed this website  http://www.reddit.com/r/pygame/comments/21tp7n/how_to_install_pygame_on_osx_mavericks/ Still can't run through idle but dragging the saved .py file to the python launcher works! Thanks for your help.

Re: [Tutor] Error message

2014-08-10 Thread RICHARD KENTISH
Thanks for your response. I have tried your suggestion and get the same error.   Here's the text from terminal. Richards-MacBook-Pro:Python resources richardkentish$ pwd /Users/richardkentish/desktop/Python resources Richards-MacBook-Pro:Python resources richardkentish$ python blankgame.py

Re: [Tutor] Using Python and Regex

2014-08-10 Thread Joel Goldstick
On Sun, Aug 10, 2014 at 7:30 AM, Bill bill5w...@outlook.com wrote: Hi, I'm relatively new to Python and I'm trying to write a script to iterate through a series of text files in folder searching for some specific text and write it to a CSV. I plan to use Regex to match the text and I have

Re: [Tutor] Using Python and Regex

2014-08-10 Thread Alex Kleider
On 2014-08-10 08:58, Joel Goldstick wrote: You need to look at os.walk: https://docs.python.org/2/library/os.html#os.walk is os.path.walk depricated? https://docs.python.org/2/library/os.path.html ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Using Python and Regex

2014-08-10 Thread Alex Kleider
On 2014-08-10 04:30, Bill wrote: Hi, I'm relatively new to Python and I'm trying to write a script to iterate through a series of text files in folder searching for some specific text and write it to a CSV. I plan to use Regex to match the text and I have already identified the Regex to do