Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
NAS Access
-
I have a collection of mp3 files on a NAS on my local network. I'd like to read the mp3 tags of some of these files using Pythonista. Can I access a file using its UNC path (e.g. "\NAS\Media\Music\Artist\Album\Song.mp3")? When I try to open that path, I get a "No such file or directory" exception.
It's a huge library and I don't want to put it in Dropbox.
-
Have you tried connecting through file explorer first? Doing so first may simplify access down to a file path similar to what you’ve tried
https://appletoolbox.com/use-smb-to-connect-to-your-nas-drive-with-files-in-ipados-or-ios-13/
-
if you configure your NAS as SMB server in the standard Files app,
like hereand, in the left files browser of Pythonista, you open the Music folder of the NAS as external folder, like here
you would be able to access your songs via a script like
import os downloads_path = '/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/LTRovAMusique/Soirée/' os.chdir(downloads_path) filelist = os.listdir(downloads_path) for file in filelist: print(file)
N.b. The name LTRovAMusique is generated by Apple
-
To get this file path, share a song to this small Pythonista script
import appex fil = appex.get_file_path() print(fil)