473,770 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python on mac (os x): application automation

Leo
hi there

i have just started with mac development and i use applescript at the moment
for iTunes and iPhoto automation.

but i'd like to do it from python. does anybody know weather that's
possible and if there is a add on for that?

thanks, leo
Jul 18 '05 #1
1 2824
Leo wrote:
hi there

i have just started with mac development and i use applescript at the moment
for iTunes and iPhoto automation.

but i'd like to do it from python. does anybody know weather that's
possible and if there is a add on for that?

thanks, leo


Bob Ippolito has built aeve for just such purposes.
He recently announced aeve 0.0.3; you can find the announcement
here:

http://mail.python.org/pipermail/pyt...er/008692.html

Because I am lazy and do not read documentation :) I just downloaded
all of the source distributions from his website. He also provides
binary distributions, which can be installed using PackageManager.

To build aeve for Python 2.3 from source, you'll need to
download and install each of these tarballs, using the usual
'sudo python setup.py install' incantations:

http://www.cosc.canterbury.ac.nz/~gr...yrex-0.8.2.tgz
http://undefined.org/python/TECManager-0.1.tgz
http://undefined.org/python/LaunchServices-0.1.tgz
http://undefined.org/python/aeve-0.0.3.tgz

Bob's announcement includes sample code showing how to get the
name of the currently-playing iTunes track. He also provided the
following variation, which works if you happen to be playing
no tracks:

#!/usr/bin/env pythonw
import aeve
iTunes = aeve.talkto('co m.apple.iTunes' )
if iTunes.player_s tate == 'playing':
print iTunes.current_ track.name
else:
print "iTunes is not currently playing a track"

Please also note that, in order to use aeve, you will
probably need to invoke python as pythonw (or run from within
a MacPython IDE) so you can talk to the window manager.

--
Mitch

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5023
by: ulysses | last post by:
hi, I'm working in python 5 months. I think it's very cool language. I do a p2p python program GUI. First I make a software by wxpython. But I find wxpython use many many memory. Second I use PYQT. But memory use still big. But but but when I minimize the windows to taskbar, a fantasy something happened. memory use very very low when windows minimize.
26
7724
by: Wolfgang Keller | last post by:
Hello, is it that my know-how to use Google is insufficient or... ....does really noone use Python for industrial control applications? At least I didn't manage to find any publicly available modules for such things as OPC/fieldbus communication etc... TIA,
1
537
by: Martin | last post by:
Greetings, I am new to python and wish to embed python in an 3D graphics application to provide application automation. The high level goal is to be able to drive my app from a script for batch job like behavior rather than via the GUI (ie. I would like to run a script and see those changes reflected in the GUI as if the user had clicked buttons, etc.) The application is written in C++ and uses QT for the GUI. I have read the python...
18
3151
by: qwweeeit | last post by:
Hi all, when I moved from Windows to Linux I choosed Python as my language of reference and as GUI, Qt (not much investigated up to now). Till now I didn't regret but one thing: Python can't act as a macro language and so you are obliged to revert to Windows to use programs like AutoIt, Macro Express or Macro Scheduler or even the macro features of Office with VBA. Claudio Grondi expressed almost the same ideas in answering to a post:...
1
1275
by: Cameron Laird | last post by:
QOTW: "Alas, Python has extensive libraries and well documented to boot." - Edmond Dantes "Locking files is a complex business." - Sybren Stuvel File-locking *sounds* like an easy thing; it just isn't so in any operating system that often appears on desktops. Take advantage of those, like Jim Segrave, who have traveled this path before:
2
2552
by: Oeyvind Brandtsegg | last post by:
hello I'm writing a Python application for live music performance/improivsation, using csound as the synthesis engine, and Python for compositional algorithms, GUI and control. I creating several threads: one for GUI one for csound, one for a timed queue (timed automation events),
3
1364
by: millball54 | last post by:
Hey Everyone Let me tell you all a little bit about my programming background so you can get an idea of my capability, or lack of, dealing with p.l; so far i've learned some visual basic when i was doing my a-levels.... and thats about it lol. Basically i like the sound of python and its ease of use and would like to know in depth more about it and its range of useage. Please do tell me all you know, keeping in mind i am a n00b, so...
9
39441
NeoPa
by: NeoPa | last post by:
In VBA (I expect VB would be similar) controlling another Office Application (Automation) can be done using the following steps : Ensure the Reference (VBA Window / Tools / References) has been ticked for the application you want to Automate. Set up an application object variable to use (You can use With...End With if you prefer). Either : Use CreateObject(Class) to open a new object for multi-instance programs (For single Instance...
2
4859
by: vml | last post by:
I have an application that I want to automatised trough a COM layer or (DCOM)... I can access to all the method of the COM objects with python and win32com when this application is running.... If the application is not running, I can not access to all the method of the object. Usually to overcome this problem , One can use an activeX control
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.