الفرق بين المراجعتين ل"Python/glob"

من موسوعة حسوب
اذهب إلى التنقل اذهب إلى البحث
(إنشاء مبدئي)
 
ط
 
سطر 1: سطر 1:
The <code>glob</code> module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are returned in arbitrary order. No tilde expansion is done, but <code>*</code>, <code>?</code>, and character ranges expressed with <code>[]</code> will be correctly matched. This is done by using the <code>os.scandir()</code> and <code>fnmatch.fnmatch()</code>functions in concert, and not by actually invoking a subshell. Note that unlike <code>fnmatch.fnmatch()</code>, <code>glob</code> treats filenames beginning with a dot (<code>.</code>) as special cases. (For tilde and shell variable expansion, use <code>os.path.expanduser()</code> and <code>os.path.expandvars()</code>.)
+
تساعد هذه الوحدة في البحث عن جميع أسماء الملفات التي تطابق النمط المحدد وفق قواعد صدفة يونكس، وتعيد النتائج بترتيب عشوائي.

المراجعة الحالية بتاريخ 18:42، 23 سبتمبر 2018

تساعد هذه الوحدة في البحث عن جميع أسماء الملفات التي تطابق النمط المحدد وفق قواعد صدفة يونكس، وتعيد النتائج بترتيب عشوائي.