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
b2c8ec4b
Commit
b2c8ec4b
authored
May 22, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set sys.executable to full path of python (from argv[0]).
parent
97266904
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Python/sysmodule.c
Python/sysmodule.c
+4
-0
No files found.
Python/sysmodule.c
View file @
b2c8ec4b
...
...
@@ -278,6 +278,7 @@ PySys_Init()
extern
char
*
Py_GetVersion
Py_PROTO
((
void
));
extern
char
*
Py_GetCopyright
Py_PROTO
((
void
));
extern
char
*
Py_GetPlatform
Py_PROTO
((
void
));
extern
char
*
Py_GetProgramFullPath
Py_PROTO
((
void
));
extern
char
*
Py_GetPrefix
Py_PROTO
((
void
));
extern
char
*
Py_GetExecPrefix
Py_PROTO
((
void
));
extern
int
fclose
Py_PROTO
((
FILE
*
));
...
...
@@ -304,6 +305,9 @@ PySys_Init()
PyDict_SetItemString
(
sysdict
,
"platform"
,
v
=
PyString_FromString
(
Py_GetPlatform
()));
Py_XDECREF
(
v
);
PyDict_SetItemString
(
sysdict
,
"executable"
,
v
=
PyString_FromString
(
Py_GetProgramFullPath
()));
Py_XDECREF
(
v
);
PyDict_SetItemString
(
sysdict
,
"prefix"
,
v
=
PyString_FromString
(
Py_GetPrefix
()));
Py_XDECREF
(
v
);
...
...
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