Re: The Industry choice

2005-01-07 Thread Robert Kern
at you found out quickly and avoid getting sued even though you might end up winning. You also avoid inadvertantly stepping on anyone's toes and garnering ill-will even if you never go to court. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the g

RE: DOS problem (simple fix??)

2005-01-07 Thread Robert Brewer
t; > Thank you, and please make all answers simple enough to be understood > by a highschool student and his father :) . Even after all the IPO hype, the map integration, and the Suggest beta, Google is STILL your friend: http://www.google.com/search?q=windows+console+remain+open In other

RE: Display Function Code Body?

2005-01-07 Thread Robert Brewer
You can do this with lambdas with my LambdaDecompiler inside: http://www.aminus.org/rbre/dejavu/codewalk.py If you want to extend it to full functions, be my guest. ;) There's also a commercial decompiler out there called "decompyle", and they even have a web service. http://www.crazy-co

RE: switching an instance variable between a property and a normal value

2005-01-07 Thread Robert Brewer
_get__(self, obj, objtype=None): if obj is None: return self# Return whatever you like here if self.fget is None: raise AttributeError, "unreadable attribute" return self.fget(obj) That might be one way to get what you want. Robert Brewer MIS Amor Ministries [EMAIL

RE: Exception report library

2005-01-07 Thread Robert Brewer
of startup/shutdown functions 6. Registry of active user interfaces I think the first three are all good candidates for a standard. If we had a standard, thread-safe Application object, the rest could be registerable plugins for that. You'd basically register callbacks for app.startup an

RE: switching an instance variable between a property and a normal value

2005-01-07 Thread Robert Brewer
_getitem__(self, key) def setdefaultvalue(self, value): self._default = value self._call_default = isinstance(value, ftypes) ...or: def setdefaultvalue(self, value, call_callables=True): self._default = value self._call_default = callable(value) and call_callables Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Exception report library

2005-01-07 Thread Robert Brewer
. So, you could write WSGI consumers of them, but they wouldn't be WSGI-specific in my mind. If they were, they'd just add to the "several systems" you were lamenting... ;) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-07 Thread Robert Kern
onal sense of whimsy. -- 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: there's a socket.sendall(), so why no socket.recvall()?

2005-01-08 Thread Robert Brewer
ng recvall would just duplicate that, I think. But that's desirable IMO. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python3: on removing map, reduce, filter

2005-01-09 Thread Robert Kern
return x*x map(square, range(1000)) versus [x*x for x in range(1000)] Hint: function calls are expensive. -- 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: Python3: on removing map, reduce, filter

2005-01-09 Thread Robert Kern
nd filter would be removed?" Since Python 3.0 is currently mythical and will involve a complete rewrite of the language and interpreter, I don't think that you should expect any optimization advice to carry over. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the gr

RE: Writing huge Sets() to disk

2005-01-10 Thread Robert Brewer
one as a value. The items in a set are unique. > > How can I write them efficiently to disk? got shelve*? Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] * the "shelve" module in the standard library, that is. -- http://mail.python.org/mailman/listinfo/python-list

RE: Writing huge Sets() to disk

2005-01-10 Thread Robert Brewer
Martin MOKREJŠ wrote: > Robert Brewer wrote: > > Martin MOKREJŠ wrote: > > > >> I have sets.Set() objects having up to 20E20 items, > >>each is composed of up to 20 characters. Keeping > >>them in memory on !GB machine put's me quickly into swap. &g

RE: Uploading files

2005-01-10 Thread Robert Brewer
filename = value.filename except AttributeError: filename = None if filename: # Store filename, filedata as a tuple. self.requestParams[key] = (filename, value.value) else: for subValue in form.getlist(key): self.requestParams[key] = su

Re: complex numbers

2005-01-11 Thread Robert Kern
interpreter, writing C extensions that use complex objects is a little simpler. You don't have to include special header files and make sure the correct module is imported before using complex objects in the C code (like you have to do with Numeric, for example). -- Robert Kern

Python setup question

2005-01-11 Thread Robert Lin
Hi, Sorry for this newbie question, I was wondering if anyone knows why when I run the test, the "test_anydbm" test will seg fault and the tests "test_aepack" and "test_al" are skipped? Thanks in advance. ______   Robert

Re: complex numbers

