About 10,700,000 results
Open links in new tab
  1. python - How do I list all files of a directory? - Stack Overflow

    Jul 9, 2010 · How can I list all files of a directory in Python and add them to a list?

  2. How do I import other Python files? - Stack Overflow

    How do I import files in Python? I want to import: a file (e.g. file.py) a folder a file dynamically at runtime, based on user input one specific part of a file (e.g. a single function)

  3. How can I delete a file or folder in Python? - Stack Overflow

    60 Deleting a file or folder in Python There are multiple ways to delete a file in Python but the best ways are the following: os.remove() removes a file. os.unlink() removes a file. It is a Unix alias of remove …

  4. python - What is __init__.py for? - Stack Overflow

    Here's the documentation. Python defines two types of packages, regular packages and namespace packages. Regular packages are traditional packages as they existed in Python 3.2 and earlier. A …

  5. Uploading multiple files in a single request using python requests ...

    The Python requests module provides good documentation on how to upload a single file in a single request: files = {'file': open ('report.xls', 'rb')} I tried extending that example by using this ...

  6. python - How can I iterate over files in a given directory? - Stack ...

    Apr 30, 2012 · I need to iterate through all .asm files inside a given directory and do some actions on them. How can this be done in a efficient way?

  7. How to upload file with python requests? - Stack Overflow

    If you want to upload a single file with Python requests library, then requests lib supports streaming uploads, which allow you to send large files or streams without reading into memory.

  8. Accessing Microsoft Sharepoint files and data using Python

    Jan 30, 2020 · Here's the starter code for connecting to share point through Python and accessing the list of files, folders and individual file contents of Sharepoint as well.

  9. python - How do I call a function from another .py file? - Stack Overflow

    function(a, b) Note that file is one of Python's core modules, so I suggest you change the filename of file.py to something else. Note that if you're trying to import functions from a.py to a file called b.py, …

  10. How do I move a file in Python? - Stack Overflow

    Jan 13, 2012 · Be aware: shutil.move in Python 2.7.3 fails if the destination already exists. So if that is possible, either catch the error, or manually remove the file/dir, then do the move.