Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
7e156a70
Kaydet (Commit)
7e156a70
authored
Ock 29, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added missing get() method
üst
bdd07471
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
aetools.py
Mac/Lib/toolbox/aetools.py
+24
-0
No files found.
Mac/Lib/toolbox/aetools.py
Dosyayı görüntüle @
7e156a70
...
...
@@ -154,9 +154,33 @@ class TalkTo:
"""Send an appleevent given code/subcode/pars/attrs and unpack the reply"""
return
self
.
sendevent
(
self
.
newevent
(
code
,
subcode
,
parameters
,
attributes
))
#
# The following events are somehow "standard" and don't seem to appear in any
# suite...
#
def
activate
(
self
):
"""Send 'activate' command"""
self
.
send
(
'misc'
,
'actv'
)
def
get
(
self
,
_object
,
_attributes
=
{}):
"""get: get data from an object
Required argument: the object
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the data
"""
_code
=
'core'
_subcode
=
'getd'
_arguments
=
{
'----'
:
_object
}
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
if
_arguments
.
has_key
(
'errn'
):
raise
MacOS
.
Error
,
decodeerror
(
_arguments
)
if
_arguments
.
has_key
(
'----'
):
return
_arguments
[
'----'
]
# Test program
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment