Re: Accessing objects at runtime.

2009-09-11 Thread Gary Duzan
ely available template engines or other web framework pieces. When you move to different processes and/or machines, the access method can remain the same by varying the port and/or hostname in the URL. Good luck... Gary Duzan

Re: for key, value in dict.() - how to get? (which func)

2009-08-12 Thread Gary Duzan
In article , dmitrey wrote: >hi all, >which method should I use to get iterator over (key, value) pairs for >Python dict, Python v 2.6 and above? dict.iteritems() >>> import sys >>> for (key, value) in sys.modules.iteritems(): print key, value

Re: Automate rsync w/ authentication

2009-07-11 Thread Gary Duzan
Exec, '-a', '-v', '--dry-run', '-e', rshArg, source, dest] or: rshArgs = [ '-e', '/usr/bin/ssh -i /home/bry/keys/brybackup.key' ] args = [rsyncExec, '-a', '-v', '--dry-run'] + rshArgs + [ source, dest] Gary Duzan Motorola H&NM -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't this work in Eclipse ? (Simple pexpect code that works in bash)

2009-01-30 Thread Gary Duzan
the stdin of the parent is a real (or possibly pseudo-) terminal, which appears not to be the case for programs run through Eclipse. Gary Duzan -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamically load from module import xxx

2008-07-02 Thread Gary Duzan
7;modulename.xxx', fromlist=['xxx']) Seems a bit weird to me, but that's the way it is, and I'm sure there is a reason for it. Good luck. Gary Duzan Motorola H&NM -- http://mail.python.org/mailman/listinfo/python-list

Re: passing *args "recursively"

2008-05-13 Thread Gary Duzan
, 2, 3) as func1! ># there must be some better way than args[0]? > >def func1(*args): > >print args # (1, 2, 3) >func2(args) func2(*args) # <<<<<<== > >func1(1,2,3) Gary Duzan Motorola H&NM -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning curve for new database program with Python?

2008-04-08 Thread Gary Duzan
understands) with multiple processes hitting it, and so our efforts to integrate Hibernate haven't been terribly smooth. In this environment the hack seems to be to have Hibernate write to its own tables, then have stored procedures sync them with the old tables. Not pretty.

Re: Why not a Python compiler?

2008-02-07 Thread Gary Duzan
r Wars reference, which is quite on topic for this subthread. http://starwars.wikia.com/wiki/Kessel_Run Gary Duzan Motorola H&NM -- http://mail.python.org/mailman/listinfo/python-list

Re: Python too slow?

2008-01-17 Thread Gary Duzan
hrown out by the compiler in favor of non-generic types, and casts are inserted as necessary. Practicality wins over Purity again. Gary Duzan Motorola HNM -- http://mail.python.org/mailman/listinfo/python-list

Re: JPype - passing to Java main

2007-08-15 Thread Gary Duzan
p:121 >--END ERROR- > >Thanks, >Sarah Just a guess, but try com.JPypeTest.main(["arg"]). Gary Duzan Motorola HNM >On Aug 14, 8:03 am, Laurent Pointal <[EMAIL PROTECTED]&g

Re: File handle not being released by close

2007-07-31 Thread Gary Duzan
t;f=open(fileBeginning+".tmp", 'w') >f.write("Hello") >f.close f.close() Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: My newbie annoyances so far

2007-04-28 Thread Gary Duzan
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > >(P.S. PEP 3117 is a joke, right?) I expect so, especially given its creation date. Gary Duzan Motorola CHS -- http

Re: distributing python software in jar like fashion

2007-03-17 Thread Gary Duzan
ot; to execute it, with no need for anything but the base Python to be installed on the remote site, and just one file to copy. Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: distributing python software in jar like fashion

2007-03-16 Thread Gary Duzan
actly what you want Real Soon Now. http://groups.google.com/groups/search?q=group%3Acomp.lang.python+squisher&qt_s=Search Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: Python taught in schools?

2006-06-26 Thread Gary Duzan
nd leaving the students with both theoretical and practical foundations on which to build. Gary Duzan Motorola CHS p.s. Then sock them with ML or Haskell to weed out the weak ones. ;-) Then if they survive Occam, throw Java at them, so they'll

Re: simultaneous assignment

2006-05-02 Thread Gary Duzan
g for the other spy. The details are left as an exercise for the reader. :-) Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread Gary Duzan
reading TIFFs and runs on multiple platforms, including Windows. http://www.pythonware.com/products/pil/ Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: Newcomer question wrt variable scope/namespaces

2006-01-17 Thread Gary Duzan
t; b [1, 2, 6] >>> ===== It is easy to think that the scoping rules give you read-only behavior, but with mutable objects it just isn't correct. Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: Newcomer question wrt variable scope/namespaces

2006-01-13 Thread Gary Duzan
, not the 'a' variable itself. The rule is limited to the rebinding of variables, not the modification of the objects to which they refer. Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: how to improve this simple block of code

2006-01-11 Thread Gary Duzan
losing leading zeros as well: x = x.strip('0') Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list