Exposure & Gain

Discussions on extending SharpCap using the built in Python scripting functionality
User avatar
1CM69
Posts: 63
Joined: Tue Nov 14, 2017 9:49 pm

Re: Exposure & Gain

#31

Post by 1CM69 »

oopfan wrote: Tue Aug 21, 2018 4:28 pm
Note both the self.get_EV() and the (self) parameter to the get_EV method. All seems a bit clunky from a C++/C# point of view, but that's the way Python works....
Actually Python is a cool language. What Kirk ought to do is to put get_EV() in global scope. He currently has it as a member function of his Form class. Just cut and paste it outside the class.

If Udemy online classes are available in the UK they have some good courses in Python, currently costing only 9.99 USD in their back-to-school sale.

https://www.udemy.com/topic/python/

Brian
Just enrolled, 9.99GBP in the sale
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Exposure & Gain

#32

Post by admin »

I must say, I quite like python apart from the clunky forced use of 'self' for OO concepts - it's definitely a pitfall for programmers coming from languages with a more seamless OO concept.

It would be quite cool to have C# scripting in the application as well as python scripting. There are things like CSScript (https://github.com/oleg-shilo/cs-script) that run the C# language as script, but I'm not aware of anything equivalent to the mini-IDE (the IronPython Console) that I use.

I am just uploading a new SharpCap 3.2 build that will make script development a bit easier since it will stop SharpCap from closing with a bug report if you get something wrong in one of your UI message handlers - instead you will get a message box and details of the exception logged.

cheers,

Robin
User avatar
1CM69
Posts: 63
Joined: Tue Nov 14, 2017 9:49 pm

Re: Exposure & Gain

#33

Post by 1CM69 »

admin wrote: Wed Aug 22, 2018 8:57 pm I must say, I quite like python apart from the clunky forced use of 'self' for OO concepts - it's definitely a pitfall for programmers coming from languages with a more seamless OO concept.

It would be quite cool to have C# scripting in the application as well as python scripting. There are things like CSScript (https://github.com/oleg-shilo/cs-script) that run the C# language as script, but I'm not aware of anything equivalent to the mini-IDE (the IronPython Console) that I use.

I am just uploading a new SharpCap 3.2 build that will make script development a bit easier since it will stop SharpCap from closing with a bug report if you get something wrong in one of your UI message handlers - instead you will get a message box and details of the exception logged.

cheers,

Robin
Fantastic news about the script error handling in the new build. Lost count how many times I’ve reloaded SC :D

I shall be downloading that ASAP

cheers..,

Kirk
Post Reply