2005-01-12 Thread Robert Kern
It's me wrote: "Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] That's *it*. So, how would you overload an operator to do: With native complex support: def twice(a): return 2*a print twice(3+4j), twice(2), twice("abc") Let's

Matrix-SIG archives

2005-01-12 Thread Robert Kern
tions of a particular design decision in Numeric. Thanks in advance. -- 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: why are people still using classic classes?

2005-01-12 Thread Robert Brewer
Simon Wittber wrote: > Is there a legitimate use for classic classes that I am not aware of? As was pointed out to me when I asked on this list just a short while ago ;) classic classes can be faster. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listi

RE: module on files & directories

2005-01-13 Thread Robert Brewer
ib/module-os.path.html>. I suspect you will also want to look at os.walk() eventually: for root, dirs, files in os.walk(path): for dir in dirs: do_something_with(dir) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: News Reader

2005-01-13 Thread Robert Kern
Daniel Bowett wrote: Is anyone reading this list through thunderbird as news? If so - how did you set it up? I subscribed to comp.lang.python under my USENET news server account. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams al

Re: News Reader

2005-01-13 Thread Robert Kern
Robert Kern wrote: Daniel Bowett wrote: Is anyone reading this list through thunderbird as news? If so - how did you set it up? I subscribed to comp.lang.python under my USENET news server account. I guess I should add that that's all I did. There's nothing special to set up. -- R

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Robert Kern
aries) That gets ugly real fast.) Not to mention all the IUPAC symbols for incompletely specified bases (e.g. R = A or G). http://www.chem.qmul.ac.uk/iubmb/misc/naseq.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allo

RE: python to mssql

2005-01-14 Thread Robert Brewer
Brane wrote: > can someone please give me some info regarding subject http://sourceforge.net/projects/mysql-python Ask a broad question... Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: hash patent by AltNet; Python is prior art?

2005-01-15 Thread Robert Kern
rior art with respect to cryptographic hashes, too. -- 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: simultaneous multiple requests to very simple database

2005-01-18 Thread Robert Brewer
ry when records are written to. Just to clarify, you want shared-read until a write, at which point you want to lock just the item being written? Or would page or table locking be acceptable at that point? Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: generator expressions: performance anomaly?

2005-01-18 Thread Robert Brewer
implementation time. So why bother? That's a horrid trade off > when there are so many other real gains to be had. Especially since you can already do it explicitly with Raymond Hettinger's cookbook recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277940 Robert Bre

RE: Solutions for data storage?

2005-01-19 Thread Robert Brewer
ouple of days, and I'll have version 1.3 ready and online at http://www.aminus.org/rbre/python -- lots of changes from 1.2.6 which is there now, but at least you can read old docs online now without svn. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Accessing MDB files on Windows

2005-01-19 Thread Robert Brewer
k? I'm not a Windows guy... :-) Use ADO unless you need to support older versions of Windows. It'll be a lot faster and cleaner than ODBC. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: RuntimeError: dictionary changed size during iteration

2005-01-19 Thread Robert Brewer
e' changes that dictionary while you are iterating over it. Try either: [e for e in vars().keys()] or e = None [e for e in vars()] or the generator expression if you have Python 2.4. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Zen of Python

2005-01-19 Thread Robert Kern
your "gist" is a different meaning. It's not that "Flat is better than nested" it's that "Too flat is bad and too flat is nested so be as nested (or as flat) as you have to be and no more." Perhaps Tim Peters is far too concise for my feeble mind If it were s

RE: Solutions for data storage?

2005-01-20 Thread Robert Brewer
Leif K-Brooks wrote: > Robert Brewer wrote: > > Try svn://casadeamor.com/dejavu/trunk if you want a truly > Pythonic query > > syntax. Wait a couple of days, and I'll have version 1.3 ready and > > online at http://www.aminus.org/rbre/python -- lots of changes from

QOTW from Ryan Tomayko

2005-01-20 Thread Robert Brewer
http://naeblis.cx/rtomayko/2005/01/20/getters-setters-fuxors "...Many people coming to Python can't believe no one uses IDEs. The automatic assumption is that Python is for old grey beards who are comfortable with vi and Emacs and refuse to accept breakthroughs in programming productivity like IDE

Dejavu 1.3, a Python ORM

