X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=doc%2FRULES;h=55aa4bf40e71d50c8940e22fd75a6c971003148c;hp=9170eef01fbbbd3942aa35dcf6fe96109c5149a4;hb=bbbf50f9d0c7d3fbd66b07460a7af835ec111f5b;hpb=e56b5fe2bef7d16a067a230868fc09a78315f52d diff --git a/doc/RULES b/doc/RULES index 9170eef..55aa4bf 100644 --- a/doc/RULES +++ b/doc/RULES @@ -112,7 +112,15 @@ not nothing. Going trough all prints to find the offending one is definitely no fun. Something like "print 'obj', obj" is fine. Something like "print 'mySpecialPlugin actionmap is', actionMap" is even better. -6.-99.) Threads are bad. +6.) usage of 'import' + +Please avoid 'import *'. +Use "from foo import bar" only if bar is clearly identifiable to belong to +foo (e.g.: it's ok to "from Screens.MessageBox import MessageBox", but it's +not ok to do "from os import path". Use "import os.path", then os.path.fnc. +Of course "from os.path import *" is even worse.) + +7.-99.) Threads are bad. (Unless they are worker threads. And sleep()ing is definitely not working. So if you every having a thread which sleeps, you did something wrong. There