.NET Framework Bookmark and Share   
 index > Microsoft Codename 'Oslo' > Where is Python absolutely necessary in Intellipad?
 

Where is Python absolutely necessary in Intellipad?

I mean those parts where no MEF has gone before.
Ceyhun Ciper

Apologies for the long reply but I wanted to give as much information as possible to help answer the question.

There isn't a strong philosophical argument behind the choice of python specifically other than that we wanted a widely used scripting language for extensibility of code.

We use python wherever we want to allow and encourageusers to customze the functionality of Intellipad. Commands can be tweaked or completely rewritten. As an example if you wanted to integrate intellipad with a source control system like TFS or git, you could add some commands in python to provide the functionality you needed. You could add menu items by editing the menubar xcml file. You could even adjust the behavior of the open and save commands if you need to.

We also wanted to show examples of how to test things in intellipad so we ship the unit tests for the python code as python code as well. Hitting Ctrl+R,A will run all the tests or using the Test(test_name_prefix) function in the mini-buffer you can run a subset of tests.

Using the /coverage command line option, you can enable python code coverage (at the function level) and run tests. You can then see the functions that have been covered by opening a python file.

We have extensions to MEF that discover commands and test written in python and add them to the catalog. In theory you could write any Intellipad extension component in python but we've found it to be mostly useful for commands and tests.

Lastly we use python as the language in the mini-buffer, our command window. You can edit minibuffercommannds.py to add new functions in there.

-hoop


Hoop
Hoop
Sorry for the delay in responding here, Ceyhun. I'm not entirely clear what you're asking though...Python is used as a general extensibility mechanism for Intellipad, so the basic answer of when it's "necessary" would be "anytime you want Intellipad to do something it doesn't already do."

But if you have more specific questions, I can find you some more specific answers.

.Kraig
Kraig Brockschmidt
So does MEF.

Then, why Python? (just as an internal interpreter?... of what?)

Thanks,
Ceyhun
Ceyhun Ciper
MEF is our extensibility mechanism. Python is a way that we can use MEF to extend Intellipad such that you can see how things are implemented and change it if you so desire, without having to resort to reflector or something like it. Python is also a great convenience for exploring in Intellipad via the minibuffer. In terms of requirements, python is not necessary.
Quetzal Bradley

Apologies for the long reply but I wanted to give as much information as possible to help answer the question.

There isn't a strong philosophical argument behind the choice of python specifically other than that we wanted a widely used scripting language for extensibility of code.

We use python wherever we want to allow and encourageusers to customze the functionality of Intellipad. Commands can be tweaked or completely rewritten. As an example if you wanted to integrate intellipad with a source control system like TFS or git, you could add some commands in python to provide the functionality you needed. You could add menu items by editing the menubar xcml file. You could even adjust the behavior of the open and save commands if you need to.

We also wanted to show examples of how to test things in intellipad so we ship the unit tests for the python code as python code as well. Hitting Ctrl+R,A will run all the tests or using the Test(test_name_prefix) function in the mini-buffer you can run a subset of tests.

Using the /coverage command line option, you can enable python code coverage (at the function level) and run tests. You can then see the functions that have been covered by opening a python file.

We have extensions to MEF that discover commands and test written in python and add them to the catalog. In theory you could write any Intellipad extension component in python but we've found it to be mostly useful for commands and tests.

Lastly we use python as the language in the mini-buffer, our command window. You can edit minibuffercommannds.py to add new functions in there.

-hoop


Hoop
Hoop
Thanks.

This is a nice perspective. ("Python is a way that we can use MEF ...")
Ceyhun Ciper
Thanks for taking the the time to explain.

That was very informative. Especially the "We have extensions to MEF..." paragraph.
Ceyhun Ciper

You can use google to search for other answers

Custom Search

More Threads

• Some questions regarding MGrammar
• M types vs CLR types
• Where is Repository.msi File ?
• Oslo looks too complicated!
• MSchema Text length and null?
• When are same things the same, and when are different things different?
• Developing MSchema along with MGrammar to have the AST validated
• Building a configuration DSL, help
• Where to find documentation on error messages?
• Uppercase text pattern expression in mschema