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
08801db1
Kaydet (Commit)
08801db1
authored
Mar 16, 2003
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The MacPython introductory help is now called MacPython Help, and the
optional full documentation Python Documentation.
üst
f3ef0388
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
25 deletions
+41
-25
setup.py
Mac/OSX/Doc/setup.py
+16
-8
Info.plist
Mac/OSXResources/app/Info.plist
+2
-1
index.html
...rces/app/Resources/English.lproj/Documentation/index.html
+1
-1
PythonIDEMain.py
Mac/Tools/IDE/PythonIDEMain.py
+22
-15
No files found.
Mac/OSX/Doc/setup.py
Dosyayı görüntüle @
08801db1
...
@@ -32,7 +32,7 @@ class DocBuild(build):
...
@@ -32,7 +32,7 @@ class DocBuild(build):
self
.
build_html
=
None
self
.
build_html
=
None
self
.
build_dest
=
None
self
.
build_dest
=
None
self
.
download
=
1
self
.
download
=
1
self
.
doc_version
=
'2.2.
1
'
self
.
doc_version
=
'2.2.
2
'
def
finalize_options
(
self
):
def
finalize_options
(
self
):
build
.
finalize_options
(
self
)
build
.
finalize_options
(
self
)
...
@@ -46,13 +46,20 @@ class DocBuild(build):
...
@@ -46,13 +46,20 @@ class DocBuild(build):
def
downloadDocs
(
self
):
def
downloadDocs
(
self
):
workdir
=
os
.
getcwd
()
workdir
=
os
.
getcwd
()
self
.
mkpath
(
self
.
build_html
)
url
=
'http://www.python.org/ftp/python/doc/
%
s/html-
%
s.tgz'
%
\
(
self
.
doc_version
,
self
.
doc_version
)
os
.
chdir
(
self
.
build_base
)
os
.
chdir
(
self
.
build_base
)
self
.
spawn
(
'curl'
,
'-O'
,
'http://www.python.org/ftp/python/doc/
%
s/html-
%
s.tgz'
%
(
self
.
doc_version
,
self
.
doc_version
))
self
.
spawn
(
'curl'
,
'-O'
,
url
)
os
.
chdir
(
workdir
)
os
.
chdir
(
self
.
build_html
)
self
.
spawn
(
'tar'
,
'-xzf'
,
'../html-
%
s.tgz'
%
self
.
doc_version
)
os
.
chdir
(
workdir
)
os
.
chdir
(
workdir
)
tarfile
=
'html-
%
s.tgz'
%
self
.
doc_version
## This no longer works due to name changes
## self.mkpath(self.build_html)
## os.chdir(self.build_html)
## self.spawn('tar', '-xzf', '../' + tarfile)
## os.chdir(workdir)
print
"** Please unpack
%
s"
%
os
.
path
.
join
(
self
.
build_base
,
tarfile
)
print
"** Unpack the files into
%
s"
%
self
.
build_html
raise
RuntimeError
,
"You need to unpack the docs manually"
def
buildDocsFromSource
(
self
):
def
buildDocsFromSource
(
self
):
srcdir
=
'../../..'
srcdir
=
'../../..'
...
@@ -75,7 +82,7 @@ class DocBuild(build):
...
@@ -75,7 +82,7 @@ class DocBuild(build):
hackedIndex
=
file
(
os
.
path
.
join
(
self
.
build_dest
,
ind_html
),
'w'
)
hackedIndex
=
file
(
os
.
path
.
join
(
self
.
build_dest
,
ind_html
),
'w'
)
origIndex
=
file
(
os
.
path
.
join
(
self
.
build_html
,
ind_html
))
origIndex
=
file
(
os
.
path
.
join
(
self
.
build_html
,
ind_html
))
r
=
re
.
compile
(
'<style type="text/css">.*</style>'
,
re
.
DOTALL
)
r
=
re
.
compile
(
'<style type="text/css">.*</style>'
,
re
.
DOTALL
)
hackedIndex
.
write
(
r
.
sub
(
'<META NAME="AppleTitle" CONTENT="Python
Help
">'
,
origIndex
.
read
()))
hackedIndex
.
write
(
r
.
sub
(
'<META NAME="AppleTitle" CONTENT="Python
Documentation
">'
,
origIndex
.
read
()))
def
hackFile
(
self
,
d
,
f
):
def
hackFile
(
self
,
d
,
f
):
origPath
=
os
.
path
.
join
(
d
,
f
)
origPath
=
os
.
path
.
join
(
d
,
f
)
...
@@ -107,6 +114,7 @@ class DocBuild(build):
...
@@ -107,6 +114,7 @@ class DocBuild(build):
def
run
(
self
):
def
run
(
self
):
self
.
ensure_finalized
()
self
.
ensure_finalized
()
self
.
mkpath
(
self
.
build_base
)
self
.
ensureHtml
()
self
.
ensureHtml
()
if
not
os
.
path
.
isdir
(
self
.
build_html
):
if
not
os
.
path
.
isdir
(
self
.
build_html
):
raise
RuntimeError
,
\
raise
RuntimeError
,
\
...
@@ -142,7 +150,7 @@ class AHVDocInstall(Command):
...
@@ -142,7 +150,7 @@ class AHVDocInstall(Command):
build_cmd
=
self
.
get_finalized_command
(
'build'
)
build_cmd
=
self
.
get_finalized_command
(
'build'
)
self
.
build_dest
=
build_cmd
.
build_dest
self
.
build_dest
=
build_cmd
.
build_dest
if
self
.
install_doc
==
None
:
if
self
.
install_doc
==
None
:
self
.
install_doc
=
os
.
path
.
join
(
self
.
prefix
,
'Resources/
English.lproj/
Documentation'
)
self
.
install_doc
=
os
.
path
.
join
(
self
.
prefix
,
'Resources/
Python.app/Contents/Resources/English.lproj/Python
Documentation'
)
print
'INSTALL'
,
self
.
build_dest
,
'->'
,
self
.
install_doc
print
'INSTALL'
,
self
.
build_dest
,
'->'
,
self
.
install_doc
def
run
(
self
):
def
run
(
self
):
...
...
Mac/OSXResources/app/Info.plist
Dosyayı görüntüle @
08801db1
...
@@ -32,9 +32,10 @@
...
@@ -32,9 +32,10 @@
<
k
e
y
>
CFBundleHelpBookFolder
<
/k
e
y
>
<
k
e
y
>
CFBundleHelpBookFolder
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
Documentation
<
/string
>
<
string
>
Documentation
<
/string
>
<
string
>
PythonDocumentation
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleHelpBookName
<
/k
e
y
>
<
k
e
y
>
CFBundleHelpBookName
<
/k
e
y
>
<
string
>
Python
Help
<
/string
>
<
string
>
Mac
Python
Help
<
/string
>
<
k
e
y
>
CFBundleHelpTOCFile
<
/k
e
y
>
<
k
e
y
>
CFBundleHelpTOCFile
<
/k
e
y
>
<
string
>
index.html
<
/string
>
<
string
>
index.html
<
/string
>
...
...
Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html
Dosyayı görüntüle @
08801db1
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<meta
name=
"generator"
content=
"BBEdit 6.5.3"
>
<meta
name=
"generator"
content=
"BBEdit 6.5.3"
>
<link
rel=
"SHORTCUT ICON"
href=
"pythonsmall.gif"
>
<link
rel=
"SHORTCUT ICON"
href=
"pythonsmall.gif"
>
<META
NAME=
"AppleIcon"
CONTENT=
"pythonsmall.gif"
>
<META
NAME=
"AppleIcon"
CONTENT=
"pythonsmall.gif"
>
<META
NAME=
"AppleTitle"
CONTENT=
"Python Help"
>
<META
NAME=
"AppleTitle"
CONTENT=
"
Mac
Python Help"
>
</head>
</head>
<body>
<body>
...
...
Mac/Tools/IDE/PythonIDEMain.py
Dosyayı görüntüle @
08801db1
...
@@ -353,12 +353,14 @@ class PythonIDE(Wapplication.Application):
...
@@ -353,12 +353,14 @@ class PythonIDE(Wapplication.Application):
PackageManager
.
PackageBrowser
()
PackageManager
.
PackageBrowser
()
def
makehelpmenu
(
self
):
def
makehelpmenu
(
self
):
docs
=
self
.
installdocumentation
()
hashelp
,
has
docs
=
self
.
installdocumentation
()
self
.
helpmenu
=
m
=
self
.
gethelpmenu
()
self
.
helpmenu
=
m
=
self
.
gethelpmenu
()
helpitem
=
FrameWork
.
MenuItem
(
m
,
"MacPython Help"
,
None
,
self
.
domenu_localhelp
)
helpitem
.
enable
(
hashelp
)
docitem
=
FrameWork
.
MenuItem
(
m
,
"Python Documentation"
,
None
,
self
.
domenu_localdocs
)
docitem
=
FrameWork
.
MenuItem
(
m
,
"Python Documentation"
,
None
,
self
.
domenu_localdocs
)
docitem
.
enable
(
docs
)
docitem
.
enable
(
has
docs
)
finditem
=
FrameWork
.
MenuItem
(
m
,
"Lookup in Python Documentation"
,
None
,
'lookuppython'
)
finditem
=
FrameWork
.
MenuItem
(
m
,
"Lookup in Python Documentation"
,
None
,
'lookuppython'
)
finditem
.
enable
(
docs
)
finditem
.
enable
(
has
docs
)
if
runningOnOSX
():
if
runningOnOSX
():
FrameWork
.
Separator
(
m
)
FrameWork
.
Separator
(
m
)
doc2item
=
FrameWork
.
MenuItem
(
m
,
"Apple Developer Documentation"
,
None
,
self
.
domenu_appledocs
)
doc2item
=
FrameWork
.
MenuItem
(
m
,
"Apple Developer Documentation"
,
None
,
self
.
domenu_appledocs
)
...
@@ -370,7 +372,11 @@ class PythonIDE(Wapplication.Application):
...
@@ -370,7 +372,11 @@ class PythonIDE(Wapplication.Application):
def
domenu_localdocs
(
self
,
*
args
):
def
domenu_localdocs
(
self
,
*
args
):
from
Carbon
import
AH
from
Carbon
import
AH
AH
.
AHGotoPage
(
"Python Help"
,
None
,
None
)
AH
.
AHGotoPage
(
"Python Documentation"
,
None
,
None
)
def
domenu_localhelp
(
self
,
*
args
):
from
Carbon
import
AH
AH
.
AHGotoPage
(
"MacPython Help"
,
None
,
None
)
def
domenu_appledocs
(
self
,
*
args
):
def
domenu_appledocs
(
self
,
*
args
):
from
Carbon
import
AH
,
AppleHelp
from
Carbon
import
AH
,
AppleHelp
...
@@ -388,7 +394,7 @@ class PythonIDE(Wapplication.Application):
...
@@ -388,7 +394,7 @@ class PythonIDE(Wapplication.Application):
if
not
searchstring
:
if
not
searchstring
:
return
return
try
:
try
:
AH
.
AHSearch
(
"Python
Help
"
,
searchstring
)
AH
.
AHSearch
(
"Python
Documentation
"
,
searchstring
)
except
AH
.
Error
,
arg
:
except
AH
.
Error
,
arg
:
W
.
Message
(
"AppleHelp Error:
%
s"
%
`arg`
)
W
.
Message
(
"AppleHelp Error:
%
s"
%
`arg`
)
...
@@ -441,16 +447,17 @@ class PythonIDE(Wapplication.Application):
...
@@ -441,16 +447,17 @@ class PythonIDE(Wapplication.Application):
# And as AHRegisterHelpBook wants a bundle (with the right bits in
# And as AHRegisterHelpBook wants a bundle (with the right bits in
# the plist file) we refer it to Python.app
# the plist file) we refer it to Python.app
python_app
=
os
.
path
.
join
(
sys
.
prefix
,
'Resources/Python.app'
)
python_app
=
os
.
path
.
join
(
sys
.
prefix
,
'Resources/Python.app'
)
doc_source
=
os
.
path
.
join
(
python_app
,
'Contents/Resources/English.lproj/Documentation'
)
help_source
=
os
.
path
.
join
(
python_app
,
'Contents/Resources/English.lproj/Documentation'
)
if
not
os
.
path
.
isdir
(
doc_source
):
doc_source
=
os
.
path
.
join
(
python_app
,
'Contents/Resources/English.lproj/PythonDocumentation'
)
return
0
has_help
=
os
.
path
.
isdir
(
help_source
)
try
:
has_doc
=
os
.
path
.
isdir
(
doc_source
)
from
Carbon
import
AH
if
has_help
or
has_doc
:
AH
.
AHRegisterHelpBook
(
python_app
)
try
:
except
(
ImportError
,
MacOS
.
Error
),
arg
:
from
Carbon
import
AH
W
.
Message
(
"Cannot register Python documentation:
%
s"
%
`arg`
)
AH
.
AHRegisterHelpBook
(
python_app
)
return
0
except
(
ImportError
,
MacOS
.
Error
),
arg
:
return
1
pass
# W.Message("Cannot register Python Documentation: %s" % str(arg))
return
has_help
,
has_doc
PythonIDE
()
PythonIDE
()
...
...
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