2005-01-20 Thread Robert Brewer
welcomes framework developers. New code for additional Storage Managers, analysis tools, or other portions will be gladly reviewed for inclusion in future releases. Drop me an email if you feel so inclined. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

ANN: P4Python 0.5 - Interface to Perforce

2005-01-21 Thread Robert Cowham
Have just released this to PyPI. http://www.python.org/pypi?:action=display&name=P4Python&version=0.5 Name: P4Python Version: 0.5 Author: Robert Cowham Author email: robert at vaccaperna co uk Home page: http://public.perforce.com/guest/robert_cowham/perforce/API/python/ind

RE: Python Scripting

2005-01-22 Thread Robert Brewer
pdate > a web-page? If the file is local: open(filename, 'w').write(content) If the file is remote and you need to upload it via ftp, check out the ftplib module in the standard library, for starters. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: error

2005-01-24 Thread Robert Toop
http://www.python.org/2.4/bugs.html ...suggests that firewall running on python host (read Windows software firewall) may block the localhost TCP connection required between IDLE parent and child processes. I don't think this problem is specific to python 2.4. IDLE should work if you change fire

Re: What's so funny? WAS Re: rotor replacement

2005-01-25 Thread Robert Kern
Python source probably get it from their Linux/FreeBSD/other distribution where such dependencies are also taken care of for them. -- 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: I want update one record using ADO,but I can't ,why?

2005-01-25 Thread Robert Brewer
output? Error message? Does your update affect the membership of the record in the keyset? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/ htm/mdconkeysetcursors.asp Why are you using keysets at all? Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: I want update one record using ADO,but I can't ,why?

2005-01-25 Thread Robert Brewer
lename with the schema, something like: "select * from %s.%s;" % (schema, tblName) It's possible the trailing semicolon is important to close the statement. The next thing to check would be permissions. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Greetings and win32 com events question

2005-01-27 Thread Robert Kaplan
t\__init__.py", line 503, in __setattr__ d.__setattr__(attr, value) File "D:\PYTHON22\Lib\site-packages\win32com\client\__init__.py", line 463, in __setattr__ self._oleobj_.Invoke(*(args + (value,) + defArgs)) TypeError: Objects of type 'instance method' can

Re: win32com/makepy question

2005-01-27 Thread Robert Kaplan
Hi, I've been looking at the client side com stuff in __init__.py in the client subdirectory under win32com, and some of the routines do exactly that. Certainly DispatchWithEvents tries to generate that, and I thought Dispatch does before returning a late binding object. Hope this helps, Bob T

RE: Best python postgres module?

2005-01-28 Thread Robert Brewer
ltiple connections i have no real > testing environment, so any advice which one to use for different > usecases would be nice. If your "use cases" involve cross-platform development (i.e. Linux and Windows), pypgsql seems to fit the bill nicely. Robert Brewer MIS Amor Mi

Re: LinearAlgebra incredibly slow for eigenvalue problems

2005-01-28 Thread Robert Kern
work just fine as static libraries. -- 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: Trouble installing numeric

2005-01-29 Thread Robert Kern
;Src', 'dlapack_lite.c') ] ] I tried uncommenting the lines, but no dice. Also modify the library_dirs_list and libraries_list variables, but keep these *_lite.c files commented out. library_dirs_list = [] libraries_list = [] That way, Numeric will just p

Re: python and gpl

2005-01-30 Thread Robert Kern
or requiring you to follow the GPL terms or pay for a license. Otherwise, they're probably SOL. If you're distributing PyQT binaries along with your package, then you should probably follow the GPL's terms. IANAL. TINLA. -- Robert Kern [EMAIL PROTECTED] "In the fields

RE: variable declaration

2005-01-30 Thread Robert Brewer
h > a feature, I just don't know about it? The feature is called "pychecker", and, although it isn't included in the standard distribution, it's readily available: http://pychecker.sourceforge.net/ Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGame not working(?)

2005-01-30 Thread Robert Kern
n you need to run your scripts with pythonw, which will run the framework's interpreter in such a way that it can communicate with the native window server. This shouldn't give you the error above, though. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grow

Re: Image stats - going from Matlab to Python

2005-01-30 Thread Robert Kern
at makes these kinds of operations simpler. -- 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: variable declaration

