Question: Hi I am little bit confused about the `PixelHeight` and `PixelWidth` properties.

* Actually I wanted to is these `PixelHeight` and `PixelWidth` properties
are equivalent to the Image `height` and `width` properties ?
* If not how are they related like how can i convert these pixelheight
to image height and same for width ?

Answer: 
`file` is a [built-in name](https://docs.python.org/2/library/functions.html#file), so naming a variable `file` might break some things. `file` isn't defined in vector.py, so you're calling the [`write()`](https://docs.python.org/2/library/stdtypes.html#file.write) function of file objects, but you're calling it as a static function, so it isn't working. I agree with @roippi about adding a file object as a parameter of `vector`'s constructor:

```
def __init__(self, f, x=None, y=None, z=None, angle=None)

```

I renamed it `f` here to avoid the first problem I mentioned, but you can call it something else. You just need to do a find and replace now, replacing "file" with "f" in vector.py.
```
def write(self):
    file.write("[" + str(self.x) + ",\t" + str(self.y) + ",\t" + str(self.z) + "]")

```

You are referring to a global, `file`, within the body of this method. Globals are global **per module**, not across an interpreter instance. Thus when things are in separate modules, python does not know how to resolve this global name lookup.

I suggest rewriting your `vector` constructor to receive a file handle (or a string pointing to a file) and storing that in an instance variable.