Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
14c0a058
Commit
14c0a058
authored
Aug 25, 2003
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect a Windows installation and make a distinction between pythonw.exe and python.exe.
parent
88ae2635
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
utilities/mkzopeinstance.py
utilities/mkzopeinstance.py
+22
-1
No files found.
utilities/mkzopeinstance.py
View file @
14c0a058
...
...
@@ -91,12 +91,33 @@ def main():
if
not
(
user
or
os
.
path
.
exists
(
inituser
)):
user
,
password
=
get_inituser
()
# we need to distinguish between python.exe and pythonw.exe under
# Windows in order to make Zope run using python.exe when run in a
# console window and pythonw.exe when run as a service, so we do a bit
# of sniffing here.
psplit
=
os
.
path
.
split
(
sys
.
executable
)
exedir
=
os
.
path
.
join
(
*
psplit
[:
-
1
])
pythonexe
=
os
.
path
.
join
(
exedir
,
'python.exe'
)
pythonwexe
=
os
.
path
.
join
(
exedir
,
'pythonw.exe'
)
if
(
os
.
path
.
isfile
(
pythonwexe
)
and
os
.
path
.
isfile
(
pythonexe
)
and
(
sys
.
executable
in
[
pythonwexe
,
pythonexe
])
):
# we're using a Windows build with both python.exe and pythonw.exe
# in the same directory
PYTHON
=
pythonexe
PYTHONW
=
pythonwexe
else
:
# we're on UNIX or we have a nonstandard Windows setup
PYTHON
=
PYTHONW
=
sys
.
executable
kw
=
{
"PYTHON"
:
sys
.
executable
,
"PYTHON"
:
PYTHON
,
"PYTHONW"
:
PYTHONW
,
"INSTANCE_HOME"
:
instancehome
,
"SOFTWARE_HOME"
:
softwarehome
,
"ZOPE_HOME"
:
zopehome
,
}
copyzopeskel
.
copyskel
(
skelsrc
,
skeltarget
,
None
,
None
,
**
kw
)
write_inituser
(
inituser
,
user
,
password
)
...
...
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