OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Make a python app for reading iTunes work under both Windows and macOS

  • Thread starter Thread starter user2801282
  • Start date Start date
U

user2801282

Guest
I'm writing an app to help set groupings in an iTunes library so that shuffle by grouping works for classical music (I'm surprised I couldn't find one). In windows I can use the code below and access the iTunes library as Python objects. What would I need to do to make the same code run under macOS and Windows?

Code:
import win32com.client
iTunesApp = win32com.client.Dispatch("iTunes.Application")
mainLibrary = iTunesApp.LibraryPlaylist;
tracks = mainLibrary.Tracks;
for i in range(1,tracks.Count+1): 
...
<p>I'm writing an app to help set groupings in an iTunes library so that shuffle by grouping works for classical music (I'm surprised I couldn't find one). In windows I can use the code below and access the iTunes library as Python objects. What would I need to do to make the same code run under macOS and Windows?</p>
<pre><code>import win32com.client
iTunesApp = win32com.client.Dispatch("iTunes.Application")
mainLibrary = iTunesApp.LibraryPlaylist;
tracks = mainLibrary.Tracks;
for i in range(1,tracks.Count+1):
...
</code></pre>
 

Latest posts

Online statistics

Members online
0
Guests online
2
Total visitors
2
Ads by Eonads
Top