Re: [Tutor] dollarize.py

2008-06-21 Thread wesley chun
dollarize(1234567.8901) returns- $1,234,567,89 : amount = raw_input(Enter an amount: ) dollar_amount = dollarize(amount) print dollar_amount the solution you're creating is *slightly* different than the original spec in the problem (Exercise 13-3). the argument to dollarize() is supposed

Re: [Tutor] File Stream Assignment?

2008-06-21 Thread FT
On: Friday, June 20, 2008 11:47 PM Kent Johnson Wrote: On Fri, Jun 20, 2008 at 5:47 PM, FT [EMAIL PROTECTED] wrote: I would like to know how a file can be open for a stream event? What is a stream event? I ask this question because of the SAPI 5 save a wave file and the only way to do

Re: [Tutor] File Stream Assignment?

2008-06-21 Thread Alan Gauld
FT [EMAIL PROTECTED] wrote Caveat: I know nothing about MS SAPI. The following code illustrates how to speak a text file in a specific voice in Visual Basic. This example assumes a text file (ttstemp.txt) containing the text to be spoken already exists. ISpeechVoice.SpeakStream is used here to

Re: [Tutor] File Stream Assignment?

2008-06-21 Thread FT
Alan Gauld Wrote: FT [EMAIL PROTECTED] wrote Caveat: I know nothing about MS SAPI. The following code illustrates how to speak a text file in a specific voice in Visual Basic. This example Notice this says nothing about writing to a file. Dim FileName As String Dim FileStream As New

Re: [Tutor] File Stream Assignment?

2008-06-21 Thread FT
Alan, This is what I wrote in python. The onlyu thing I did not do is a declaration of a filestream as the VB example does. I get no errors, just the Speak method just speaks. The saved file has no data, 0 Bytes. Now the note they mentioned was the True flag and I inserted that. import

Re: [Tutor] File Stream Assignment?

2008-06-21 Thread Alan Gauld
FT [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Alan, This is what I wrote in python. file4tts = open('test.wav', 'w', True) av.AudioOutputStream = file4tts av.Speak( Hello World!, ASYNC) file4tts.close You need parentheses after close. Otherwise you are evaluating the

Re: [Tutor] File Stream Assignment?

2008-06-21 Thread FT
Alan Gauld Wrote: FT [EMAIL PROTECTED] wrote Caveat: I know nothing about MS SAPI. The following code illustrates how to speak a text file in a specific voice in Visual Basic. This example assumes a text file (ttstemp.txt) containing the text to be spoken already exists.

[Tutor] WIn32 extension -= exposing methods with a windows handle

2008-06-21 Thread Mike Meisner
I would like to capture information from a multi-player internet game in order to tabulate player statistics. Specifically, I need information from a chat box within the main play window. Using the win32 extension (win32gui module: EnumWindows, EnumChildWIndows) I can obtain a handle to the

Re: [Tutor] WIn32 extension -= exposing methods with a windows handle

2008-06-21 Thread Alan Gauld
Mike Meisner [EMAIL PROTECTED] wrote i obtain a handle to the chat box. At that point, I don't see any apparent win32 functions to expose the methods available in the chat box and, thereby, extract the chat text information I need. It depends on the exact type of the dialog box. You can get

[Tutor] Tkinter on OS X

2008-06-21 Thread Shrutarshi Basu
I've been writing a simple Tkinter interface to one of my programs. But it looks rather bad on OS X leopard. I was wondering why that was the case, since it seemed to take up at least some GUI elements (like button styles). I then came upon the following page:

Re: [Tutor] Tkinter on OS X

2008-06-21 Thread Kent Johnson
On Sat, Jun 21, 2008 at 5:55 PM, Shrutarshi Basu [EMAIL PROTECTED] wrote: I've been writing a simple Tkinter interface to one of my programs. But it looks rather bad on OS X leopard. I was wondering why that was the case, since it seemed to take up at least some GUI elements (like button

Re: [Tutor] Tkinter on OS X

2008-06-21 Thread Steve Willoughby
Shrutarshi Basu wrote: I've been writing a simple Tkinter interface to one of my programs. But it looks rather bad on OS X leopard. I was wondering why that was the case, since it seemed to take up at least some GUI elements (like button styles). I then came upon the following page:

[Tutor] Is this the right way to create a

2008-06-21 Thread Zameer Manji
I'm trying to create a library for the Last.fm webservice[1] and the first thing I created was a class for the Profile Information.[2] Is this the proper way of creating it? Is this useful to another programmer? import urllib import xml.etree.ElementTree as ET from BeautifulSoup import