Professional IronPython



Download 20,35 Mb.
Pdf ko'rish
bet376/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   372   373   374   375   376   377   378   379   ...   453
364

CHAPTER 17
ExtEnding ironPython Using VisUal Basic.nEt
FIgURE 17-2: 
The dir() function shows the content of the Calcs class.
Adding the IronPython Project
At this point, you have a Visual Basic.NET extension (or module) to use with IronPython. Of course, 
you’ll want to test it. The easiest way to do this is to add the IronPython project directly to the current 
solution. The following steps describe how to perform this task.
1.
Right-click the solution entry in Solution Explorer and choose Add
➤➤➪➤➤
Existing Project from 
the context menu. You’ll see the Add Existing Project dialog box shown in Figure 17-3.
FIgURE 17-3: 
Locate IPY.EXE and add it to your solution.
548592c17.indd 364
2/24/10 12:49:34 PM
www.finebook.ir


Creating the Simple Visual Basic.NET Extension
 

 
365
2.
Locate 
IPY.EXE
on your hard drive and highlight it. Click Open. You’ll see a new project 
entry added to the solution.
3.
Right-click the ipy entry in Solution Explorer and choose Set as Startup Project from the con-
text menu. This step ensures that choosing one of the startup options from the Debug menu 
starts the IronPython application.
4.
Right-click the ipy entry in Solution Explorer and choose Properties from the context menu. 
You’ll see the General tab of the ipy Properties window shown in Figure 17-4.
FIgURE 17-4: 
Configure the IronPython application to work with Calcs.DLL.
5.
Type -D TestCalcs.py in the Arguments field.
6.
Click the ellipses in the Working Directory field to display the Browse for Folder dialog box. 
Locate the output folder of the 
Calcs.DLL
(or other extension) file. Click OK. The IDE adds 
the correct directory information to the Working Directory field.
7.
Open Windows Explorer. Locate the 
\Calcs\Calcs\bin\Debug
folder. Right-click in 
the right pane and choose New
➤➤➪➤➤
Text Document from the context menu. Name the file 
TestCalcs.py
and press Enter. Click Yes if asked if you want to rename the file extension.
8.
Right-click the solution item in Solution Explorer and choose Add
➤➤➪➤➤
Existing Item from the 
context menu to display the Add Existing Item dialog box shown in Figure 17-5.
9.
Locate the 
TestCalcs.py
file in the solution and click Add. Visual Studio adds 
TestCalcs.py
to the 
Solution Items
folder in Solution Explorer and automatically opens the file for you. 
You’re ready to add test code for the application.
548592c17.indd 365
2/24/10 12:49:34 PM
www.finebook.ir



Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   372   373   374   375   376   377   378   379   ...   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