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
4092606d
Kaydet (Commit)
4092606d
authored
Mar 30, 2002
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Modified to allow it to run in MachoPython in a reasonable way. It still
needs a decent commandline interface, though.
üst
c2ce91af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
gensuitemodule.py
Mac/scripts/gensuitemodule.py
+17
-10
No files found.
Mac/scripts/gensuitemodule.py
Dosyayı görüntüle @
4092606d
...
@@ -14,20 +14,27 @@ import types
...
@@ -14,20 +14,27 @@ import types
import
StringIO
import
StringIO
import
macfs
import
macfs
import
keyword
import
keyword
import
macresource
from
Carbon.Res
import
*
from
Carbon.Res
import
*
DEFAULT_PACKAGEFOLDER
=
os
.
path
.
join
(
sys
.
prefix
,
'Mac'
,
'Lib'
,
'lib-scriptpackages'
)
def
main
():
def
main
():
fss
,
ok
=
macfs
.
PromptGetFile
(
'Select file with aeut/aete resource:'
)
if
len
(
sys
.
argv
)
>
1
:
if
not
ok
:
for
filename
in
sys
.
argv
[
1
:]:
sys
.
exit
(
0
)
processfile
(
filename
)
processfile
(
fss
.
as_pathname
())
else
:
fss
,
ok
=
macfs
.
PromptGetFile
(
'Select file with aeut/aete resource:'
)
if
not
ok
:
sys
.
exit
(
0
)
processfile
(
fss
.
as_pathname
())
def
processfile
(
fullname
):
def
processfile
(
fullname
):
"""Process all resources in a single file"""
"""Process all resources in a single file"""
cur
=
CurResFile
()
cur
=
CurResFile
()
print
fullname
print
"Processing"
,
fullname
rf
=
OpenRFPerm
(
fullname
,
0
,
1
)
rf
=
macresource
.
open_pathname
(
fullname
)
try
:
try
:
UseResFile
(
rf
)
UseResFile
(
rf
)
resources
=
[]
resources
=
[]
...
@@ -225,15 +232,15 @@ def compileaete(aete, resinfo, fname):
...
@@ -225,15 +232,15 @@ def compileaete(aete, resinfo, fname):
major
,
minor
=
divmod
(
version
,
256
)
major
,
minor
=
divmod
(
version
,
256
)
fss
=
macfs
.
FSSpec
(
fname
)
fss
=
macfs
.
FSSpec
(
fname
)
creatorsignature
,
dummy
=
fss
.
GetCreatorType
()
creatorsignature
,
dummy
=
fss
.
GetCreatorType
()
packagename
=
identify
(
os
.
path
.
basename
(
fname
)
)
packagename
=
identify
(
os
.
path
.
splitext
(
os
.
path
.
basename
(
fname
))[
0
]
)
if
language
:
if
language
:
packagename
=
packagename
+
'_lang
%
d'
%
language
packagename
=
packagename
+
'_lang
%
d'
%
language
if
script
:
if
script
:
packagename
=
packagename
+
'_script
%
d'
%
script
packagename
=
packagename
+
'_script
%
d'
%
script
if
len
(
packagename
)
>
27
:
if
len
(
packagename
)
>
27
:
packagename
=
packagename
[:
27
]
packagename
=
packagename
[:
27
]
macfs
.
SetFolder
(
os
.
path
.
join
(
sys
.
prefix
,
':Mac:Lib:lib-scriptpackages'
)
)
macfs
.
SetFolder
(
DEFAULT_PACKAGEFOLDER
)
fss
,
ok
=
macfs
.
GetDirectory
(
'
P
ackage folder for
%
s'
%
packagename
)
fss
,
ok
=
macfs
.
GetDirectory
(
'
Create and select p
ackage folder for
%
s'
%
packagename
)
if
not
ok
:
if
not
ok
:
return
return
pathname
=
fss
.
as_pathname
()
pathname
=
fss
.
as_pathname
()
...
@@ -288,7 +295,7 @@ def compileaete(aete, resinfo, fname):
...
@@ -288,7 +295,7 @@ def compileaete(aete, resinfo, fname):
for
code
,
modname
in
suitelist
[
1
:]:
for
code
,
modname
in
suitelist
[
1
:]:
fp
.
write
(
",
\n\t\t
%
s_Events"
%
modname
)
fp
.
write
(
",
\n\t\t
%
s_Events"
%
modname
)
fp
.
write
(
",
\n\t\t
aetools.TalkTo):
\n
"
)
fp
.
write
(
",
\n\t\t
aetools.TalkTo):
\n
"
)
fp
.
write
(
"
\t
_signature =
'
%
s'
\n\n
"
%
creatorsignature
)
fp
.
write
(
"
\t
_signature =
%
s
\n\n
"
%
`creatorsignature`
)
fp
.
close
()
fp
.
close
()
def
precompilesuite
(
suite
,
basepackage
=
None
):
def
precompilesuite
(
suite
,
basepackage
=
None
):
...
...
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