Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48525

Re: Using Python to automatically boot my computer at a specific time and play a podcast

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <matthew.lefavor@nasa.gov>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'subject:Python': 0.06; 'received:198': 0.07; '"><span': 0.09; 'subject:skip:a 10': 0.09; 'cc:addr:python-list': 0.11; 'wrote': 0.14; 'mostly': 0.14; '-&gt;': 0.16; 'adapter': 0.16; 'itunes,': 0.16; 'podcast,': 0.16; 'preferences,': 0.16; 'saver': 0.16; 'subject: \n ': 0.16; 'sure.': 0.16; 'sync': 0.16; 'helvetica;': 0.16; 'wrote:': 0.18; 'pfxlen:0': 0.19; 'starts': 0.20; '8bit%:5': 0.22; 'command': 0.22; 'email addr:gmail.com&gt;': 0.22; 'python?': 0.22; 'cc:addr:python.org': 0.22; 'controlling': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'script': 0.25; 'header:In-Reply- To:1': 0.27; 'specifically': 0.29; '0);': 0.29; "doesn't": 0.30; 'medium;': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'included': 0.31; 'loads': 0.31; 'allows': 0.31; 'skip:- 30': 0.32; 'quite': 0.32; 'url:python': 0.33; 'running': 0.33; 'guess': 0.33; 'mac': 0.33; 'rgb(0,': 0.33; 'subject:time': 0.33; "i'd": 0.34; 'but': 0.35; 'much.': 0.36; 'received:gov': 0.36; 'url:listinfo': 0.36; 'possible': 0.36; 'url:org': 0.36; 'should': 0.36; 'skip:- 20': 0.37; 'auto;': 0.38; 'skip:- 10': 0.38; 'planning': 0.38; 'pm,': 0.38; 'does': 0.39; 'url:mail': 0.40; 'most': 0.60; 'to:addr:gmail.com': 0.65; 'charset:windows-1252': 0.65; 'air': 0.66; 'power': 0.76; 'counts': 0.83; 'boots': 0.84; 'macbook': 0.84; 'subject:Using': 0.84; '2013,': 0.91; 'graphical': 0.91; 'subject:\t': 0.91
From "Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]" <matthew.lefavor@nasa.gov>
To Petite Abeille <petite.abeille@gmail.com>
Date Mon, 17 Jun 2013 10:02:49 -0500
Subject Re: Using Python to automatically boot my computer at a specific time and play a podcast
Thread-Topic Using Python to automatically boot my computer at a specific time and play a podcast
Thread-Index Ac5ra7itIShZ5mOOTaCBhXED847Szg==
References <6f5ad203-f692-414f-a895-2c474082e9bb@googlegroups.com> <E0C757ED-4F75-478E-97AC-34EECDBF26C5@gmail.com>
In-Reply-To <E0C757ED-4F75-478E-97AC-34EECDBF26C5@gmail.com>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
acceptlanguage en-US
Content-Type multipart/alternative; boundary="_000_D36345A85A6F48D18EE34B8005AA1135nasagov_"
MIME-Version 1.0
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.431, 0.0.0000 definitions=2013-06-17_03:2013-06-17, 2013-06-17, 1970-01-01 signatures=0
X-Mailman-Approved-At Mon, 17 Jun 2013 17:20:50 +0200
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3485.1371482451.3114.python-list@python.org> (permalink)
Lines 90
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371482451 news.xs4all.nl 15867 [2001:888:2000:d::a6]:36185
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48525

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

And as for launching iTunes and playing a Podcast, you should take a look at AppleScript. AppleScript is designed specifically for running and controlling Mac OS X applications—iTunes among them. (I once wrote a script to sync my iTunes play counts from last.fm, for example.)

You might also look at the Automator program (I guess it's still included on most Macs). It does mostly the same thing as Applescript (automate Mac processes) but it's graphical and doesn't do quite as much.

-MCL

On Jun 16, 2013, at 3:44 PM, Petite Abeille wrote:


On Jun 16, 2013, at 9:06 PM, C. N. Desrosiers <cndesrosiers@gmail.com<mailto:cndesrosiers@gmail.com>> wrote:

I'm planning to buy a Macbook Air and I want to use it as a sort of alarm.  I'd like to write a program that boots my computer at a specific time, loads iTunes, and starts playing a podcast.

Under preferences, take a look at Energy Saver -> Power Adapter -> Schedule -> Start up or wake.

Alternatively, the command line utility pmset allows one to access the same functionalities.

Is this sort of thing possible in Python?

Sure. But why bother? All at one's finger tip already...



--
http://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Using Python to automatically boot my computer at a specific time and play a podcast "C. N. Desrosiers" <cndesrosiers@gmail.com> - 2013-06-16 12:06 -0700
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-16 19:22 +0000
    Re: Using Python to automatically boot my computer at a specific time and play a podcast Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-16 15:34 -0400
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-16 15:25 -0400
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Petite Abeille <petite.abeille@gmail.com> - 2013-06-16 21:44 +0200
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Jason Swails <jason.swails@gmail.com> - 2013-06-16 15:49 -0400
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-16 16:18 -0400
  Re: Using Python to automatically boot my computer at a specific time and play a podcast "C. N. Desrosiers" <cndesrosiers@gmail.com> - 2013-06-16 16:56 -0400
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Chris Angelico <rosuav@gmail.com> - 2013-06-17 07:55 +1000
  Re: Using Python to automatically boot my computer at a specific time and play a podcast inq1ltd <inq1ltd@inqvista.com> - 2013-06-17 09:24 -0400
    Re: Using Python to automatically boot my computer at a specific time and play a podcast Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2013-06-17 19:03 +0200
  Re: Using Python to automatically boot my computer at a specific time and play a podcast "Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]" <matthew.lefavor@nasa.gov> - 2013-06-17 10:02 -0500
  Re: Using Python to automatically boot my computer at a specific time and play a podcast Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-17 17:52 +0000

csiph-web