How to import a variable from a module
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
Thank you for reading this post. You can now Leave A Comment (0) or Leave A Trackback.
Post Info
This entry was posted on Wednesday, July 2nd, 2008 and is filed under Blogroll.You can follow any responses to this entry through the Comments Feed. You can Leave A Comment, or A Trackback.
Previous Post: Groups seek drilling halt near sage grouse habitat »
Next Post: Google wins source code ruling against Viacom »
Latest Posts:
- Comment on T-Mobile acquisition of SunCom approved; T-Mobile forced to allow Department of Homeland Security snooping by keeley
- Comment on Samsung Instinct vs. Apple iPhone - Round 1 by bryon
- Comment on T-Mobile Shadow II (2) release date and pricing details by supermegakazinotoe
- Comment on HTC Touch Diamond theme for the iPhone by Deeda
- Comment on iPhone application installations and updates causing “Apple Logo Screen of Death” by Mikey
- Comment on HTC Touch Diamond and Touch Pro details for Sprint and Verizon by Sean
- Comment on Sprint releases Samsung M300, M510 clamshells by Nagy István
- Comment on Nokia open to joining the Open Handset Alliance if it proves beneficial by Karey
- Comment on Sidekick Gekko/Gecco/Aspen to be branded as Sidekick 2008? by Brianna
- Comment on SanDisk’s “Mobile Ultra” memory cards promise best performance ever by Brian