2005-01-31 Thread Robert Brewer
ur job depend upon it. People who study languages merely for "personal growth" learn 50% of the syntax and 1% of the concepts, and then fritter that learning away on inconsequential newsgroups the world over. Alex Z, keep using and learning Python. Let it change your brain. Robert

RE: variable declaration

2005-01-31 Thread Robert Brewer
Alex Martelli wrote: > > Robert Brewer <[EMAIL PROTECTED]> wrote: > > > Bah. Nothing teaches you a new language like having your > job depend upon > > it. People who study languages merely for "personal growth" > learn 50% of > > the syn

Re: Atlas and NumPy Problems

2005-02-01 Thread Robert Kern
for days, and I'm out of ideas. I am running OS X v10.3, gcc v3.3, Python v2.3, ScientificPython v2.4.3, and am attempting to install NumPy 23.7 Did you try to follow my advice from the other thread? What does your setup.py look like? -- Robert Kern [EMAIL PROTECTED] "In the fields of

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-02 Thread Robert Kern
ched. They also have compiled stuff that does not exist in the standard Python distribution. Back up your data and reinstall the OS. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- ht

Re: Atlas and NumPy Problems

2005-02-02 Thread Robert Kern
Robert Kern wrote: Justin Lemkul wrote: Hello all, I am hoping someone out there will be able to help me. I am trying to install a program that utilizes NumPy. In installing NumPy, I realized that I was lacking Atlas. I ran into the following problems installing Atlas and NumPy, as I

RE: Python AST Sprint

2005-02-02 Thread Robert Brewer
ph/thread/20050104.014254.b2978a88.en.html#20050104 .014254.b2978a88 That should hold you until the sprint ;) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-02 Thread Robert Kern
makes you a Python installation under /sw. But that doesn't solve his problem, which is to restore the Apple-supplied Python that he deleted. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Robert Kern
ting the Python that they provide. Future releases of Python should be easier to install *alongside* Apple's Python. -- 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: Converting a string to a function pointer

2005-02-04 Thread Robert Brewer
t any function in any module. The curse is that you can then import any function in any module. ;) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Persistence design [was: RE: OT: why are LAMP sites slow?]

2005-02-04 Thread Robert Brewer
*my* projects. ;) One of my goals for Dejavu* (my ORM) is to abstract persistence to the point that you can easily test your actual, live dataset against many potential storage mechanisms (i.e. multiple DB's, but also shelve, etc.). I need to finish the migration tools, but it's well

RE: Python Processes for Win32

2005-02-05 Thread Robert Brewer
hip.python.net/crew/theller/py2exe/). Then use: net start daemonsvc net stop daemonsvc Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: bad generator performance

2005-02-05 Thread Robert Brewer
ruly non-recursive implementation would probably exist outside of whatever class you've got this method in, and would keep its own pointer to the current node as it traversed the tree. Hope that helps, Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: SciPy gui_thread Problem

2005-06-18 Thread Robert Kern
: _ZNK6wxExpr3NthEi Something has been compiled incorrectly or shared libraries are missing. In any case, gui_thread probably won't work with wxPython 2.5. Development on gui_thread has stopped in favor of ipython's threading support. http://ipython.scipy.org http://ipython.scip

Re: Extensions on Linux: import without underscore?

2005-06-18 Thread Robert Kern
on extensions. If you must use Scons, read http://www.scons.org/cgi-bin/wiki/PythonExtensions and use SharedLibrary(... SHLIBPREFIX="", ...) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves o

Re: Extensions on Linux: import without underscore?

2005-06-18 Thread Robert Kern
James Carroll wrote: > Thanks Robert. > >>Call it bright.so . > > If I rename it bright.so, then I get the error: > ImportError: dynamic module does not define init function (initbright) Sorry, I should have been clearer. Just renaming the file won't help. The init

Re: functions with unlimeted variable arguments...

2005-06-19 Thread Robert Kern
? Oddly enough, http://docs.python.org/ref/function.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: A tool for Python - request for some advice

2005-06-21 Thread Robert Kern
make step 3 easier in the, hopefully near, future: http://peak.telecommunity.com/DevCenter/EasyInstall -- 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: getting an object name

