redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Thursday 21 June 2018 14:09

Ask your IT question here

loop over files in a directory



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> Python programming forum
View previous topic :: View next topic  
Author Message
Lusis Backwood JR
Enthusiastic Coder


Joined: 26 May 2006
Posts: 87
Location: United States
How do I loop over files in a directory?
Reply with quote
 
WarChild
Enthusiastic Coder


Joined: 24 Feb 2006
Posts: 46
Recursively or not?
Reply with quote
 
Gladis
Enthusiastic Coder


Joined: 24 May 2006
Posts: 107
os.listdir or os.walk
Reply with quote
 
Lusis Backwood JR
Enthusiastic Coder


Joined: 26 May 2006
Posts: 87
Location: United States
Aha
If I have a string, like rubbishGOODblah and I want to extract just the GOOD with a regular expression, can I do it in one line?
Ie string = re.compile('(GOOD)').match ?

Reply with quote
 
BigDaddy
Enthusiastic Coder


Joined: 26 May 2006
Posts: 147
If you know the exact string you want to extract, just use that ...
String = 'GOOD'
Or am I being too simplistic

Reply with quote
 
Guest Programmer





Lusis Backwood JR wrote:
Aha
If I have a string, like rubbishGOODblah and I want to extract just the GOOD with a regular expression, can I do it in one line?
Ie string = re.compile('(GOOD)').match ?


match what? You have to show where to look for the info you want to match.

Reply with quote
 
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> Python programming forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

© 2018 RedHo