komodo

Komodo - watch variables and execute code while on pause in the program

跟風遠走 提交于 2019-11-27 07:23:35
问题 With c# in the Visual Studio IDE I can pause at anytime a program and watch its variables, inspect whatever I want. I noticed that with the Komodo IDE when something crashes and it stops the flow of the program, I can do exactly the same. But for some reason, it seems that when I try to do the same when I manually pause the program, the same cannot be achieved. Am I doing something wrong or it just isn't possible? In the later case, could anyone care to explain me why? Is it IDE related or

Creating class instance properties from a dictionary?

久未见 提交于 2019-11-27 06:20:37
I'm importing from a CSV and getting data roughly in the format { 'Field1' : 3000, 'Field2' : 6000, 'RandomField' : 5000 } The names of the fields are dynamic. (Well, they're dynamic in that there might be more than Field1 and Field2, but I know Field1 and Field2 are always going to be there. I'd like to be able to pass in this dictionary into my class allMyFields so that I can access the above data as properties. class allMyFields: # I think I need to include these to allow hinting in Komodo. I think. self.Field1 = None self.Field2 = None def __init__(self,dictionary): for k,v in dictionary

Komodo Python auto complete: type inference by variable metadata?

谁说胖子不能爱 提交于 2019-11-27 03:31:42
问题 I'm using Komodo Edit for Python development, and I want to get the best out of the auto complete. If I do this: a = A() a. I can see a list of members of A. But if I do this: a = [A()] b = a[0] b. It does not work. I want to be able to do this: a = [A()] b = a[0] """b Type: A """ b. So how can I tell the auto complete that b is of type A? 回答1: This doesn't really answer your question, but with Wing IDE you can give hints to the type analyzer with assert isinstance(b, A) . See here. I haven't

Creating class instance properties from a dictionary?

我怕爱的太早我们不能终老 提交于 2019-11-26 11:56:39
问题 I\'m importing from a CSV and getting data roughly in the format { \'Field1\' : 3000, \'Field2\' : 6000, \'RandomField\' : 5000 } The names of the fields are dynamic. (Well, they\'re dynamic in that there might be more than Field1 and Field2, but I know Field1 and Field2 are always going to be there. I\'d like to be able to pass in this dictionary into my class allMyFields so that I can access the above data as properties. class allMyFields: # I think I need to include these to allow hinting