proc(f) isn't a callable, it's whatever it returns. IIRC, you need to do
something like 'start_new_thread(proc, (f,))'
--
https://mail.python.org/mailman/listinfo/python-list
Have you tried a conditional/try-catch block in your __init__? Something like
class MyDBConn(object):
def __init__(self, **db_kwargs):
try:
db = some_db.connect(**db_kwargs)
except some_db.ConnectionError:
db = my_fake_db()
I'm 100% in favor of expanding Unicode until the sun goes dark. Doing so helps
solve the problems affecting speakers of "underserved" languages--access and
language preservation. Speakers of Mongolian, Cherokee, Georgian, etc. all
deserve to be able to interact with technology in their native la
I second the call for a more concrete implementation, but if you want the
results of the functions in c3 to be responsive to the values of c1 and c2
(i.e., if you change r1c1, r1c3 returns a different value), it might be worth
encapsulating the whole thing in an object and making the c3 function
Hi all,
I'm trying to use Pex (http://pex.readthedocs.org/en/latest/index.html) to
include requests in a little script to ping a server from a machine that
doesn't come with pip (or much of anything, really) installed. I'm running
into problems outputting a pex file that depends on a local script.
On Tuesday, October 21, 2014 12:05:00 PM UTC-4, Chris Angelico wrote:
> On Wed, Oct 22, 2014 at 2:34 AM, Sam Raker wrote:
>
> > (Also: anyone who's planning on chewing me out about formatting: I TRIED
> > posting by email to comp.lang.pyt...@googlegroups.com, but it woul
Hi all,
I'm trying to use Pex (http://pex.readthedocs.org/en/latest/index.html) to
include requests in a little script to ping a server from a machine that
doesn't come with pip (or much of anything, really) installed. I'm running into
problems outputting a pex file that depends on a local scrip
1) There are, if you want to mess around with them, ways to make pickle
"smarter" about class stuff:
https://docs.python.org/2/library/pickle.html#pickling-and-unpickling-normal-class-instances
. I've never worked with any of this stuff (and people don't seem to like
pickle all that much), and