
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10476 Articles for Python

2K+ Views
The speech recognition is one of the most useful features in several applications like home automation, AI etc. In this section we will see how the speech recognition can be done using Python and Google’s Speech API. In this case we will give an audio using microphone for speech recognizing. To configure the microphones, there are some parameters. To use this module, we have to install the SpeechRecognition module. There is another module called pyaudio, which is optional. Using this we can set different modes of audio. sudo pip3 install SpeechRecognition sudo apt-get install python3-pyaudio For External Microphones ... Read More

809 Views
In this section we will see how to create a birthday reminder application using Python. Problem Statement Create an application using Python, which can check whether there is any birthday on the current day or not. If it is the birthday of some listed person, send a notification to the System with the name of that person. We need a file, where we can store the date and month and the name of the person as a lookup file for this application. The file will look like this − Here we will convert this application to a start-up application ... Read More

2K+ Views
Here we will see how we can get the UNIX shell style pattern matching techniques using Python. There is a module called fnmatch, which is used to do the work. This module is used to compare file name against a pattern, then returns True or False according to the matches.To use it at first we need to import it the fnmatch standard library module.import fnmatchIn the Unix terminal, there are some wildcards to match the patterns. These are like below −‘*’ The asterisk is used to match everything.‘?’ Question Mark is for matching a single character.[seq] Sequences are used to ... Read More

335 Views
To get the UNIX syslog library information, we need to use the syslog module into our programs. This module has syslog has different modules for the syslog library. To use this module, we should import it using − import syslog The methods are like below − Method syslog.syslog(message) or syslog.syslog(priority, message) This method is used to send a string type message to the system logger. Each message has a priority. The priority argument can be used to set the priority of the given message. Method syslog.openlog([ident[, logoption[, facility]]]) This method is used to logging options of subsequent syslog ... Read More

891 Views
To measure the UNIX resource usage, we need to use the resource module into our programs. This module also can control the resource utilization. To use this module, we should import it using − import resource Resource Limits In this module we can use the setrlimit() to limit the resource utilization. There are two parameters to limit the resources. These parameters are soft limit and the hard limit. The soft limit is basically the current limit, it can be changed over process, but it cannot exceed the hard limit. The hard limit can be reduced to any value ... Read More

340 Views
To use the UNIX command pipeline mechanism using python. In the command pipelining a sequence converts from one file to another file. This module uses /bin/sh command line. So we need os.system() and os.popen() methods. To use this module, we should import it using − import pipes The pipes holds Template class − class pipes.Template This class is basically an abstraction of a pipeline. It has different methods. These are as follows. Method Template.reset() This method is used to restore the pipeline template to its initial position. Method Template.clone() This method is used to create another new, ... Read More

3K+ Views
To control the files and the io, we should use the fcntl module. It is basically one interface to the fcntl() and ioctl() Unix routines. All methods in this module takes one integer or io.IOBase file-descriptor as their first argument. To use this module, we should import it using. import fcntl There are some modules of the fcntl module, these are − Method fcntl.fcntl(fd, op[, arg]) This method is used to perform the operation on the file using file descriptor. The operation is defined by op. The third argument is optional. It can be either integer type value ... Read More

536 Views
The termios module provides an interface to the POSIX for tty I/O control. It is only available for Unix system. To use the termios module, we should import it using − import termios All methods in this module, takes the file descriptor as an argument. There are some modules of the termios module, these are − Method termios.tcgetattr(fd) This method returns a list of tty attributes for the given file descriptor. The attributes are iflag, oflag, cflag, lflag, ispeed, ospeed, cc. Method termios.tcsetattr(fd, when, attributes) This method is used to set the attribute from the list of attributes. ... Read More

917 Views
The posix module is works on the UNIX environment. It provides the Operating system functionality.We should not import this module directly. We can use the os module. The os module is acts as a superset of the posix module on UNIX. On non-Unix system the posix is not available, but the os is available with some less functionality.To use the posix module, we should import it using.import posixThere are different methods and constants in the POSIX module.Constant posix.environThe environ is a dictionary object. It holds keys and values. The keys and values are of bytes type for UNIX. For example, ... Read More

1K+ Views
To display web based documents to users by using python, there is a module called webbrowser. It provides high level interface to handle web documents. On UNIX based system, this module supports lynx, Netscape, Mosaic etc browsers. For Windows and Macintosh, it uses the standard browsers. To use this module, we need to import the following module. import webbrowser The webbrowser module has different methods, and exceptions, these are as follows − Exception webbrowser.Error This error will raise when there is an error in the webbrowser interface. Method webbrowser.open(url, new=0, autoraise=True) This method is used to display the ... Read More