[Tutor] Re: [meta-sig] accpeting wild characters from command line

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Mon, 21 Oct 2002 02:32:00 -0700 (PDT)


Hi Roslyn,

The 'meta-sig' is not really meant for questions about Python
specifically;  it's actually meant for meta-Python issues (i.e. the
creation of special interest groups, administrative stuff.)  Boring stuff.
*grin*


People have already recommended you to look for a more appropriate forum
for questions, and ignoring their warning is not a good thing to do.
Let's not disturb them: a roused list-admin is not a happy sight.


You'll get better help if you post to a forum specifically meant for
Python learning.  A good one is Python-Tutor:

    http://mail.python.org/mailman/listinfo/tutor


We'd be happy to hear from you!  For your convenience, I'll forward your
message to the list.  In the future, please post general Python-learning
questions to tutor, not meta-sig.



> i have a list of .txt files that i would like to enter from command
> line, but as its a hassle to write all the names i would like to just
> type in *.txt at the python command line. could someone tell me how i
> can have python interpret that wils char, is there any built in
> function?? thanks.


You may find the 'glob' module useful for this.  See:

    http://python.org/doc/lib/module-glob.html

for examples of how to use this module.



I hope this helps!