LeonQuee / labstreaminglayer

Automatically exported from code.google.com/p/labstreaminglayer
0 stars 0 forks source link

Patch for making the Python examples more PEP8 compliant #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The Python example files are not very pythonic. There is a coding convention 
which is well accepted in the community: PEP 8 
(http://legacy.python.org/dev/peps/pep-0008/)

I took the liberty to fix the worst offenders and created a hg patch, which is 
attached.

I mainly fixed whitespace issues, spaces around commas and operators, the 
ordering of import statements, line wrapping of comments.

I also fixed two occasions of

[random.random(), random.random(), ..., random.random()] into

[random.random() for i in range(8)]

Cheers,

Basti

PS: I filed an issue yesterday about potential problems with Python's GIL. The 
issue somehow disappeared from the tracker without any notification. I don't 
know if this was a mistake, however I worked a little more on the threading 
issues and found out that LSL segfaults a lot when used with (Python) threads.

Original issue reported on code.google.com by bastian....@gmail.com on 16 May 2014 at 8:00

Attachments: