Professional IronPython



Download 20,35 Mb.
Pdf ko'rish
bet139/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   135   136   137   138   139   140   141   142   ...   453
FIguRE 7-5: 
Importing into the global namespace reduces the size and complexity of your code.
Configuring the Console for .NET Help
Believe it or not, the 
help()
function works fine with .NET assemblies. However, Microsoft 
designed the assembly help for a much larger display area. If you type 
help(ConsoleColor)
and 
press Enter, the help output is so long that you can’t see even a small portion of it. In fact, you won’t 
actually see the help you need because it appears at the beginning of the help listing.
The console window has a buffer associated with it. When you type a command and the interpreter 
presents output, the buffer accepts all the output up to the size of the buffer. At that point, all the 
old information drops off the end into the bit bucket and you never see it again. The standard buffer 
548592c07.indd 122
2/25/10 9:44:27 AM
www.finebook.ir


Importing the .NET Framework Assemblies
 

 
123
size is 300 lines, which seems like it would be enough, but it isn’t nearly enough for the .NET help. 
What you really need for .NET help is about 3,000 lines. Use these steps to change the buffer size.
1.
Click the system menu in the upper-left corner of the console window and choose Properties 
from the context menu. You see the IronPython Console Properties dialog box.
2.
Select the Layout tab. You see the information
shown in Figure 7-6.
3.
Change the Height property in the Screen Buffer 
Size area to 3000. This means that the screen 
buffer can now hold up the 3,000 lines of out-
put. However, it also means that the screen 
buffer consumes ten times more memory, which 
means you won’t want to make this change to a 
console window unless you need the extra space.
4.
Click OK. You see the Apply Properties To 
Shortcut dialog box shown in Figure 7-7. If you 
plan to work with .NET very often, you’ll defi-
nitely want to choose “Modify Shortcut that 
Started this Window” so that you don’t have
to make the change every time.
5.
Select one of the configuration change options 
and then click OK. Windows makes the change 
you requested.
At this point, you need to try out the 
help()
function. 
Try typing
help(ConsoleColor)
and press Enter. You’ll see that the display takes a second or so 
to return. At this point, you can scroll through the massive help 
display to find the information you need. Figure 7-8 shows typi-
cal output.

Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   135   136   137   138   139   140   141   142   ...   453




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish