On 06-08-11 01:38, Emile van Sebille wrote:
On 8/5/2011 4:22 PM Tim Johnson said...
* Christopher King<g.nius...@gmail.com> [110805 12:03]:
To make a package, you make a folder named what you want to name the
package, for example: virus_toolkit. Then you make a file in it called
__init__.py. This is what you import if you import the
virus_toolkit. You
usually put documentation and general functions in this
But you can provide for both methods if in tlib.__init__ you provide
for backward compatibility.
# current way
import tlib as std
....
std.htmlButton(*arglist)
# New way, after transition
import tlib as std
in tlib.__init__, include the following:
import html
htmlButton = html.button
And print a deprecation warning when people use it like this. That way
you let them know this method could be removed in a next version.
See the warnings module.
Cheers,
Timo
std.html.button(*arglist)
#OR
import html from tlib
html.button(*arglist)
Emile
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor