• Introduction to Python OS module and fnmatch module


    1、 First introduce the OS module ? 1 2 3 4 5 6 7 8 9 10 import os   print(os.getcwd()) # E:\python\test\python_models #Get current directory     print(os.listdir(“.”)) # [‘oop.py’, ‘python_argparse.py’, ‘python_click.py’, ‘python_os.py’, ‘python_re.py’, ‘python_requests.py’, ‘xx.py’, ‘__init__.py’] #Lists all files and folders in the specified directory, and returns a list 1. Introduction to splitting […]

  • Function and usage analysis of Python common modules sys, OS, time, random


    This paper introduces the functions and usages of Python modules sys, OS, time and random. The details are as follows: sys: Introduction: it mainly includes functions related to the interaction between Python compiler and system. Common functions: import sys Print (sys. Argv) # this file name, which is the parameter when the program has been […]

  • A preliminary summary of common functions in OS package of go language


    (1) The prototype of OS. Getwd function is func getwd() (PWD string, err error), which returns the path string and an err information. Why open this first? Because when I look at the OS package, the first one is chkdir, but you don’t know how to change the current directory? So let’s start with the […]

  • It is a method of creating directory to judge whether files exist in go programming


    Judge whether the file exists OS. Isexists() function and OS. Isnotexists(), their original form is func isexist (error) bool func isnotexist (error) bool, both pass in an err and return bool. Note that err has been defined Copy codeThe code is as follows:   /*  var (      ErrInvalid    = errors.New(“invalid argument”)      ErrPermission = errors.New(“permission […]

  • Introduction to the common functions in the OS standard library of golang


    The prototype of OS. Rename() function is func rename (old name, new name string) error. You enter the old file name, new file name, and return an error. In fact, the real implementation of this function uses syscall. Rename() and rename it by MoveFile (from * uint16, to * uint16) (error error error) = movefilew […]

  • Explain the common function usage of OS Library in go language with examples


    (f * file). Name() is the function that returns the name of the file. Func (f * file) name() string, the prototype of the function, operates on the pointer of the file and returns a string. It seems that the underlying implementation of the method is more helpful Copy codeThe code is as follows:  func […]

  • The method of converting audio file to m4a format in Mac OS lion


    When we listen to music, we often encounter that the audio format does not match the player, resulting in the inability to play. Usually we use audio conversion tools to help us solve this problem, but now Xiaobian wants to tell you a good news, that is, using Mac OS X lion’s own audio conversion […]

  • Summary of four methods of opening resource library in Mac OS X lion


    The resource pool of MAC system is hidden by default, perhaps because of the security of the system. However, it also brings some troubles to users, so how to open the MAC resource library? Opening method: Method 1 Open the finder and click “go”. At this time, you can only press and hold the “option” […]

  • Picture and text tutorial of forbidden method for recovery function of Mac OS X lion


    Mac OS X lion “recovery” function can help us save some applications, which will occupy disk space, so how can we disable this function? The following is the specific operation method, let’s go and have a look. Specific steps: 1. Run “System Preferences” from the  menu in the upper left corner, and then click […]

  • The method of Mac OS X lion to open all windows of inactive program


    In Mac OS X lion system, after users open the three finger glide gesture, they find that this operation can only open the window of the current application, but it is invalid for other inactive programs. But sometimes we want to open the windows of other applications without switching applications. What should we do? resolvent: […]

  • Apple releases OS X 10.10.3 beta to add new touchpad API and new Emoji expression


    One week after the launch of OS X 10.10.3 beta, Apple launched OS X Yosemite 10.10.3 beta 3 to developers early this morning, one month after the release of the first OS X 10.10.3 beta. The beta 3 compilation number of this release is 14d98g. Developers can complete the update through the MAC app store […]

  • How does Mac OS X optimize Diablo 3


    Diablo 3 is a large-scale online game popular with many players. Most Mac users can play Diablo 3 smoothly, but some old users can’t run smoothly. In order to solve this problem, today I will introduce some optimization methods of Diablo 3. The first thing to be clear is that players can press in the […]