Re: within a class, redefining self with pickled file

2005-04-07 Thread Sean Blakey
; a.change() >>> a <__main__.A instance at 0x009DCD00> Note, however, that you can MODIFY self in-place within a method. You can probably hack together a solution that modifies self.__dict__, self.__class__, self.__class__.__dict__, or some other magic properties. -- Sean Blakey S

Re: initialize a dictionary

2005-03-30 Thread Sean Blakey
be problematic if you ever need to iterate values "by row" or "by column". There is a python F.A.Q. on this, which you may find useful: http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list -- Sean Blakey Saint of Mild Amusement, Evil Geniu

Re: doing "checksum" in python

2005-03-28 Thread Sean Blakey
/python-list/2004-January/204983.html http://mail.python.org/pipermail/python-list/2004-January/204998.html -- Sean Blakey Saint of Mild Amusement, Evil Genius, Big Geek Python/Java/C++/C(Unix/Windows/Palm/Web) developer quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2005-03-28 Thread Sean Blakey
ps if you gave a higher-level description of what you are trying to accomplish, I could give better pointers in the right direction. -- Sean Blakey Saint of Mild Amusement, Evil Genius, Big Geek Python/Java/C++/C(Unix/Windows/Palm/Web) developer quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Good use for Jython

2005-03-16 Thread Sean Blakey
nd redeploy a Jython script file into a running system than it is to do the same with a session EJB. -- Sean Blakey Saint of Mild Amusement, Evil Genius, Big Geek Python/Java/C++/C(Unix/Windows/Palm/Web) developer quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs [was: function with a state]

2005-03-08 Thread Sean Blakey
ever you can. > > Xah > [EMAIL PROTECTED] > http://xahlee.org/PageTwo_dir/more.html > > -- > http://mail.python.org/mailman/listinfo/python-list > Have you submitted a patch? I'm curious how you would document "global". -- Sean Blakey Saint of Mild Amusement, Evil Genius, Big Geek Python/Java/C++/C(Unix/Windows/Palm/Web) developer quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Need direction to kill a virus

2005-03-02 Thread Sean Blakey
d file. 6) With the filename you gave, it shouldn't be that hard to find some notes on this virus with google. 7) When the system is running away with background processes like you describe, use the task manager to find out which process is using the resources. Use this information in your researc

Re: python code with indention

2005-02-09 Thread Sean Blakey
end-block comments and no indentation into a correctly indented python script. -- Sean Blakey Saint of Mild Amusement, Evil Genius, Big Geek Python/Java/C++/C(Unix/Windows/Palm/Web) developer quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you do arrays

2005-02-01 Thread Sean Blakey
gt; listvalues = [1, 2, 3, 4] >>> while index < majorlop1: ... index = index + 1 ... k = random.choice(listvalues) + 1 ... iMatrix.append(k) ... >>> iMatrix array('b', [3, 5]) >>> You should probably look at the wealth of information at http://www

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread Sean Blakey
> > Has anyone ported any java programs to python and has translated this? > > any help would be greatly appreciated. > > thanks. > > josé > buffer[0] = int(string, 16) http://docs.python.org/lib/built-in-funcs.html -- Sean Blakey Saint of Mild Amusement, Ev

Re: Jython performance

2004-12-22 Thread Sean Blakey
g Jython embedded in a large Web Application, with Struts actions defined in Jython working with Java Beans managed by a Hibernate back end. The Jython-beans interoperability makes this very simple, and I'm not seeing an appreciable performance difference between the Jython actions and the pure Jav