Re: Get Mac OSX Version

2005-09-13 Thread Robert Kern
rbt wrote: > Is there a similar function to sys.getwindowsversion() for Macs? platform.mac_ver() (And while we're at it: platform.win32_ver() might be prefered to sys.getwindowsversion()) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-13 Thread Robert Kern
he error code (or else wrongly assume that nothing wrong can happen). Uncaught exceptions *do* make the program bail out at the point of bogosity (more or less). >>If you look at the Python C source, you'll notice that probably 50% of >>the code is devoted to error handling (that was a

Re: round() wrong in Python 2.4?

2005-09-13 Thread Robert Kern
t;> 0.0225 0.022499 >>> round(0.0225, 3) 0.023 >>> [~]$ python2.4 Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more in

Re: py2app without a mac?

2005-09-13 Thread Robert Kern
which is provided with py2app. And so the circle is complete Again, it's probably not going to work without some major surgery on py2app. And if you don't have a Mac to test on, you probably won't get far. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the

Re: What XML lib to use?

2005-09-13 Thread Robert Kern
libxml2 and libxslt under the covers for greater standards compliance including c14n. I've been using extensively recently and highly recommend it. http://codespeak.net/lxml -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams

Re: round() wrong in Python 2.4?

2005-09-14 Thread Robert Kern
Antoon Pardon wrote: > Op 2005-09-13, Robert Kern schreef <[EMAIL PROTECTED]>: > >>Jeremy Sanders wrote: >> >>>Nils Grimsmo wrote: >>> >>>>Why did round() change in Python 2.4? >>> >>>It the usual floating point representatio

Re: round() wrong in Python 2.4?

2005-09-14 Thread Robert Kern
Grant Edwards wrote: > On 2005-09-14, Robert Kern <[EMAIL PROTECTED]> wrote: > >>Antoon Pardon wrote: > >>>0.0225 isn't representable and it happens that the actual number >>>you get differ. Now which number python should choose when it is >

Re: What XML lib to use?

2005-09-14 Thread Robert Kern
His interpretation of your words is a perfectly valid one even in the context of this thread. "in Python" explicitly provides a context for the rest of the sentence. In English, at least, it is perfectly reasonable to presume that explicit contexts override implicit ones. -- Robert Kern

Re: round() wrong in Python 2.4?

2005-09-14 Thread Robert Kern
Reinhold Birkenfeld wrote: > Robert Kern wrote: >>Antoon: >>"Python 2.3 isn't rounding 0.0225 up while pyton 2.4 rounds it down." > > Written in Pseudocode: > > not (Py2.3 rounding up and Py2.4 rounding down) I presumed the "isn't&qu

Re: round() wrong in Python 2.4?

2005-09-14 Thread Robert Kern
Robert Kern wrote: > Reinhold Birkenfeld wrote: > >>Robert Kern wrote: > >>>Antoon: >>>"Python 2.3 isn't rounding 0.0225 up while pyton 2.4 rounds it down." >> >>Written in Pseudocode: >> >>not (Py2.3 rounding up and Py2.

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
In [13]: a = zeros((256,256, 4), UInt8) In [14]: img = Image.frombuffer('RGBA', (256,256), a) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
inly does on my machine. Is it raising an exception on yours? If so, please post the code that is causing the error and the exception that is raised and the versions of PIL and numarray that you are using. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high

Re: encryption with python?

2005-09-15 Thread Robert Kern
Ed Hotchkiss wrote: > What's the best module for encryption with python, anyone out there > using python and encryption together? It depends on what your needs are. What do you need to accomplish? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass gro

Re: My First Python Script

2005-09-15 Thread Robert Kern
Ed Hotchkiss wrote: > But then I still get the error with the len(x) statement .. hmm That's because integers don't have a length. But if you follow James' advice, you don't need to calculate lengths of anything. -- Robert Kern [EMAIL PROTECTED] "In the fields o

Re: encryption with python?

2005-09-15 Thread Robert Kern
t; Any info on using this file? Didn't see > any on this guys site ... It's fairly straightforward. The _test() function should be self-explanatory once you learn some more Python (which I suggest you do before entrusting secure data to code that you write). -- Robert Kern [EMAIL PROTEC

Re: Problem with Help when using numarray

2005-09-16 Thread Robert Kern
>File "C:\Python24\lib\pydoc.py", line 1226, in docroutine > if object.im_self: >File "C:\Python24\Lib\site-packages\numarray\generic.py", line 537, > in __nonzero__ > raise RuntimeError("An array doesn't make sense as a truth value.

Re: Wrapping float

2005-09-17 Thread Robert Kern
the arguments to __init__. C.f. http://www.python.org/2.2/descrintro.html#__new__ In [11]: class WrapFloat(float): : def __new__(cls, value, *args, **kwds): : return float.__new__(cls, value) : def __init__(self, value, wrap=None): : float.__init__(s

Re: problem with setup.py

2005-09-17 Thread Robert Kern
on't > know which. Add the following line to your ~/.bashrc (assuming that you are using bash as your shell): export MACOSX_DEPLOYMENT_TARGET=10.3 Then start a new Terminal.app window (the change doesn't take effect until a new shell is started). I haven't needed to do this w

Re: problem with setup.py

2005-09-17 Thread Robert Kern
the finder, so you have to edit it from the terminal. $ open ~/.bashrc That should open it in TextEdit.app . -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Roguelike programmers needed

2005-09-18 Thread Robert Kern
Thomas Jollans wrote: > what exactly is RPG/roguelike etc ? (what debian package provides an > example?) Google is your friend. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard

Re: Validating XML parsers

2005-09-19 Thread Robert Kern
but found no > mention of w3.org schemas. Apparently not all that came up. http://codespeak.net/lxml/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: slice lists

2005-09-19 Thread Robert Kern
The syntax was there since 1.4 for the Numeric module[1], but the list object itself wasn't updated to utilize that syntax until later. [1] http://numeric.scipy.org -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows paths, Java, and command-line arguments, oh my!

2005-09-19 Thread Robert Kern
he config file in c:\config). What doesn't work is > these two lines: > > cmd = r'java -jar sforcedataloader.jar -Dc:\config' That's not the same thing as the examples you give above. Namely, you're missing the "salesforce.config.dir=" which is probably pretty

Re: Best Encryption for Python Client/Server

2005-09-19 Thread Robert Kern
> SSH can be used for functionality like this, through tunneling. You > can even > tunnel interprocess communication through SSH. Its not exceptionally > complicated. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the grave

Re: Best Encryption for Python Client/Server

2005-09-19 Thread Robert Kern
essor Indeed. As I am a grad student, that would have been most embarassing. And I do *not* recommend Googling "asshole" without SafeSearch on. *shudder* -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die

Re: Best Encryption for Python Client/Server

2005-09-20 Thread Robert Kern
ation of SSH is provided by the package Paramiko. Good luck. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Classes derived from dict and eval

2005-09-20 Thread Robert Kern
ned by compile(). The globals must be a dictionary and locals can be any mappping, defaulting to the current globals and locals. If only globals is given, locals defaults to it. globals needs to be a real dictionary. The implementation uses the C API, it doesn't use the overridden

Re: Finding where to store application data portably

2005-09-20 Thread Robert Kern
it may not have pygame but > it definitely has python). Surely this is something that's crying out > for an official function in os or sys. On OS X, the data should probably go to ~/Library/Application Support/Bombz/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wher

Re: Perl's documentation come of age

2005-09-21 Thread Robert Kern
not use silly+walks instead. Is this really a significant problem for you? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: C#3.0 and lambdas

2005-09-21 Thread Robert Kern
l that would require something like this: low_level_drawline(x1, y1, x2, y2) that isn't amenable to *argument unpacking. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: I am not able to setup pydb2 ! Any help !

2005-09-21 Thread Robert Kern
ands >or: setup.py cmd --help > > error: no commands supplied > > > Please let me know , what should have been the issue. You have to give it a command. You probably want python setup.py install -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the

Re: negative integer division

2005-02-07 Thread Robert Kern
ib/typesnumeric.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
ld force the program as a whole to follow the GPL terms. However, I certainly don't have the money to pony up to run a test case. Consequently, I try to follow the wishes of the copyright holder. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
what uninformed about others, he doesn't deserve this vitriol. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
uire actual case law, not just the opinion of a lawyer), then I might consider disregarding the author's interpretation and going with what case law and my lawyer suggests. I don't believe that this situation holds with respect to this issue, of course. -- Robert Kern [EMAIL PROT

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
s/press-release/release_2002_14.html [2] http://www.rosenlaw.com/oslbook.htm -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Believe me, I share your frustration every time this issue comes up. However, I think it's best to follow Robert Heinlein's maxim: "Never attribute to malice what can adequately be explained by stupidity." that's Hanlon, not Hei

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Fair enough. The only time I've seen it in dead-tree print was in Heinlein's _Time Enough For Love_, unattributed to anyone else. if that's true, it would seem that it predates the Hanlon reference by a couple of years: http://www.statu

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Kent Johnson wrote: Fredrik Lundh wrote: Robert Kern wrote: Fair enough. The only time I've seen it in dead-tree print was in Heinlein's _Time Enough For Love_, unattributed to anyone else. Amazon.com "search inside the book" finds no hits for "malice" in this

Re: Python-libnjb on macosx

2005-02-10 Thread Robert Kern
owing command: ld -dynamic -dylib -L/sw/lib -L/sw/lib/python2.3/config njb_c_wrap.o -o _njb_c.dylib -lpython2.3 -lnjb -lSystem -framework IOKit -ldylib1.o Try to write a distutils setup.py script. It should take care of the correct linker arguments for you. -- Robert Kern [EMAIL PROTECTED] "In the

Re: [N00B] What's %?

2005-02-11 Thread Robert Kern
administrata wrote: sry, i don't know much about maths What is % used for? such as? Among many other things, you can use it to test whether one integer evenly divides another integer. For example, to test if a number is odd: def isodd(x): return bool(x % 2) -- Robert Kern [EMAIL PROT

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
t I haven't seen anything of the sort. http://www.fastio.com/licensePlain.html See their license option for shareware developers. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
Jeremy Bowers wrote: On Fri, 11 Feb 2005 14:45:09 -0800, Robert Kern wrote: Until such matters are unequivocally determined in a court that has jurisdiction over you, do you really want to open yourself to legal risk and certain ill-will from the community? Huh? What are you talking about? I&#

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
community? I'll reiterate my strategy: follow the intentions of the copyright owner unless if I have actual case law on my side. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Hack with os.walk()

2005-02-12 Thread Robert Kern
7;m pretty sure this has been discussed at some point. I completely forget the results of said discussion (except the part where it wasn't going in yet, although you can't really call that "remembering" so much as "deducing from the current state of affairs"). -- Robe

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
not a sense of entitlement. If this does not appeal to you, then perhaps the Python community is not the right one for you. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
Ilias Lazaridis wrote: Robert Kern wrote: [snip] The answer to most of your questions is, "Because no one has yet volunteered their time and effort to get the job done." this answer do not fit in most questions. > please review them again. Against my better judgement, I have. It cer

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
y the GNU GPL." If I understand this right, I cannot produce commercial software with the cygwin toolset. Wait, you demand a completely open source toolchain on a proprietary operating system to develop proprietary software? The mind *boggles*. -- Robert Kern [EMAIL PROTECTED] "In the

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
Ilias Lazaridis wrote: Robert Kern wrote: Ilias Lazaridis wrote: Robert Kern wrote: [snip] The answer to most of your questions is, "Because no one has yet volunteered their time and effort to get the job done." this answer do not fit in most questions. please review them again.

Re: image fourier transform

2005-02-14 Thread Robert Kern
=None, axes=(-2,-1)) The 2d fft of a. This is really just fftnd with different default behavior. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Commerical graphing packages?

2005-02-14 Thread Robert Kern
without any tweaking. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: calculate with date

2005-02-15 Thread Robert Kern
ate(year, month, day) date1 = date0 + datetime.timedelta(days=100) newdatestring = '%.2d.%.2d.%.4d' % (date1.day, date1.month, date1.year) return newdatestring You may want to do the details differently, but datetime is the module that you want to use. -- Robert

Re: Variables.

2005-02-16 Thread Robert Kern
e-textwrap.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, Matlab and AI question

2005-02-18 Thread Robert Kern
elp in translating the code. Anyone have any input on what the best tool for the job would be? I've googled, but I figure it's best to ask experience ;) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&quo

Re: Python, Matlab and AI question

2005-02-18 Thread Robert Kern
I've added a link to the Scipy Wiki: http://www.scipy.org/wikis/topical_software/TopicalSoftware -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Robert Kern
ipped some of the email you were replying to. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: [PyGTK] Resizing a HandleBox

2005-02-21 Thread Robert Kern
oblem? I'm afraid I don't, but I'll bet that someone on the PyGTK mailing list does. http://www.daa.com.au/mailman/listinfo/pygtk -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harte

Re: weird strings question

2005-02-25 Thread Robert Kern
num = {} string2num['t'] = 45 string2num['e'] = 89 etc. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Met Problem with Distutils

