473,770 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System bell

Am I right in thinking that >>>print "\a" should sound the system, 'bell'?

B
--
Computer says, 'no'
Jul 18 '05 #1
9 12245
Try:
import os
os.system('\a')

Jul 18 '05 #2
[Baza wrote]
Am I right in thinking that >>>print "\a" should sound the system, 'bell'?


It works on the shell on Windows for me (WinXP).

Trent

--
Trent Mick
Tr****@ActiveSt ate.com
Jul 18 '05 #3
Mr6
Matt wrote:
Try:
import os
os.system('\a')


Ta, that's got it.

B
Jul 18 '05 #4
[Mr6 wrote]
Matt wrote:
Try:
import os
os.system('\a' )


Ta, that's got it.


I suspect that you are misinterpreting failure as success here. This is
probably only resulting in a bell from the shell when it complains that
it doesn't know of any command called "\a" to run.

Trent

--
Trent Mick
Tr****@ActiveSt ate.com
Jul 18 '05 #5
Trent Mick wrote:
I suspect that you are misinterpreting failure as success here. This is
probably only resulting in a bell from the shell when it complains that
it doesn't know of any command called "\a" to run.


Contrarily, \a is in fact the escape sequence for, as the OP put it,
the system "bell" . I can only speak as a Windows user however; I'm
unaware of the prevalence of this feature across operating systems.

--
Daniel Bickett
dbickett at gmail.com
http://heureusement.org/
Jul 18 '05 #6
Trent Mick wrote:
[Baza wrote]
Am I right in thinking that >>>print "\a" should sound the system, 'bell'?

It works on the shell on Windows for me (WinXP).

Trent

Interesting. From a Cygwin bash shell I got an elegant little dingish
sort of a beep (my volume control was set kind of low). I then ran the
same code in a Windows shell and nearly deafened myself. It appears that
the volume control doesn't affect the Windows XP commans shell beep -
even muting the Windows audio output doesn't stop it (though it does
stop the Cygwin beep). This could cause heart attacks!

regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 18 '05 #7
On Fri, 01 Apr 2005 02:06:07 -0500, Steve Holden <st***@holdenwe b.com> wrote:
Trent Mick wrote:
[Baza wrote]
Am I right in thinking that >>>print "\a" should sound the system, 'bell'?

It works on the shell on Windows for me (WinXP).

Trent

Interesting. From a Cygwin bash shell I got an elegant little dingish
sort of a beep (my volume control was set kind of low). I then ran the
same code in a Windows shell and nearly deafened myself. It appears that
the volume control doesn't affect the Windows XP commans shell beep -
even muting the Windows audio output doesn't stop it (though it does
stop the Cygwin beep). This could cause heart attacks!

Another couple of data points:

Running python 2.3/MSVC6 or python 2.4/MinGW in an NT4 console window,
print '\a' beeps via the PC internal speaker (like winsound.Beep).

Running the bash shell of msys, echo -e '\a' also beeps via the PC speaker.
These are not affected by any volume control that I know of.

But running py2.3 idle, print '\a' displays a square empty box (which I
take to be the symbol for "unprintabl e" characters). That seems like an
oversight in terminal emulation.

Regards,
Bengt Richter
Jul 18 '05 #8
Serves me right for blindlyrunning things from IDLE.

This does work (tested on WinXP only):
import os
os.system('echo \a')

Jul 18 '05 #9
Mr6
Bengt Richter wrote:
On Fri, 01 Apr 2005 02:06:07 -0500, Steve Holden <st***@holdenwe b.com> wrote:

Trent Mick wrote:
[Baza wrote]
Am I right in thinking that >>>print "\a" should sound the system, 'bell'?
It works on the shell on Windows for me (WinXP).

Trent


Interesting . From a Cygwin bash shell I got an elegant little dingish
sort of a beep (my volume control was set kind of low). I then ran the
same code in a Windows shell and nearly deafened myself. It appears that
the volume control doesn't affect the Windows XP commans shell beep -
even muting the Windows audio output doesn't stop it (though it does
stop the Cygwin beep). This could cause heart attacks!



It's a weird thing. But if I run print "\a" from idle it does not work.
But if I save as a file, say, sound.py. Then run that with python
sound.py it does.

Why is that?

B
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
448
by: Steve Drake | last post by:
All, Sorry if this is the wrong group, but I could not find a good group for this question, so I chose a busy developer group. When you receive an alert from SHAREPOINT, the ICON shows a BELL on it, I want to-do the same when sending an email from .NET. Sharepoint does use SMTP to send, the same as .NET does (with system.web.mail), I have tried to add the correct headers :
7
1998
by: Dave Hammond | last post by:
You'd think this was an occasionally asked question, but a search for previous related posts only turned up one from 1999, and that one was never anwered. So... When handling a keypress event, the terminal bell always rings (at least with Internet Explorer). While it's not a show-stopper, it can become annoying. Anyone have any tricks to silence the bell? Thanks in advance!
2
2316
by: MLH | last post by:
This question, I apologize, is more of a math question than it is an Access question - I'm almost certain. The bell curve is another name for the normal distribution, which is a common type of graph that has more or less the shape of a bell. "The Bell Curve" was also the title of a book, a controversial book back in 1994. It was about intelligence. If you graph scores on an IQ test on the horizontal axis, and number of people who got...
1
1265
by: Blue Bell Trading | last post by:
Hi, I need to create a database so I can track my customers more easily. The list of customers comes from a csv file that I download from Paypal (that includes address, item id, ebay id etc data). But I want to be able to add notes to each record. I have done some vba in college but that was a year ago... If anybody can give me any links or point me in the right direct I'd be very
3
2018
by: Fred Nelson | last post by:
Hi: I have a vb.net web application running on an IIS server that has a sound card and VERY cheap speakers. I would like to know if there is a way to cause the speakers to make noice in the event that an event occurs that I want to be notified of. I don't care if they beep or play music. Any suggestions would be GREATLY appreciated!
6
6857
by: Csaba Gabor | last post by:
Is there a way in Mozilla/Firefox to ring the bell? For example, in Emacs or Notepad (on my Win XP Pro system) if you enter certain shortcuts (e.g. ^g or ^q, respectively), you get a sound to let you know that from the app's point of view, something unexpected happened. Can I accomplish something similar in FF with javascript or via the keyboard? Thanks, Csaba Gabor from Vienna
3
13606
by: Josh | last post by:
I want to get the ASCII Bell character (7) as a string. How? I'm pulliing my hair out over the stupid little task. HELP!!!!!!!!! ARRRAGGH! -- #####-----#####-----##### POV Tips and Hints at ... http://povman.blogspot.com/
12
2040
by: bluesteel | last post by:
I was asked to make a program which rang a bell at certain at certain moments. The one way i can think of making it is by using a loop, but i should try to avoid using it and i don't have any idea. I thought of looping, and when the time matched with the specified one, it rang the bell. I do not have it clear how to make it ring. They told me that i had to think of how to develop the program and they would think of how to make the bell ring when...
3
2863
by: fadger07 | last post by:
Hello, I have a packard bell laptop and when i turn it on the windows loading screen comes on for about 3mins and then goes to the packard bell screen, then reboots and starts all over again. i really need help anybody?
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.