summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove all traces of HAVE_STRERROR.Brett Cannon2008-03-181-5/+1
| | | | | The removal of strerror.c led to the function check being removed from configure.in.
* Coverity CID #168Christian Heimes2008-01-181-0/+1
| | | | leaked_storage: Returned without freeing storage "fp"
* patch #1668: clarify envvar docs; rename THREADDEBUG to PYTHONTHREADDEBUG.Georg Brandl2008-01-071-1/+1
|
* Patch #602345 by Neal Norwitz and me: add -B option and ↵Georg Brandl2008-01-071-6/+14
| | | | PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
* Backport some main.c cleanup from the py3k branchNick Coghlan2007-11-201-12/+13
|
* Patch #1739468: Directories and zipfiles containing __main__.py are now ↵Nick Coghlan2007-11-181-40/+80
| | | | executable
* Fix Coverity 168: Close the file before returning (exiting).Neal Norwitz2007-10-121-0/+1
|
* Fix bug 1764407 - the -i switch now does the right thing when using the -m ↵Nick Coghlan2007-08-251-5/+4
| | | | switch
* Add -3 option to the interpreter to warn about features that areNeal Norwitz2007-05-231-1/+6
| | | | | | | deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc.
* Variant of patch #697613: don't exit the interpreter on a SystemExitGeorg Brandl2007-03-071-11/+11
| | | | | | | exception if the -i command line option or PYTHONINSPECT environment variable is given, but break into the interactive interpreter just like on other exceptions or normal program exit. (backport)
* Silence a warning from gcc 4.0.1 by specifying a function's parameter list isBrett Cannon2007-01-051-1/+1
| | | | 'void' instead of just a set of empty parentheses.
* Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,Martin v. Löwis2007-01-041-0/+29
| | | | | to avoid relying on atexit. Will backport to 2.5.
* Rewrite help message to remove some of the parentheticals. (There were a ↵Andrew M. Kuchling2006-09-141-9/+9
| | | | lot of them.)
* Make --help mention that -v can be supplied multiple timesAndrew M. Kuchling2006-09-141-0/+1
|
* Accept long options "--help" and "--version".Georg Brandl2006-07-121-3/+4
|
* Make the -m switch conform to the documentation of sys.path by behaving like ↵Nick Coghlan2006-06-121-2/+3
| | | | the -c switch
* Patch #1492356: Port to Windows CE (patch set 1).Martin v. Löwis2006-05-221-0/+2
|
* spread the extern "C" { } magic pixie dust around. Python itself builds nowAnthony Baxter2006-04-131-0/+9
| | | | | using a C++ compiler. Still lots and lots of errors in the modules built by setup.py, and a bunch of warnings from g++ in the core.
* Some more changes to make code compile under a C++ compiler.Anthony Baxter2006-04-111-2/+2
|
* Implement PEP 338 which has been marked as accepted by GvRNick Coghlan2006-03-151-42/+37
|
* Try to be a bit more consistent on all platforms:Neal Norwitz2006-03-091-1/+2
| | | | | | | python . python < . both print a message, return non-zero and do not core dump.
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+1
| | | | Remove duplicate declarations from compile.h
* SF bug #887946, segfault if redirecting directoryNeal Norwitz2005-10-031-0/+8
| | | | | | | Also provide a warning if a directory is passed on the command line. Add minimal command line test. Will backport.
* SF patch #1035498: -m option to run a module as a scriptRaymond Hettinger2004-10-071-7/+73
| | | | (Contributed by Nick Coghlan.)
* Patch #1011822: Display errno/strerror for inaccessible files.Martin v. Löwis2004-08-191-2/+7
|
* Add pystack definition to Misc/gdbinit with some explanation of its behaviorSkip Montanaro2004-03-011-0/+3
| | | | | and add flag comments to ceval.c and main.c alerting people to the coupling between pystack and the layout of those files.
* Getting rid of support for the ancient Apple MPW compiler.Jack Jansen2003-11-191-7/+0
|
* Patch #794400: Let PYTHONSTARTUP influence the compiler flags.Martin v. Löwis2003-11-181-9/+14
|
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* Py_Main(): Add a check for the PYTHONINSPECT environment variableBarry Warsaw2003-06-291-0/+9
| | | | | | | | | | after running the script so that a program could do something like: os.environ['PYTHONINSPECT'] = 1 to programmatically enter a prompt at the end. (After a patch by Skip Montanaro w/ proposal by Troy Melhase
* Patch #672053: Return a result from Py_Main, instead of exiting.Martin v. Löwis2003-03-301-9/+9
|
* Patch #695250: Suppress COPYRIGHT if site.py is not read. Fixes #672614.Martin v. Löwis2003-03-301-3/+6
| | | | Will backport to 2.2.
* An #endif was missing in Just's patch. Added.Jack Jansen2003-03-051-0/+1
|
* removing one Mac hack and add another:Just van Rossum2003-03-051-26/+16
| | | | | | | - The applet logic has been replaced to bundlebuilder's bootstrap script - Due to Apple being extremely string about argv[0], we need a way to specify the actual executable name for use with sys.executable. See the comment embedded in the code.
* Patch #696645: Remove VMS code with uncertain authorship.Martin v. Löwis2003-03-051-33/+8
|
* Squashed compiler warnings by adding casts, making sure prototypes are inJack Jansen2002-12-231-0/+4
| | | | scope and looking at types.
* Patch #614055: Support OpenVMS.Martin v. Löwis2002-12-061-0/+57
|
* Fix minor whitespace nit, for consistency with Python's C style rules.Fred Drake2002-10-171-1/+1
|
* On Cygwin, put stdin, stderr, and stdout in binary mode when the -uSjoerd Mullender2002-08-091-2/+2
| | | | flag is given (to mimic native Windows).
* Added one call to Py_Main(), for OSX framework builds only, that will get theJack Jansen2002-08-021-1/+17
| | | | | | | | | | | | | actual script to run in case we are running from an applet. If we are indeed running an applet we skip the normal option processing leaving it all to the applet code. This allows us to get use the normal python binary in the Python.app bundle, giving us all the normal command line options through PythonLauncher while still allowing Python.app to be used as the template for building applets. Consequently, pythonforbundle is gone, and Mac/Python/macmain.c isn't used on OSX anymore.
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Fix last checkin, can't use " inside a stringNeal Norwitz2002-07-281-1/+1
|
* Patch #552812: Better description in "python -h" for -u.Martin v. Löwis2002-07-281-0/+1
|
* OS/2 EMX port changes (Modules part of patch #450267):Andrew MacIntyre2002-03-031-1/+5
| | | | | | | | | | | | | | | Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
* Remove mentioning of -U option in "python -h" output.Marc-André Lemburg2002-02-111-1/+0
|
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-4/+0
|
* SF bug #488514: -Qnew needs workTim Peters2001-12-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Big Hammer to implement -Qnew as PEP 238 says it should work (a global option affecting all instances of "/"). pydebug.h, main.c, pythonrun.c: define a private _Py_QnewFlag flag, true iff -Qnew is passed on the command line. This should go away (as the comments say) when true division becomes The Rule. This is deliberately not exposed to runtime inspection or modification: it's a one-way one-shot switch to pretend you're using Python 3. ceval.c: when _Py_QnewFlag is set, treat BINARY_DIVIDE as BINARY_TRUE_DIVIDE. test_{descr, generators, zipfile}.py: fiddle so these pass under -Qnew too. This was just a matter of s!/!//! in test_generators and test_zipfile. test_descr was trickier, as testbinop() is passed assumptions that "/" is the same as calling a "__div__" method; put a temporary hack there to call "__truediv__" instead when the method name is "__div__" and 1/2 evaluates to 0.5. Three standard tests still fail under -Qnew (on Windows; somebody please try the Linux tests with -Qnew too! Linux runs a whole bunch of tests Windows doesn't): test_augassign test_class test_coercion I can't stay awake longer to stare at this (be my guest). Offhand cures weren't obvious, nor was it even obvious that cures are possible without major hackery. Question: when -Qnew is in effect, should calls to __div__ magically change into calls to __truediv__? See "major hackery" at tail end of last paragraph <wink>.
* PEP 238 documented -Qwarn as warning only for classic int or longGuido van Rossum2001-09-041-4/+8
| | | | | division, and this makes sense. Add -Qwarnall to warn for all classic divisions, as required by the fixdiv.py tool.
* Rename the -D option to -Q, to avoid a Jython option name conflict.Guido van Rossum2001-09-041-7/+7
|
* Oops. The -W option takes args, not -X.Guido van Rossum2001-08-311-1/+1
|