question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for pathlib

See original GitHub issue

It would be nice to add support pathlib, as others (such as NumPy or PIL) do. Converting all input path arguments to str would probably be enough.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
anisayaricommented, Oct 10, 2019

Update : I was able to use pathlib with just the as_posix() method :

avi_files_list = pathlib.Path('path_to_my_avi_files_folder').glob('*.abi')
for anv_file in avi_files_list:
    clip = VideoFileClip(anv_file.as_posix())
0reactions
tburrows13commented, Apr 27, 2020

Done in #1137. At the moment, moviepy just converts the path object to a string as soon as it receives it. In the future it would be nice if it internally used Path objects until as late as possible down the pipeline, but that would require a larger rewrite which seems unnecessary seeing as it works fine currently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pathlib — Object-oriented filesystem paths — Python 3.11.1 ...
Source code: Lib/pathlib.py This module offers classes representing filesystem paths with semantics appropriate for different operating systems.
Read more >
Add support for pathlib.Path type #97 - omry/omegaconf - GitHub
Once stronger typing is implemented in the library, consider adding support for the pathlib.Path type. Motivation: paths are often found in ...
Read more >
Python 3's pathlib Module: Taming the File System
In this tutorial, you will see how to work with file paths—names of directories and files—in Python. You will learn new ways to...
Read more >
Add support for pathlib.Path objects to arcpy - Esri Community
pathlib seems to be the preferred method for working with system paths in Python 3. We've started using it in place of `os.path`...
Read more >
Python Path – How to Use the Pathlib Module with Examples
Also, it provides functionalities and operations to help you save time while ... It inherits manipulation from the parent class and adds ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found