C# Class IronPython.Hosting.PythonCommandLine

A simple Python command-line should mimic the standard python.exe
Inheritance: CommandLine
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Private Properties

Свойство Type Description
GetEffectiveExitCode int
GetVersionString string
ImportSite void
InitializeExtensionDLLs void
InitializeModules string
InitializePath void
RunCommandWorker int
RunFileWorker int
RunOneInteraction int?
RunStartup void
TryInteractiveActionWorker int?

Méthodes publiques

Méthode Description
GetGlobals ( string name ) : IList
GetLogoDisplay ( ) : string

Returns the display look for IronPython. The returned string uses This \n instead of Environment.NewLine for it's line seperator because it is intended to be outputted through the Python I/O system.

PythonCommandLine ( ) : System

Méthodes protégées

Méthode Description
CreateScope ( ) : Scope
GetNextAutoIndentSize ( string text ) : int
Initialize ( ) : void
Run ( ) : int
RunCommand ( string command ) : int
RunFile ( string fileName ) : int
RunInteractive ( ) : int
Shutdown ( ) : void
TryInteractiveAction ( ) : int?
UnhandledException ( Exception e ) : void

Private Methods

Méthode Description
GetEffectiveExitCode ( SystemExitException e ) : int
GetVersionString ( ) : string
ImportSite ( ) : void
InitializeExtensionDLLs ( ) : void

Loads any extension DLLs present in sys.prefix\DLLs directory and adds references to them. This provides an easy drop-in location for .NET assemblies which should be automatically referenced (exposed via import), COM libraries, and pre-compiled Python code.

InitializeModules ( ) : string
InitializePath ( int &pathIndex ) : void
RunCommandWorker ( string command ) : int
RunFileWorker ( string fileName ) : int
RunOneInteraction ( ) : int?

Parses a single interactive command and executes it. Returns null if successful and execution should continue, or the appropiate exit code.

RunStartup ( ) : void
TryInteractiveActionWorker ( ) : int?

Attempts to run a single interaction and handle any language-specific exceptions. Base classes can override this and call the base implementation surrounded with their own exception handling. Returns null if successful and execution should continue, or an exit code.

Method Details

CreateScope() protected méthode

protected CreateScope ( ) : Scope
Résultat Scope

GetGlobals() public méthode

public GetGlobals ( string name ) : IList
name string
Résultat IList

GetLogoDisplay() public static méthode

Returns the display look for IronPython. The returned string uses This \n instead of Environment.NewLine for it's line seperator because it is intended to be outputted through the Python I/O system.
public static GetLogoDisplay ( ) : string
Résultat string

GetNextAutoIndentSize() protected méthode

protected GetNextAutoIndentSize ( string text ) : int
text string
Résultat int

Initialize() protected méthode

protected Initialize ( ) : void
Résultat void

PythonCommandLine() public méthode

public PythonCommandLine ( ) : System
Résultat System

Run() protected méthode

protected Run ( ) : int
Résultat int

RunCommand() protected méthode

protected RunCommand ( string command ) : int
command string
Résultat int

RunFile() protected méthode

protected RunFile ( string fileName ) : int
fileName string
Résultat int

RunInteractive() protected méthode

protected RunInteractive ( ) : int
Résultat int

Shutdown() protected méthode

protected Shutdown ( ) : void
Résultat void

TryInteractiveAction() protected méthode

protected TryInteractiveAction ( ) : int?
Résultat int?

UnhandledException() protected méthode

protected UnhandledException ( Exception e ) : void
e Exception
Résultat void