You can use the py_compile standard module to byte-compile your code without running it (eg, without importing zigbee.py). Just make sure you are performing the compile operations with a compatible interpreter version with the target device.
Most ConnectPort X devices will use 2.4.x (where any 2.4 python interpreter is compatible). To verify the version of the interpreter, both on the gateway and on the PC performing the compile operation, you can start the python interpreter by calling 'python' and it reports the version string automatically.
Hope this helps,