python check folder path with *
<p>checking folder path with "*"</p>

<p>here is what i have tried.</p>

<pre><code>import os

    checkdir = "/lib/modules/*/kernel/drivers/char"
    path = os.path.exists(checkIPMI_dir)
    print path
</code></pre>

<p>False</p>

<p>this will always print False, is there other way that i can print it to true?
i know when i put static path, it can</p>

<pre><code>import os

    checkdir = "/lib/modules"
    path = os.path.exists(checkIPMI_dir)
    print path
</code></pre>

<p>i cant put static, because i have a few linux OS, that uses different kernel 
version, there for the number will not be the same.</p>