Brad Derstine on 20 Feb 2014 07:09:35 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Python Syntax Question


It's the difference in how it loads the globals...

http://stackoverflow.com/questions/5124232/what-is-the-difference-between-im
port-modx-and-from-modx-import


Brad

-----Original Message-----
From: plug [mailto:plug-bounces@lists.phillylinux.org] On Behalf Of Casey
Bralla
Sent: Thursday, February 20, 2014 10:03 AM
To: plug@lists.phillylinux.org
Subject: [PLUG] Python Syntax Question

I'm confused a little about importing modules in python.

In some cases, you add a statement like:

"import sys"


But in other cases, the syntax is:

"from sys import *"



Why the difference?


-- 

Casey Bralla

Chief Nerd in Residence
The NerdWorld Organisation

www.NerdWorld.org
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug