"run" Package Query

2009-03-03 Thread Rohan Hole
When I write program (.py) with IDLE , I am able to use run package .


- - - -   start  - - - -

if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])

- - - -  end - - - - -

above code works simply with the IDLE.

But problem arises , when I use Eric or pyScriptter , On other editor it
gives the error "Exceptions.ImportError : No Module named run"
Do i need to set any variable ? or path ?
run is a system package or third party ?
Thanx In Advance
--
http://mail.python.org/mailman/listinfo/python-list


How to create Standalone PYC File

2009-03-04 Thread Rohan Hole
I have .py file which uses some third party modules like egg files, like
simplejson and python-twitter ,

- start of file  -

import ConfigParser
import getopt
import os
import sys
import twitter


when i compile this py file using compile module , i get .pyc file . Now my
question is , if i run .pyc file on another computer containing only python
installed , will it run ? or do i need to install 3rd party lib again on
that computer ? Anyone know how to make program lib independent , something
called embedded into one file only ?

thank you in anticipation .

Rohan.
--
http://mail.python.org/mailman/listinfo/python-list