7. Input and output — Python 3.15.2 documentation
In the following code block there are two examples of how to format variables: ... write(string) writes the contents of string to the file, returning the number ...
In the following code block there are two examples of how to format variables: ... write(string) writes the contents of string to the file, returning the number ...
For example, the following command will create an RPM file called foo-1.0.noarch.rpm: python setup.py bdist_rpm. (The bdist_rpm command uses the rpm executable, therefore this has to be run on an RPM-based system such as Red Hat Linux, SuSE Linux, or Mandrake Linux.)
Source code: Lib/configparser.py This module provides the ConfigParser class which implements a basic configuration language which provides a structure ...
You could write a Unix shell script or Windows batch files for some of these ... Python allows you to split your program into modules that can be reused in other ...
which will ultimately copy foo.py to the appropriate directory for third-party modules in their Python installation. This simple example demonstrates some fundamental concepts of the Distutils. First, both developers and installers have the same basic user interface, i.e. the setup script.
How do I find a module or application to perform task X? · Where is the math.py (socket.py, regex.py, etc.) source file? · How do I make a Python script ...
For example: python setup.py bdist_wininst. will create an executable installer, foo-1.0.win32.exe, in the current directory. Other useful built distribution formats are RPM, implemented by the bdist_rpm command, Solaris pkgtool (bdist_pkgtool), and HP-UX swinstall (bdist_sdux).
Source code: Lib/os.py This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see ...
This simple example demonstrates some fundamental concepts of the Distutils. First, both developers and installers have the same basic user interface, i.e. the setup script.a module written in the low-level language of the Python implementation: C/C++ for Python, Java for Jython.
A comment may appear at the start of a line or following whitespace or code, but not within a string literal. ... For example, the length of word[1:3] is 2.
Source code: Lib/json/__init__.py JSON (JavaScript Object Notation), specified by RFC 7159(which obsoletes RFC 4627) and by ECMA-404, is a lightweight data ...