Sep
23
comment pretty printing nested dictionaries in Python?
json.dumps takes a conversion function as an optional argument, so with json.dumps(myObject.__dict__, sort_keys=True, indent=4, deault=str) you can at least use an objects implementation of repr to print itself and get round the 'not JSON serializable' TypeError
Nov
21
comment How to define multiple emacs faces?
As noted by @Stefan above, the defvar line is not necessary as long as the face name is quoted in the font-lock definitions that use it.
Nov
15
comment How to define multiple emacs faces?
If I remove the defvar (or the variation of it in my code below) then none of the highlighting works properly. Is this due to the mechanism used in the rest of the mode? It proceeds by adding the faces and some keyword regexps to a list that is then used in the guts of font-lock, and without the defvar this stops working.
Nov
15
answered How to define multiple emacs faces?
Nov
15
accepted How to define multiple emacs faces?
Nov
15
comment How to define multiple emacs faces?
I was trying to avoid eval, is this a situation where it's really the right tool for the job?
Nov
15
awarded Student
Nov
15
asked How to define multiple emacs faces?
May
31
comment payroll program, need help simply a patterned event, new to python
To mark it solved click the empty tick mark next to the answer - it should go green. The math I did with some trial and error, but mainly you subtract the starting value from n (720 or 1000) to give 0 at the start of the range, divide by 20 to get 0,1,2,3 etc representing each block of 20, multiply by the step value (2 or 3) to get a sequence of 0,2,4,6 etc and 0,3,6,9 then add on the value at which each range starts.
May
31
answered payroll program, need help simply a patterned event, new to python
May
31
answered reading C array in python
May
31
awarded Supporter
May
29
comment Moving breakpoints in gdb
Thanks, this seems the best way to achieve the same effect.
May
29
accepted Moving breakpoints in gdb
May
22
asked Moving breakpoints in gdb
May
2
awarded Teacher
May
1
awarded Scholar
May
1
accepted Overloaded functions returning pointers to a base type alongside an abstract interface in fortran 2003?
May
1
comment Overloaded functions returning pointers to a base type alongside an abstract interface in fortran 2003?
Updating to Update 9 package 300 allows this kind of use to compile, thanks for your help.
Apr
25
asked Overloaded functions returning pointers to a base type alongside an abstract interface in fortran 2003?
1 2