Professional IronPython



Download 20,35 Mb.
Pdf ko'rish
bet440/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   436   437   438   439   440   441   442   443   ...   453
CPython Extensions 
for IronPython
WHAT’S IN THIS APPENDIX?

Finding extensions that work

Fixing extension problems


Finding third-party solutions to fix problems


In many cases, there’s code that’s already written for CPython that also works for IronPython. 
You’ve already experienced using CPython code in Chapter 6 when working with the Standard 
Library. The material in Chapter 6 also applies to third-party extensions. Some of these exten-
sions will work just fine, especially if they’re written in pure Python and there aren’t any odd 
IronPython behaviors to consider (see Appendix A for details).
The sticky part comes when you try to work with CPython extensions that rely more heavily on 
the C basis for CPython. In this situation, you need to create your own tool to make the extension 
work, rely on a third-party tool to perform the heavy lifting, or simply emulate the behavior of 
the CPython extension using .NET code. All of these solutions have problems.
The purpose of this appendix is to provide you with some tips and techniques for making 
your CPython extensions run in IronPython. However, you need to face the fact that not 
every CPython extension will work as you’d like it to, and some won’t work at all.
ObTAININg THE EXTENSIONS
You can find more than a few Python extensions on the Internet. For the most part, you see 
them listed simply as Python extensions — not specifically IronPython or CPython extensions. 
A number of these extensions are simply 
.py
files and probably work fine for IronPython or 
B
548592bapp02.indd 433
2/24/10 12:50:01 PM
www.finebook.ir


434

APPENDIX b
CPython ExtEnsions for ironPython
CPython without any changes. However, when you see an extension listed as providing support for 
Python, it’s better to assume that the person created it specifically for CPython. IronPython exten-
sions typically state that the developer created them for IronPython.
There are a number of places where you can find extensions specifically for IronPython. However, 
sometimes you have to take the source code and build the module yourself. Fortunately, Chapters 16 
and 17 tell you how to perform the task. The following list provides information about various sites 
to try in order to obtain extensions for IronPython tasks, such as debugging your application
or configuring a Web server.
➤➤
Debugger: You might not be very impressed with the debugging features that IronPython 
provides natively. Some people have decided to start looking at the problem and doing 
something about it. You can find a start for a debugger at 
http://blogs.msdn.com/
jmstall/articles/Sample_Mdbg_IronPython.aspx
. If you need an explanation of how 
such a debugger would work, check out the article at 
http://devhawk.net/2009/02/27/
Writing+An+IronPython+Debugger+MDbg+101.aspx
.



Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   436   437   438   439   440   441   442   443   ...   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