2005-02-28 Thread Robert Kern
short, use the --install-scripts command-line option, or the setup.cfg/.pydistutils.cfg snippet: [install] install_scripts=... -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Mar 1)

2005-03-01 Thread Robert Kern
Cameron Laird wrote: Also, has anyone indexed Python bloggers (that is, webloggers of things Pythonic)? Certainly. http://mechanicalcat.net/pyblagg.html http://planetpython.org/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allow

Re: Faster way to do this...

2005-03-01 Thread Robert Kern
of 2, 4, 8 etc. as well as other things. Like nums = range(0, 100, 4) ? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Help- Recursion v. Iter Speed comparison

2005-03-01 Thread Robert Kern
ches until they're really called for. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Help- Recursion v. Iter Speed comparison

2005-03-02 Thread Robert Kern
EP 255 isn't helping me. No, the generator call creates a generator object which you iterate over. for value in f2(myfunc, seed, n): print value If you absolutely need a list: list(f2(myfunc, seed, n)) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows hi

Re: Faster way to do this...

2005-03-02 Thread Robert Kern
g C++ code with the equivalent Python code. I find it clearer and more terse than simply commenting in English! If you used literate programming tools, you might be able to get a Python version and a C++ version of your code in one go! -- Robert Kern [EMAIL PROTECTED] "In the fields of hell

