發表文章

目前顯示的是 2023的文章
 Ubuntu has a mechanism, that is, the installed network card (NIC) will be renamed to another name when the system is booted. Although there is no difference in using it, it is just a little unaccustomed. After booting, we can observe the dmesg log as follows dmesg | grep rename You can see that the following network cards eth0 and eth1 have been renamed to ens160 and ens192: [1.341871] vmxnet3 0000:03:00.0 ens160: renamed from eth0 [1.362582] vmxnet3 0000:0b:00.0 ens192: renamed from eth1 The method of closing is very simple, that is, edit the /etc/default/grub file and change the following parameters: GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" Update grub.cfg with the following command sudo update-grub change interface configure /etc/network/interfaces

error message : configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: "%)']/following::android.widget.EditText"

 In general analysis, the last sentence is the key point: When reading the configuration file config.ini, there are % caused by   Solution one: Most likely configparser is reading the literal "%" sign in the string. The '%' symbol is used for string interpolation (substitution). If you want to use a literal "%", you can escape it with another "%". For example, use "100%%" to mean "100%" in configuration variables read by configparser. Solution two: Change from cf= configparser.ConfigParser() to : cf = configparser.RawConfigParser()