Python: Making a beep noise

On Windows, if you want to just make the computer make a beep sound: import winsound frequency = 2500 # Set Frequency To 2500 Hertz duration = 1000 # Set Duration To 1000 ms == 1 second winsound.Beep(frequency, duration) The winsound.Beep() can be used wherever you want the beep to occur.

Python AttributeError: ‘module’ object has no attribute ‘Serial’ [duplicate]

I’m adding this solution for people who make the same mistake as I did. In most cases: rename your project file ‘serial.py’ and delete serial.pyc if exists, then you can do simple ‘import serial’ without attribute error. Problem occurs when you import ‘something’ when your python file name is ‘something.py’.

Virtual Serial Port for Linux

Complementing the @slonik’s answer. You can test socat to create Virtual Serial Port doing the following procedure (tested on Ubuntu 12.04): Open a terminal (let’s call it Terminal 0) and execute it: socat -d -d pty,raw,echo=0 pty,raw,echo=0 The code above returns: 2013/11/01 13:47:27 socat[2506] N PTY is /dev/pts/2 2013/11/01 13:47:27 socat[2506] N PTY is /dev/pts/3 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)