Python

How To Set Up Python Web Application Development Environment

1. Make sure that the Python version of the system installation is 3.6.x. $ python3 –version Python 3.6.1 2. Run pip3 command to install the third-party libraries you need to develop your web application. 2.1 Install the asynchronous framework aiohttp $ pip3 install aiohttp 2.2 Install front end template engine jinja2. $ pip3 install jinja 2.3 […]

How To Set Up Python Web Application Development Environment Read More »

How To Get Current Path, Current Module File Name, Command Line Parameter And Executable File Path In Python.

1. How To Get The Current Path. The current path can be represented by ‘.’, and then converted to an absolute path by os.path.abspath(). import os print(os.path.abspath(‘.’)) Running result. $ python3 get_curr_path.py /Users/jerry 2. How To Get The File Name Of Current Module. It can be obtained by the special variable __file__. print(__file__) The output.

How To Get Current Path, Current Module File Name, Command Line Parameter And Executable File Path In Python. Read More »

Python Speech Recognition Introduction And Practice

Amazon’s huge success with Alexa has proven: in the near future, implementing a degree of voice support will become a basic requirement of everyday technology. Python programs that integrate speech recognition provide a level of interactivity and accessibility that no other technology can match. Most importantly, implementing speech recognition in Python programs is very simple.

Python Speech Recognition Introduction And Practice Read More »

Generate Graphic Verification Code Using Python Captcha Module

The captcha module is a Python third-party library designed to generate graphic and speech captcha codes. The graphic verification code supports Numbers and English words. 1. Captcha Module Installation. You can use the pip command to install it directly or go to it’s project GitHub page to download it. As the captcha module uses the

Generate Graphic Verification Code Using Python Captcha Module Read More »

Python JSON Example

When you define a python dict variable like below, the variable’s value is saved in memory when the program runs: d = dict(name=’Richard’, age=25, score=100) You can change the variable value at any time, such as changing the name to ‘Tom’, but once the program ends, the memory taken by the variable is completely reclaimed

Python JSON Example Read More »