2005-06-21 Thread Robert Kern
r object can have any number of names in various scopes or have no name at all. In particular, in your code, the same list object has 2 names in 2 scopes, "alist" in the global scope and "list" in afunction's local scope. alist = range(10) blist = alist clist = [alist]

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-23 Thread Robert Kern
he cut itself, the value, practically, depends on which end of the branch you're deciding to approach the point from. It's arbitrary; there's no correct answer; but signed zeros give a way to express some of the desired, useful but wrong answers. And floating point is about nothi

Re: A tool for Python - request for some advice

2005-06-24 Thread Robert Kern
TPJ wrote: > I've heard about this "EasyInstall" and I like this idea. > > If EI becomes a part of Python's standard library, my script will use > it. Why wait? Just make it the second thing that the script installs after Python itself. -- Robert Kern [EMAIL PR

Re: Favorite non-python language trick?

2005-06-25 Thread Robert Kern
le for when this change will take place. map, filter, and reduce are safe for quite some time. -- 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: Favorite non-python language trick?

2005-06-25 Thread Robert Kern
world, nothing stops anyone from using their own extension module implementing map, filter, and reduce if they really want to. TSBOOOWTDI in the language/stdlib, but it shouldn't stop anyone from using other ways to do it that aren't in the stdlib if the tradeoffs are right for them. -- Ro

Re: A strange and annoying restriction, possibly a bug. A glance by a more experienced would be nice.

2005-06-25 Thread Robert Kern
n over non-sequence n is a sequence. *n correctly expands. The error is that 100 is not a sequence; tuple() requires a sequence or an iterator. tuple(*n) is equivalent to tuple(100). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the g

Re: Favorite non-python language trick?

2005-06-26 Thread Robert Kern
ng. You need to differentiate a = b = 1 from a = b == 1 -- 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: unittest: collecting tests from many modules?

2005-06-26 Thread Robert Brewer
I overrode loadTestsFromName in a subclass, in order to be less verbose in exactly the way I wanted, but the default works just as well). Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Acceptance test spike example

2005-06-26 Thread Robert C.Martin
n find on a Google search. Check out "Fit For Software Development". It should be published now. - Robert C. Martin (Uncle Bob) | email: [EMAIL PROTECTED] Object Mentor Inc.| blog: www.butunclebob.com The Agile Transition Experts | web: www.objectmentor.com 800-338-6716

Re: Favorite non-python language trick?

2005-06-26 Thread Robert Kern
Terry Hancock wrote: > On Sunday 26 June 2005 06:11 am, Robert Kern wrote: > >>Terry Hancock wrote: >> >>>On Sunday 26 June 2005 05:39 am, Torsten Bronger wrote: >>> >>>>However, then you must forbid a=b=1 for assigning to two variables >>>

Re: A Module on Time & Date

2005-06-26 Thread Robert Kern
Robert Maas, see http://tinyurl.com/uh3t wrote: >>From: John Abel <[EMAIL PROTECTED]> >>time - http://docs.python.org/lib/module-time.html > > Ah, thanks! It works here, whereas: > >>datetime - http://docs.python.org/lib/module-datetime.html > > does

Re: Favorite non-python language trick?

2005-06-27 Thread Robert Kern
a.append(1) > py> b > [] > py> a = b = [] > py> a.append(1) > py> b > [1] What you wrote isn't, but what Terry wrote is. In [1]: a, b = ([],)*2 In [2]: a.append(1) In [3]: b Out[3]: [1] In [4]: a is b Out[4]: True -- 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: Modules for inclusion in standard library?

2005-06-27 Thread Robert Kern
long release distance) and useful enough to > be granted a place in the stdlib? I would like to see the setuptools/PythonEggs/EasyInstall trifecta get more attention and eyeballs. Once it is mature, I think that it will obviate the desire for stdlibification of most of the packages being req

Re: rsync protocol in python

2005-06-27 Thread Robert Kern
David Bear wrote: > I was wondering if anyone has implemented the rsync protocol in python. GIYF. http://directory.fsf.org/pysync.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Har

Re: CAB files manipulation API (again).

2005-06-28 Thread Robert Kern
r friend. http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/e9a2237d820a4964 -- 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: Dictionary to tuple

