[Tutor] help

Evans Anyokwu onyxtic at gmail.com
Fri Dec 28 13:30:07 CET 2012


On Thu, Dec 27, 2012 at 12:07 PM, Randy WhiteWolf
<randywhitewolf at ymail.com>wrote:

> I am an older newbie teaching myself Python programming. I copied the code
> # Emonstrates escape sequences. This exercise is on page 22 of the Phthon
> Programming for the Absolute Beginner by Michael Dawson. I have copied the
> code verbatim below.
>
>
>
> # Sound the system bell
> print "\a"
>
> print "\t\t\tFancy Credits"
>
> print "\t\t\t \\ \\ \\ \\ \\ \\ \\"
> print "\t\t\t\tby
> print "\t\t\tMichael Dawson
> print "\t\t\t \\ \\ \\ \\ \\ \\ \\"
> print "\nSpecial thanks goes out to:"
> print "My hair stylist. Henry \'The Great\', who never says \"can\'t\"."
>
> raw_input ("\n\nPress the enter key to exit.")
>
>
> My problem is I hear no system bell; the enter doesn't respond by quitting
> the program; The problem with the program code the enter key hasn't worked
> in earlier programs.
>
> I appreciate any advice I may recieve with this coding glitch.
>
> Sincerely,
> Randy
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
I just tried your code and it worked for me. Like Alan and Steven have
pointed out already, sounding the system bell depends on how you are
running the code and your platform.

On my computer I have Putty installed which I use to connect remotely to my
server - so running that script remotely will not produce any sound.
However, it worked when saved and run locally on my Windows computer.

If on windows try this -
>>> print '\a'


If it still does not work make sure that your sound card is functioning and
the volume it not  muted.

Good luck.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121228/8b2a8547/attachment.html>


More information about the Tutor mailing list