Namespaces
Variants
Actions
Revision as of 05:28, 27 July 2012 by hamishwillee (Talk | contribs)

How to import a variable from a module

Jump to: navigation, search
Article Metadata

Article
Created: gaba88 (30 Jun 2008)
Last edited: hamishwillee (27 Jul 2012)

The two line code below shows how to import a variable from a module.

Method 1

import mymodule
 
new_variable=mymodule.x

Method 2

from mymodule import x

or

from mymodule import x as new_variable
128 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved