how setup a dll file as a module?
in arcgis , arcgisscripting is a dll file there is a script as following: import arcgisscripting gp = arcgisscripting.create() why can the script run? how can we setup a dll file as a module? -- http://mail.python.org/mailman/listinfo/python-list
Re: how setup a dll file as a module?
On Aug 27, 6:45 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > smalltalk wrote: > > > in arcgis , arcgisscripting is a dll file > > there is a script as following: > > > import arcgisscripting > > gp = arcgisscripting.create() > > > why can the script run? > > how can we setup a dll file as a module? > > There can be python-extension that are essentially C-modules. You can write > them your own, or using various wrapper technologies. See > > http://docs.python.org/ext/ext.html > > for starters, and google > > SIP > boost::python > SWIG > PyRex > > for more information. > > Diez thank you very much -- http://mail.python.org/mailman/listinfo/python-list
Re: Jython 2.2 on Ubuntu
On Aug 29, 10:50 pm, Neil Wallace <[EMAIL PROTECTED]> wrote: > Thanks Tim, > > I subscribed to the Jython group hosted by sourceforge, and they are a > great bunch of guys/gals. > > Here's what I did to fix my problem. > > 1. removed Jython 2.1 (using Synaptic)jytho > 2. added the following lines (as root) to /etc/profile > # set PATH for Jython > PATH=$PATH:/home/neil/jython2.2 > export PATH > > I had to restart X, that's it solved!! > > Neil > > > > Tim Couper wrote: > > you need to ensure that the correct jython executable is in a directory > > which is on your on your path. > > > I've just successfully test-subscribed to > >https://lists.sourceforge.net/lists/listinfo/jython-users. Maybe you > > could try again. > > > Tim > > > Dr Tim Couper > > CTO, SciVisum Ltd > > >www.scivisum.com > > > Neil Wallace wrote: > >> Hi all, > > >> I am a novice Python/Jython programmer, and Ubuntu user. > > >> Ubuntu still only supports only version 2.1 of Jython. I have used the > >> GUI installer of Jython 2.2, and installed it to the default > >> /root/jython2.2 directory. The install went without issues. > > >> However, typing jython --version > >> in a teminal still gives me Jython 2.1 on java (JIT: null) > > >> What else do I need to do? > > >> regards > >> Neil. > > >> p.s. I posted this to the jython group hosted by sourceforge, but it > >> bounced. :-(- Hide quoted text - > > - Show quoted text - you can use eclipse + pydev it is very easy to setup jython or python -- http://mail.python.org/mailman/listinfo/python-list
pypar error
I want to install pypar,but it always show following errors: D:\pypar_1.9.3>python setup.py build -c mingw32 running build running build_py running build_ext building 'pypar.mpiext' extension D:\MinGWStudio\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I $MPICH_DIR\SDK.gcc \include -ID:\Python25\include -ID:\Python25\PC -c mpiext.c -o build \temp.win32- 2.5\Release\mpiext.o gcc: mpiext.c: No such file or directory gcc: no input files error: command 'gcc' failed with exit status 1 can you give me a help ? -- http://mail.python.org/mailman/listinfo/python-list
setdefaultencoding error
>>> import sys >>> sys.setdefaultencoding(utf8) Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'setdefaultencoding' but i find the attribute"setdefaultencoding" in python manuals where is the error? -- http://mail.python.org/mailman/listinfo/python-list
Re: setdefaultencoding error
thank you very much I have solved -- http://mail.python.org/mailman/listinfo/python-list
the way of "import"
I have three files names t1.py,t2.py,t3.py in e:\test\dir1,of course dir2 is exsit the content of t1.py as follow: t1.py import os print 'this is t1.py' os.chdir('..\\dir2') the content of t2.py as follow: print "this is t2.py" the content of t3.py as follow: import t1 import t2 if i run t3.py in cmd of windows as follow: python t3.py no errors show if i run t3.py in idle: >>> import t3 this is t1.py Traceback (most recent call las File "", line 1, in File "t3.py", line 2, in ImportError: No module named t2 can you give me a help? -- http://mail.python.org/mailman/listinfo/python-list
shelve file space always increase!
>>> import shelve >>> sf = shelve.open('e:/abc.db') >>> for i in range(1): ... sf[str(i)]=i ... >>> sf.close() >>> sf = shelve.open('e:/abc.db') >>> sf.clear() >>> sf {} the abc.db is always 312k though i have use clear(), how can i shrink the space? -- http://mail.python.org/mailman/listinfo/python-list