IronPython 에서 .Net C# 끌어 쓰기
IronPython 1.1.1 (1.1.1) on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import fileinput
Traceback (most recent call last):
File , line 0, in <stdin>##9
File , line 0, in __import__##4
ImportError: No module named fileinput
>>> import sys
>>> sys.platform
'cli'
>>> import os
Traceback (most recent call last):
File , line 0, in <stdin>##12
File , line 0, in __import__##4
ImportError: No module named os
>>> from System import Console
>>> dir(Console)
['BackgroundColor', 'Beep', 'BufferHeight', 'BufferWidth', 'CancelKeyPress', 'Ca
psLock', 'Clear', 'CursorLeft', 'CursorSize', 'CursorTop', 'CursorVisible', 'Equ
als', 'Error', 'Finalize', 'ForegroundColor', 'GetHashCode', 'GetType', 'In', 'I
nputEncoding', 'KeyAvailable', 'LargestWindowHeight', 'LargestWindowWidth', 'Mak
eDynamicType', 'MemberwiseClone', 'MoveBufferArea', 'NumberLock', 'OpenStandardE
rror', 'OpenStandardInput', 'OpenStandardOutput', 'Out', 'OutputEncoding', 'Read
', 'ReadKey', 'ReadLine', 'Reduce', 'ReferenceEquals', 'ResetColor', 'SetBufferS
ize', 'SetCursorPosition', 'SetError', 'SetIn', 'SetOut', 'SetWindowPosition', '
SetWindowSize', 'Title', 'ToString', 'TreatControlCAsInput', 'WindowHeight', 'Wi
ndowLeft', 'WindowTop', 'WindowWidth', 'Write', 'WriteLine', '__class__', '__doc
__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr
__', 'add_CancelKeyPress', 'remove_CancelKeyPress']
>>> Console.Out.WirteLine("asdfasf")
Traceback (most recent call last):
File , line 0, in <stdin>##17
AttributeError: 'SyncTextWriter' object has no attribute 'WirteLine'
>>> Console.Out.WriteLine("asdfasf")
asdfasf
>>>