Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Building a method name in a function
Post: RE: Building a method name in a function

indeed, i'm accessing the attributes (and not the methods) generated through Qt designer. gettattr did the job and saved me 40 conditions :)
ffgth General Coding Help 9 3,229 Oct-19-2020, 01:01 PM
    Thread: Building a method name in a function
Post: RE: Building a method name in a function

(Oct-19-2020, 03:27 AM)buran Wrote: Look at getattr() built-in function. Note that with attribute name like method1, method2, etc. there is good chance you are doing something the wrong way. Better ...
ffgth General Coding Help 9 3,229 Oct-19-2020, 11:35 AM
    Thread: Building a method name in a function
Post: RE: Building a method name in a function

i guess it's basically the same as i would have to access them as foo.methods[0] and foo objects will have no attribute methods. i still will have to test i in order to call foo.method1, foo.methods[...
ffgth General Coding Help 9 3,229 Oct-18-2020, 10:55 PM
    Thread: Building a method name in a function
Post: Building a method name in a function

Hi, as an almost beginner, this is just a general knowledge question. Let's say i have a class foo defining method1, method2, method3. I'd like to have a function outside class foo, for example: my_fu...
ffgth General Coding Help 9 3,229 Oct-18-2020, 10:41 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020