Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: rename same file names in different directories
Post: rename same file names in different directories

I have a directory which has 10 other dirs with many files: - directory - dir1 - dir2 - dir3 - ... How can i rename duplicate files from all dirs? For ex. we have 2 files with name "file1.t...
elnk General Coding Help 0 741 Nov-04-2022, 05:23 PM
    Thread: Сheck if an element from a list is in another list that contains a namedtuple
Post: RE: Сheck if an element from a list is in another ...

(Oct-25-2022, 08:15 PM)deanhystad Wrote: iberdeen's code does that. Is the problem that it does it for 1 tuple? Here I search multiple tuples (but I have only one file). from random import randint...
elnk General Coding Help 8 1,931 Oct-26-2022, 10:32 AM
    Thread: Сheck if an element from a list is in another list that contains a namedtuple
Post: RE: Сheck if an element from a list is in another ...

(Oct-25-2022, 06:40 PM)deanhystad Wrote: This is vague: yes, but i have namedtuple (module, name, alias and they can be listed)Do you want to check if file matches any of the fields in the tuple or ...
elnk General Coding Help 8 1,931 Oct-25-2022, 06:59 PM
    Thread: Сheck if an element from a list is in another list that contains a namedtuple
Post: RE: Сheck if an element from a list is in another ...

(Oct-25-2022, 05:06 PM)ibreeden Wrote: Do you mean this? for file in files: if file in requirements: print(f"{file} is in requirements") yes, but i have namedtuple (module, name, alias a...
elnk General Coding Help 8 1,931 Oct-25-2022, 06:03 PM
    Thread: Сheck if an element from a list is in another list that contains a namedtuple
Post: Сheck if an element from a list is in another list...

Hello, i have this code: def some_generator(some_args): Import = namedtuple("Import", ["module", "name", "alias"]) # "module", "name" and "alias" can be listed ... for n in node.names: ...
elnk General Coding Help 8 1,931 Oct-25-2022, 04:26 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020