[Tutor] Executing shell commands

Phil phillor9 at gmail.com
Sun Feb 16 23:01:54 EST 2020


On 17/2/20 12:24 am, Mats Wichmann wrote:
> On 16/2/20 3:04 pm, Mats Wichmann wrote:
>> from pathlib2 import Path
>> from glob import glob
>>
>> path = Path("/home/phil/Downloads/")
>>
>> for x in path.glob("*.gpx"):
>>      print (x)
> just note: you don't need the glob import line here, you're asking for
> (and getting because you use the qualified name path.glob) the glob
> method of the Path object from pathlib.
Thanks Mats, It was something that I was experimenting with and I meant 
to delete that line before pressing "send".

-- 
Regards,
Phil



More information about the Tutor mailing list