Re: Distributing applications

2005-03-02 Thread Robert Kern
Jaime Wyant wrote: Sneaky! I like it. Now if there was only a subversion python module... Google, and you shall find. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.

Re: Help- Recursion v. Iter Speed comparison

2005-03-03 Thread Robert Kern
actuary77 wrote: Robert Kern wrote: actuary77 wrote: # # non-generator # def f1(afunc,aseed,n): values = [afunc(aseed)] for i in range(n-1): values.append(afunc(values[-1])) return

Re: Fast 2d brown/pink noise generation?

2005-03-04 Thread Robert Kern
for i in range(size): data[i] = self.getNextValue() return data def sampleData(self, size=1024): data = self.getManyValues(size) p = power(absolute(fftshift(fft(data))), 2)/size f = fftshift(fftfreq(size)) return data, f, p -- Robert Kern [EMAIL PROTECTE

Re: Dictionaries of Lists

2005-03-07 Thread Robert Kern
works just fine. It is only the key that needs to be hashable. The value can be any object. What is the best workaround? I don't mind making my lists immutable. Is there a way to tupelize them? tuple(mylist) I tried mydict[mykey]=([a for a in list]) but it didn't seem to work. -- Rob

Re: Mysterious "Attribute Errors" when GUI Programming

2005-03-07 Thread Robert Kern
DON'T. No, searching the source code for Tkinter shows no "Toplevel.pack" method (or in any of its base classes). Where is this program coming from? As for your GTK example, you have incorrect indentation. What I want to know is what kind of bugs either in my source code or in Pyt

Re: Mysterious "Attribute Errors" when GUI Programming

2005-03-08 Thread Robert Kern
k2tutorial/ch-GettingStarted.html#sec-HelloWorld -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Etiquette on job posts

2005-03-10 Thread Robert Kern
http://www.python.org/Jobs.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: About Databases...

2005-03-11 Thread Robert Kern
s possible) reduce the size of the DB? And what about speed in storing/retrieving data? If your data is numeric, you'll probably want to use PyTables. http://pytables.sourceforge.net/html/WelcomePage.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: Licensing Python code under the Python license

