directory

  • Pycharm Sets font size/style
  • Pycharm Sets the background color
  • Pycharm Sets the development template
  • Four. Guess you like it

Recommended path for learning Python: Python Learning Directory >> Python Basics

Pycharm Sets font size/style

Select File – > Setting – > Editor – > Font, you can see the above interface, you can adjust the Font size, Font style, text line spacing according to your preferences, after setting the following window can be real-time preview, adjustment is more convenient, very simple (this is my own configuration).

Pycharm Sets the background color

Choose File – > Setting – > Editor – > Color Scheme – > General, you can see the above interface, Scheme according to your preferences, a total of 5 theme styles, after setting the following window can be real-time preview. Different theme styles have different color matching, easy to adjust (MY theme is Monokai).

Pycharm Sets the development template

Perhaps many partners are thinking about what is a template, why to set a template? Templates are a universal format, and if you set the Python templates in Pycharm, they are automatically included every time you create a Python file!

For example: Python3 uses ASCII encoding by default. If Python3 contains only English, there is no problem. If Python3 contains Chinese garble, there is a solution: add UTF-8 encoding at the beginning of the file.

# !usr/bin/env python
# -*- coding:utf-8 _*-
Copy the code

The question is: do you have to write the two lines above a thousand times to create a thousand Python files? Ctrl+C/Ctrl+V is fast.

** The solution provided by Pycharm for this kind of problem is a template. Select File – > Setting – > Editor – > Code Style – > File and Code Templates – > Select the corresponding File type to set the template Style. You can see the following interface: Then edit the template style on the right, play with it freely, very simple. 六四风波

Create a random Python file that looks like this:

#! Usr /bin/env python # -* -coding :utf-8 _*- """ @author: coding @blog: www.codersrc.com @file: python_test.py @time: A thousand miles without a single step, a river without a small stream, the wonderful life of program needs unremitting accumulation! "" "Copy the code

(Not a single line of code is typed)

If you are interested in my template you can copy and paste the following code and set it to Pycharm:

#! Usr /bin/env python # -* -coding :utf-8 _*- "" www.codersrc.com @file :${NAME}. Py @time :${DATE} ${Time} @motto: a thousand miles without accumulation, a small stream without rivers and seas, the wonderful program life needs unremitting accumulation! "" "Copy the code

Four. Guess you like it

  1. Introduction of Python
  2. Python Pycharm Anacanda difference
  3. Python2.x and python3. x, how to choose?
  4. Python Configuration Environment
  5. Introduction to Python Hello World

Pycharm sets the development template/font size/background color

This article is published by the blog – Ape Say Programming Ape Say programming!