Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
42729b00
Commit
42729b00
authored
Jul 17, 1995
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The three most important suites, generated by gensuitemodule
parent
5dbb30ce
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2312 additions
and
0 deletions
+2312
-0
Mac/Lib/toolbox/AppleScript_Suite.py
Mac/Lib/toolbox/AppleScript_Suite.py
+1502
-0
Mac/Lib/toolbox/Required_Suite.py
Mac/Lib/toolbox/Required_Suite.py
+147
-0
Mac/Lib/toolbox/Standard_Suite.py
Mac/Lib/toolbox/Standard_Suite.py
+663
-0
No files found.
Mac/Lib/toolbox/AppleScript_Suite.py
0 → 100644
View file @
42729b00
This diff is collapsed.
Click to expand it.
Mac/Lib/toolbox/Required_Suite.py
0 → 100644
View file @
42729b00
"""Suite Required Suite: Terms that every application should support
Level 1, version 1
Generated from Moes:System folder:Extensions:Scripting Additions:Dialects:English Dialect
AETE/AEUT resource version 1/0, language 0, script 0
"""
import
addpack
addpack
.
addpack
(
'Tools'
)
addpack
.
addpack
(
'bgen'
)
addpack
.
addpack
(
'ae'
)
import
aetools
import
MacOS
_code
=
'reqd'
class
Required_Suite
:
def
open
(
self
,
object
,
*
arguments
):
"""open: Open the specified object(s)
Required argument: list of objects to open
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code
=
'aevt'
_subcode
=
'odoc'
if
len
(
arguments
)
>
1
:
raise
TypeError
,
'Too many arguments'
if
arguments
:
arguments
=
arguments
[
0
]
if
type
(
arguments
)
<>
type
({}):
raise
TypeError
,
'Must be a mapping'
else
:
arguments
=
{}
arguments
[
'----'
]
=
object
if
arguments
.
has_key
(
'_attributes'
):
attributes
=
arguments
[
'_attributes'
]
del
arguments
[
'_attributes'
]
else
:
attributes
=
{}
reply
,
arguments
,
attributes
=
self
.
send
(
_code
,
_subcode
,
arguments
,
attributes
)
if
arguments
.
has_key
(
'errn'
):
raise
MacOS
.
Error
,
aetools
.
decodeerror
(
arguments
)
# XXXX Optionally decode result
if
arguments
.
has_key
(
'----'
):
return
arguments
[
'----'
]
def
_print
(
self
,
object
,
*
arguments
):
"""print: Print the specified object(s)
Required argument: list of objects to print
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code
=
'aevt'
_subcode
=
'pdoc'
if
len
(
arguments
)
>
1
:
raise
TypeError
,
'Too many arguments'
if
arguments
:
arguments
=
arguments
[
0
]
if
type
(
arguments
)
<>
type
({}):
raise
TypeError
,
'Must be a mapping'
else
:
arguments
=
{}
arguments
[
'----'
]
=
object
if
arguments
.
has_key
(
'_attributes'
):
attributes
=
arguments
[
'_attributes'
]
del
arguments
[
'_attributes'
]
else
:
attributes
=
{}
reply
,
arguments
,
attributes
=
self
.
send
(
_code
,
_subcode
,
arguments
,
attributes
)
if
arguments
.
has_key
(
'errn'
):
raise
MacOS
.
Error
,
aetools
.
decodeerror
(
arguments
)
# XXXX Optionally decode result
if
arguments
.
has_key
(
'----'
):
return
arguments
[
'----'
]
def
quit
(
self
,
*
arguments
):
"""quit: Quit application
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code
=
'aevt'
_subcode
=
'quit'
if
len
(
arguments
)
>
1
:
raise
TypeError
,
'Too many arguments'
if
arguments
:
arguments
=
arguments
[
0
]
if
type
(
arguments
)
<>
type
({}):
raise
TypeError
,
'Must be a mapping'
else
:
arguments
=
{}
if
arguments
.
has_key
(
'_attributes'
):
attributes
=
arguments
[
'_attributes'
]
del
arguments
[
'_attributes'
]
else
:
attributes
=
{}
reply
,
arguments
,
attributes
=
self
.
send
(
_code
,
_subcode
,
arguments
,
attributes
)
if
arguments
.
has_key
(
'errn'
):
raise
MacOS
.
Error
,
aetools
.
decodeerror
(
arguments
)
# XXXX Optionally decode result
if
arguments
.
has_key
(
'----'
):
return
arguments
[
'----'
]
def
run
(
self
,
*
arguments
):
"""run: Sent to an application when it is double-clicked
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code
=
'aevt'
_subcode
=
'oapp'
if
len
(
arguments
)
>
1
:
raise
TypeError
,
'Too many arguments'
if
arguments
:
arguments
=
arguments
[
0
]
if
type
(
arguments
)
<>
type
({}):
raise
TypeError
,
'Must be a mapping'
else
:
arguments
=
{}
if
arguments
.
has_key
(
'_attributes'
):
attributes
=
arguments
[
'_attributes'
]
del
arguments
[
'_attributes'
]
else
:
attributes
=
{}
reply
,
arguments
,
attributes
=
self
.
send
(
_code
,
_subcode
,
arguments
,
attributes
)
if
arguments
.
has_key
(
'errn'
):
raise
MacOS
.
Error
,
aetools
.
decodeerror
(
arguments
)
# XXXX Optionally decode result
if
arguments
.
has_key
(
'----'
):
return
arguments
[
'----'
]
Mac/Lib/toolbox/Standard_Suite.py
0 → 100644
View file @
42729b00
This diff is collapsed.
Click to expand it.
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