2005-03-11 Thread Robert Kern
ase consider the following licenses instead: http://www.opensource.org/licenses/bsd-license.php http://www.opensource.org/licenses/mit-license.php http://www.opensource.org/licenses/afl-2.1.php -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: try / except not worknig correctly

2005-03-12 Thread Robert Kern
# .if myInput == 'G':break # .if myInput == 'H':break # .if myInput == 'I':break # .if myInput == 'J':break # .if myInput == 'K':break # . if myInput == 'L':break # .

Re: Turning String into Numerical Equation

2005-03-12 Thread Robert Kern
Artie Gold wrote: [BTW -- cultural question: Do we top-post here?] Please don't. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloading the "and" operator

2005-03-12 Thread Robert Kern
Fredrik Bertilsson wrote: I am trying to overload the "and" operatior, but my __and__ method is never called. __and__ overloads the "&" operator. The "and" keyword cannot be overloaded. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the gra

Re: Why is lower() deprecated and how should I replace it?

2005-03-13 Thread Robert Kern
CaSE.' In [2]: s.lower() Out[2]: 'i am a happy little string that wants to be lower case.' -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: OS X and Tkinter

2005-03-14 Thread Robert Kern
http://www.pythonmac.org/packages/MacPythonPantherAddons-2-py2.3-macosx10.3.zip It will install the _tkinter extension module. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.

Re: OS X and Tkinter

2005-03-14 Thread Robert Kern
Robert Kern wrote: Mike Tuller wrote: I recently purchased a book to learn python, and am at a part where I want to start working with GUIs. I have an OS X system, and am using the default python installed on the system. I have installed Tcl/Tk Aqua from http://tcltkaqua.sourceforge.net

Re: code for Computer Language Shootout

2005-03-15 Thread Robert Kern
sage using top(1) is a quick and dirty way. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: code for Computer Language Shootout

2005-03-15 Thread Robert Kern
for line in sys.stdin: if line.startswith('>') or line.startswith(';'): if seqlines: revcomp(seqlines) sys.stdout.write(line) seqlines = [] else: seqlines.append(line.strip()) revcomp(seqlines) i

Re: Why tuple with one item is no tuple

2005-03-16 Thread Robert Kern
ink about the zen of: , Is that a tuple or grit on my monitor? :-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Text-to-speech

2005-03-19 Thread Robert Kern
to handle this on both platforms, but I guess I'm asking too much -- it's too hardware dependent, I suppose. Any hints? Googling around a bit, I get http://www.freebsoft.org/speechd http://www.festvox.org/festival/ http://www.speech.cs.cmu.edu/flite/ Some of them might be useful as a s

Re: Parallel Python on PowerMac?

2004-11-29 Thread Robert Kern
Alan Kennedy wrote: Although, iff your prospective machine supports System V IPC, you might want to check out PoSH. http://poshmodule.sourceforge.net It uses inline assembly, so that's a no-go on the PPC unless someone ports the assembly code. -- Robert Kern [EMAIL PROTECTED] "In the

Re: Numeric: 'where' function conditions

2004-11-29 Thread Robert Kern
; data <= 7),1,0) but, this won't work. Right. "3 < data" creates an array of 0s and 1s where the condition is false and true, respectively. You don't need where() at all. Try mask = logical_and(3 < data, data <= 7) -- Robert Kern [EMAIL PROTECTED] "In the fiel

