CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 17 Jul 2025 19:48:48 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20071208112242
location: https://web.archive.org/web/20071208112242/https://wiki.python.org/moin/MacPython/Audio_Hijack_Pro
server-timing: captures_list;dur=0.950580, exclusion.robots;dur=0.041671, exclusion.robots.policy;dur=0.025200, esindex;dur=0.014909, cdx.remote;dur=134.523707, LoadShardBlock;dur=540.829422, PetaboxLoader3.datanode;dur=192.034604, PetaboxLoader3.resolve;dur=339.011561
x-app-server: wwwb-app28
x-ts: 302
x-tr: 711
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app28; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 17 Jul 2025 19:48:50 GMT
content-type: text/html;charset=utf-8
x-archive-orig-date: Sat, 08 Dec 2007 11:22:41 GMT
x-archive-orig-server: Apache/2.0.54 (Debian GNU/Linux) mod_fastcgi/2.4.2
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 08 Dec 2007 11:22:42 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 08 Dec 2007 11:22:42 GMT", ; rel="memento"; datetime="Sat, 08 Dec 2007 11:22:42 GMT", ; rel="last memento"; datetime="Sat, 08 Dec 2007 11:22:42 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_1_20071208104348_crawl102-c/52_1_20071208112235_crawl107.arc.gz
server-timing: captures_list;dur=0.890829, exclusion.robots;dur=0.041032, exclusion.robots.policy;dur=0.025570, esindex;dur=0.015432, cdx.remote;dur=40.672526, LoadShardBlock;dur=105.195347, PetaboxLoader3.datanode;dur=749.717662, load_resource;dur=832.026368, PetaboxLoader3.resolve;dur=159.331914
x-app-server: wwwb-app28
x-ts: 200
x-tr: 1084
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
MacPython/Audio Hijack Pro - PythonInfo Wiki
MacPython/Audio Hijack Pro
Print a formatted, plain text list of all scheduled timers with the dates and times for which they are scheduled. A description can be found here
1 #!/usr/bin/env python
2
3 from appscript import *
4 import datetime
5
6 # Get a list of all the sessions.
7 allsessions = app('Audio Hijack Pro').sessions.get()
8
9 # Make a list with the sessions that have scheduled timers.
10 timersessions = []
11 for s in allsessions:
12 for t in s.timers.get():
13 if t.scheduled():
14 timersessions.append(s)
15 break # go to next session after finding a scheduled timer
16
17 # Get the length of the longest name of a timersession.
18 longest = max(len(s.name()) for s in timersessions)
19
20 # Make a 7-character string with the days that the timer runs.
21 def timerdays(t):
22 daylist = ['-'] * 7
23 if t.runs_Sunday():
24 daylist[0] = 'S'
25 if t.runs_Monday():
26 daylist[1] = 'M'
27 if t.runs_Tuesday():
28 daylist[2] = 'T'
29 if t.runs_Wednesday():
30 daylist[3] = 'W'
31 if t.runs_Thursday():
32 daylist[4] = 'T'
33 if t.runs_Friday():
34 daylist[5] = 'F'
35 if t.runs_Saturday():
36 daylist[6] = 'S'
37 return ''.join(daylist)
38
39 # Print the info for all the sessions with enabled timers.
40 for s in timersessions:
41 for t in s.timers.get():
42 if t.scheduled():
43 dur = t.duration()
44 durstr = '(%d min)' % (dur/60)
45 st = t.start_time()
46 et = st + datetime.timedelta(seconds = dur)
47 dow = timerdays(t)
48 ststr = st.strftime("%l:%M %p")
49 etstr = et.strftime("%l:%M %p")
50 fmtstr = "%" + str(longest) + "s: %s from %s to %s %s"
51 print fmtstr % (s.name(), dow, ststr, etstr, durstr.rjust(9))
EditText (last edited 2007-07-30 16:15:47 by adsl-76-234-208-118)
DeleteCache (cached 2007-11-21 18:31:07)- Login
- Navigation
- Actions
- Your recent pages