[Sugar-devel] sugar_bundle_version()?
Tomeu Vizoso
tomeu at sugarlabs.org
Sun Dec 14 12:28:10 EST 2008
On Sun, Dec 14, 2008 at 16:44, Walter Bender <walter.bender at gmail.com> wrote:
> I need to grab the version of my activity and I can do this by
> accessing the environ variable 'SUGAR_BUNDLE_VERSION' but I wonder why
> there isn't an equivalent to activity.get_bundle_name(). Really just a
> style question.
I would say it's just an oversight. We cannot make available all the
possible environment variables as class methods, but by doing so with
some of them, we can make them more discoverable. E.g., by running
pydoc sugar.activity, those methods appear along with the API
documentation they may have.
So it's just a matter of making things more convenient to activity
authors and we could add that method if people thought it helps.
Regards,
Tomeu
> print os.environ['SUGAR_BUNDLE_NAME']
> print activity.get_bundle_name()
>
> print os.environ['SUGAR_BUNDLE_VERSION']
> print activity.get_bundle_version() < -- this method doesn't exist?
>
> -walter
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
More information about the Sugar-devel
mailing list