Re: Random number generation from functions

2004-11-30 Thread Robert Kern
. Generating random numbers from an arbitrary pdf is possible, but tricky. I encourage you to search the literature for "monte carlo sampling." [1] http://www.scipy.org -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed t

Re: PySQLLite Speed

2004-12-02 Thread Robert Kern
commend that you look at PyTables if all of your data is numerical, as it seems to be. http://pytables.sourceforge.net -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: 3D plotting library / OpenGL

2004-12-07 Thread Robert Kern
hat I could render as I wish. Any pointers, ideas, or suggestions? OpenGLContext might be your cup of tea. Or Zoe. I don't have much experience with them, though. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die."

Re: 3D plotting library / OpenGL

2004-12-08 Thread Robert Kern
Andrew Dalke wrote: Robert Kern: Here are the instructions that I posted to the PythonMac mailing list a while ago: Thanks. I am able to build and install VTK as per your instructions, except that I don't see an option for Toggle VTK_USE_GL2PS on (useful for printing). Oops. Sorry. Pre

Re: collaborative editing

2004-12-10 Thread Robert Kern
via the Web? Why doesn't LaTeX/DocBook with a central CVS/Subversion repository work for what you want to do? Personally, I loathe writing at any length inside a Web browser and prefer to use a real editor at all times. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the g

Re: style query: function attributes for return codes?

2004-12-10 Thread Robert Kern
strange return value. Another disadvantage is that one must compare the return value by value and not by name. That is, I cannot do something like this: code = get_connection() if code == NO_SERVER: ... -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Ar

Re: Upgrade woes: Numeric, gnuplot, and Python 2.4

2004-12-11 Thread Robert Kern
it's not easy for him to do it himself. He's in a similar boat as you (except that he himself doesn't need a Windows binary. Natch.). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard H

Re: Is Python good for graphics?

2004-12-15 Thread Robert Kern
itory, but it's fairly stable. http://svn.enthought.com/svn/enthought/branches/converge/kiva/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP vs. Python

2004-12-22 Thread Robert Kern
Paul Rubin wrote: JZ <[EMAIL PROTECTED]> writes: But pure speed is not the all. Python can scale better, If a system is fast enough on a single processor, it doesn't need to scale. I think he means, "scale to larger programs," not "scale to more processors." -- Ro

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Robert Kern
spy.com/words/drinktheKool-Aid.asp """ Notes: This phrase comes from the 1978 "Jonestown massacre" in which members of the Peoples Temple cult committed suicide by drinking cyanide-laced Kool-Aid (although some say the drink of choice was actually Flav-R-Aid). "

Re: Complementary language?

2004-12-25 Thread Robert Kern
ommendation: Learn Python and a language that complements it *pedagogically*. When you are fluent in Python and encounter a problem where you want to, for example, use a library written in C, then learn some C. [1] http://dirtsimple.org/2004/11/generic-functions-have-landed.html [2] http://www.gi

Re: Optional Static Typing

2004-12-25 Thread Robert Kern
ject". Being able to supply more information about types helps Starkiller keep the inferences tight and specific. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Features for a Python package manager?

2004-12-25 Thread Robert Kern
re, but I don't think Portage does, yet. OTOH, it's Gentoo, so it wouldn't surprise me, either. :-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Jython & IronPython Under Active Development?

2004-12-25 Thread Robert Kern
stead of reaching v1.0 It should be noted that Jim Hugunin no longer works on Jython although he did start the project (possibly with others, I'm not sure). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die."

Re: Features for a Python package manager?

2004-12-26 Thread Robert Kern
Georg Brandl wrote: Robert Kern wrote: Mike Meyer wrote: Nick Coghlan <[EMAIL PROTECTED]> writes: I don't know enough about Portage to answer that question. I do know any package manager which made it into the standard distribution would need to work for at least the big three platfor

<    2   3   4   5   6   7   8   9   10   11   >