Professional IronPython



Download 20,35 Mb.
Pdf ko'rish
bet52/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   48   49   50   51   52   53   54   55   ...   453
28

CHAPTER 2
Understanding the ironPython Basics
FIgURE 2-7: 
You can use the Visual Studio IDE to create new Python files.
2.
Highlight the Text File entry. Visual Studio will assume you want to create a text (.TXT) file, 
but you can change the extension to anything you want.
3.
Type the name of the Python file you want to create in the Name field. Make certain that 
your file has a .py extension or the IronPython interpreter may not work with it. 
4.
Click Add. Visual Studio adds the file to Solution Explorer (similar to the addition shown in 
Figure 2-6) and automatically opens the file for editing.
IronPython Project limitations
The project you create using this technique has some serious limitations. Here’s a partial list of 
the things that you won’t see in your IronPython project that you’ll normally see in other Visual 
Studio projects.

Color support for keywords or other special text

IntelliSense


New Items dialog support


Immediate window (debugging)


Command window (when working with variables during debugging)


548592c02.indd 28
2/24/10 12:47:20 PM
www.finebook.ir


Using Visual Studio to Create IronPython Applications
 

 
29
debugging the Project
After you write your code, you can use the Visual Studio debugger to debug the project. This chapter 
provides a brief overview of debugging. Chapter 12 discusses debugging in detail. All you really need 
to worry about now is understanding how the debugger works so that you can use it to trace through 
sample programs in this and other chapters in the book.
This section assumes you’re using the MyFirst.py example found in Chapter 1 and that you’ve created a 
project for it. Start by placing a breakpoint on the first line of the application (
print(‘5 * 10 =‘),
); 
then place a second breakpoint at the beginning of the function (
def mult(a, b):
). You can do this 
by placing your cursor on the line and pressing F9 or choosing Debug 
➤➪➤➤
Toggle Breakpoint. You should 
see the breakpoint shown in Figure 2-8.
FIgURE 2-8: 
Visual Studio helps you debug your IronPython applications.
At this point, you can begin debugging your application. The following steps get you started.
1.
Press F5 or click Start Debugging to begin debugging your application. Starting the debug pro-
cess can take a while because Visual Studio has to start a copy of the IronPython interpreter. 
Visual Studio stops at the function definition. IronPython makes a list of function definitions 
when it starts the application.

Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   48   49   50   51   52   53   54   55   ...   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