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
d390325b
Kaydet (Commit)
d390325b
authored
Ock 29, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Modules implementing WWW and URL suite, and a module to control netscape.
üst
7e156a70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
0 deletions
+128
-0
Standard_URL_suite.py
Mac/Lib/toolbox/Standard_URL_suite.py
+52
-0
WWW_Suite.py
Mac/Lib/toolbox/WWW_Suite.py
+0
-0
nsremote.py
Mac/Modules/ae/nsremote.py
+76
-0
No files found.
Mac/Lib/toolbox/Standard_URL_suite.py
0 → 100644
Dosyayı görüntüle @
d390325b
"""Suite Standard URL suite: Mac URL standard, supported by many apps
Level 1, version 1
Generated from flap:Programma's:Netscape 2.0b5 Folder:Netscape 2.0b5
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
=
'GURL'
class
Standard_URL_suite
:
_argmap_GetURL
=
{
'to'
:
'dest'
,
'inside'
:
'HWIN'
,
'_from'
:
'refe'
,
}
def
GetURL
(
self
,
_object
,
_attributes
=
{},
**
_arguments
):
"""GetURL: Loads the URL (optionaly to disk)
Required argument: The url
Keyword argument to: file the URL should be loaded into
Keyword argument inside: Window the URL should be loaded to
Keyword argument _from: Refererer, to be sent with the HTTP request
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code
=
'GURL'
_subcode
=
'GURL'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_GetURL
)
_arguments
[
'----'
]
=
_object
_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/WWW_Suite.py
0 → 100644
Dosyayı görüntüle @
d390325b
This diff is collapsed.
Click to expand it.
Mac/Modules/ae/nsremote.py
0 → 100644
Dosyayı görüntüle @
d390325b
"""nsremote - Control Netscape from python.
Interface modelled after unix-interface done
by hassan@cs.stanford.edu.
Jack Jansen, CWI, January 1996.
"""
#
# Note: this module currently uses the funny SpyGlass AppleEvents, since
# these seem to be the only way to get the info from Netscape. It would
# be nicer to use the more "object oriented" standard OSA stuff, when it
# is implemented in Netscape.
#
import
addpack
import
sys
addpack
.
addpack
(
'Tools'
)
addpack
.
addpack
(
'bgen'
)
addpack
.
addpack
(
'ae'
)
import
aetools
import
Standard_Suite
import
WWW_Suite
import
MacOS
class
Netscape
(
aetools
.
TalkTo
,
Standard_Suite
.
Standard_Suite
,
WWW_Suite
.
WWW_Suite
):
pass
SIGNATURE
=
'MOSS'
Error
=
'nsremote.Error'
_talker
=
None
def
_init
():
global
_talker
if
_talker
==
None
:
_talker
=
Netscape
(
SIGNATURE
)
def
list
(
dpyinfo
=
""
):
_init
()
list
=
_talker
.
list_windows
()
return
map
(
lambda
x
:
(
x
,
'version unknown'
),
list
)
def
geturl
(
windowid
=
0
,
dpyinfo
=
""
):
_init
()
if
windowid
==
0
:
ids
=
_talker
.
list_windows
()
if
not
ids
:
raise
Error
,
'No netscape windows open'
windowid
=
ids
[
0
]
info
=
_talker
.
get_window_info
(
windowid
)
return
info
def
openurl
(
url
,
windowid
=
0
,
dpyinfo
=
""
):
_init
()
if
windowid
==
0
:
_talker
.
OpenURL
(
url
)
else
:
_talker
.
OpenURL
(
url
,
toWindow
=
windowid
)
def
_test
():
"""Test program: Open www.python.org in all windows, then revert"""
import
sys
windows_and_versions
=
list
()
windows_and_urls
=
map
(
lambda
x
:
(
x
[
0
],
geturl
(
x
[
0
])[
0
]),
windows_and_versions
)
for
id
,
version
in
windows_and_versions
:
openurl
(
'http://www.python.org/'
,
windowid
=
id
)
print
'Type return to revert to old contents-'
sys
.
stdin
.
readline
()
for
id
,
url
in
windows_and_urls
:
openurl
(
url
,
id
)
if
__name__
==
'__main__'
:
_test
()
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