2005-06-28 Thread Robert Kern
The useless code referred to was the list comprehension. >>> t = tuple([(k,v) for k,v in d.iteritems()]) versus >>> t = tuple(d.items()) or even >>> t = tuple(d.iteritems()) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Robert Kern
; >>> v = 'mystring' > >>> o.e = v > setting e to mystring > >>> o.e > 'mystring' > >>> I think he means something like this: e = 'i_am_an_attribute' o.(e) = 10 o.i_am_an_attribute == 10 -- 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: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Robert Kern
muldoon wrote: >Now, what forum would you recommend? Any help would be appreciated. Not here. Beyond that, you're on your own. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richar

RE: Debugger Confusion

2005-06-28 Thread Robert Brewer
ve, so you can inspect program variables as you like. Start with that, and come back if you have any more questions. :) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-28 Thread Robert Kern
quires you to control the imports. It's a moot point anyways. The current ipython codebase isn't in any shape to go into the stdlib, and the rewrite hasn't quite begun, yet. Ask again in a year or two. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass gr

Re: Newbie: Explain My Problem

2005-06-29 Thread Robert Kern
ipcord after the > counter became zero. 3. Sign up for the Python-tutor list. (Okay, that's not quite "helping yourself," but it's still good advice, I think). http://mail.python.org/mailman/listinfo/tutor -- 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: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
uch of it the > "Python way", I suspect. So, I'm wondering if someone would like to show > me some of the tricks I should have used. Trick #1: import matplotlib ;-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
Jan Danielsson wrote: > Robert Kern wrote: >>Trick #1: >> >>import matplotlib > > Oh. :-) > > That's a pretty neat trick -- now can you make my embarrassment go away? > >I did do a quick search to see if anyone had done anything similar; >

Re: Inheriting from object

2005-06-29 Thread Robert Kern
u (or someone else) may decide later to subclass it and want to use those features. It's a good habit to get into even if you don't initially plan on using those features. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
Jan Danielsson wrote: > Robert Kern wrote: > [---] > >>It's okay. Just about every Pythonista in the sciences has, at one time >>or another, started a plotting library. It's a rite of passage. Welcome >>to the club. :-) > >Question: I need to in

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
between micro-releases (i.e. different z). -- 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: Newbie backreference question

2005-06-30 Thread Robert Kern
paulm wrote: > Hi, > In perl I can do something like: > > $a = 'test string'; > $a =~ /test (\w+)/; > $b = $1; > print $b . "\n"; > > and my output would be "string". > > How might this snippet be written in python? ht

Re: Modules for inclusion in standard library?

2005-06-30 Thread Robert Kern
style builds. > > How about integrating distutils and PyPI, so that distutils can > automatically download and install packages that are required by the > package it's currently installing? In other words, C-Python-AN. http://peak.telecommunity.com/DevCenter/EasyInstall -- Robert

Re: Using Numeric 24.0b2 with Scientific.IO.NetCDF

2005-06-30 Thread Robert Kern
ly simplifies certain types of code although the change does have its transition costs for some specific pieces of older code like yours. BTW, you don't want to use the builtin min(). That iterates over the array as if it were a Python list. Use minimum.reduce(). -- Robert Kern [EMAIL PR

Re: map vs. list-comprehension

2005-06-30 Thread Robert Kern
Roy Smith wrote: > Terry Hancock <[EMAIL PROTECTED]> wrote: > >>One of the strengths of Python has been that the language itself is >>small (which it shares with C and (if I understand correctly, not being >>a lisp programmer?) Lisp), but with all the syntax enhancements going >>on, Python is g

Re: shelve in a ZipFile?

2005-06-30 Thread Robert Kern
is in Python) modified to use arbitrary file-like storage. -- 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: How to run commands in command line from a script

2005-06-30 Thread Robert Kern
m('./some --command') More robust: Use the subprocess 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.python.org/mailman/listinfo/python-list

Re: How to run commands in command line from a script

2005-06-30 Thread Robert Kern
./some --command')' Read the documentation. os.system() opens up a new shell process. The command to change directories happens in that shell process, not python's process. Try another command. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wh

Re: Splitting string into dictionary

2005-06-30 Thread Robert Kern
27;fr':'la vache brun'} > > The language code is always 2 lower case letters. > > Many thanks. translations = [x.strip(" '") for x in line.split('|')] d = {} for i in range(0, 2*len(translations), 2): d[translations[i]] = translations[i+1] --

<    4   5   6   7   8   9   10   11   12   13   >