import os
import random
delim = "\\"
ready = False
randompath = "C:"+delim;
while ready != True:
pathlist = [randompath+path+delim for path in [lpath for lpath in os.listdir(randompath)] if os.path.isdir(randompath+path)]
if pathlist == [] or random.randint(1,10) == 1:
ready = True
else ...
Die Suche ergab 1 Treffer
- Montag 2. März 2009, 21:56
- Forum: Allgemeine Fragen
- Thema: RandomPath
- Antworten: 18
- Zugriffe: 3015
