Signal only works in main thread

2011-07-25 Thread RVince
I am instantiating an SSH client class using this class:

http://www.goldb.org/sshpython.html

With the following code:

sSHController = SSHController('xxx', 'root', 'password', '#')
sSHController.login()

Whereupon, at login(), it fails with a :

ValueError: signal only works in main thread

I'm at a complete loss here. Can someone please point me in the right
direction to solving this?   Thanks,
RVince
-- 
http://mail.python.org/mailman/listinfo/python-list


Directly executing from an egg

2011-08-23 Thread RVince
I have created an egg file with one source file in it, hello.py (I
just want to go through the entire uild/install/execute cycle using
egg files). I create it fine, and now I want to execute the eg file
directly (i.e. run it without unpacking or easy_install'ing it). So
when I invoke it from the directory the egg is in with:

python 'hello-1.0-py2.6.egg

I get:

can't find '__main__.py' in 'hello-1.0-py2.6.egg'

How do I remedy this? I've looked through the docs but it seems
ambiguous on this point to me. Below is the setup section from my
setup.py which I used to create this egg. Thank you, RVince

setup(
name='hello',
version='1.0',
description='',
author='',
author_email='',
install_requires=[
"SQLAlchemy>=0.4",
"psycopg2",
],
zip_safe=False,
entry_points="""
[hello]
hello = hello:hello_app
""",
)
-- 
http://mail.python.org/mailman/listinfo/python-list


Argument count mismatch

2011-04-21 Thread RVince
I am getting the following:

Error - : cmseditorlinemethod() takes
exactly 2 arguments (1 given)

When I make the following call:

http://localhost/eligibility/cmseditorlinemethod/474724434

Which invokes:

def cmseditorlinemethod(self, ssn):
c.details =
Session.query(MSPResponse).filter(MSPResponse.beneficiaryssn ==
ssn).all()
content = render('/cmseditorline.mako')
return content

Can anyone tell me what the mismatch is in the number of my parameters
based on this? Thanks, RVince
-- 
http://mail.python.org/mailman/listinfo/python-list


Obtaining a full path name from file

2011-05-24 Thread RVince
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")

How do I obtain the full pathname given the File, f? (which should
equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
and am just not finding it. Any help greatly appreciated !
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Obtaining a full path name from file

2011-05-24 Thread RVince
Ha! You;re right -- but is there a way to get it without the filename
appended at the end?

On May 24, 11:52 am, Tim Golden  wrote:
> On 24/05/2011 16:36, RVince wrote:
>
> > s = "C:\AciiCsv\Gravity_Test_data\A.csv"
> > f = open(s,"r")
>
> > How do I obtain the full pathname given the File, f? (which should
> > equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
> > and am just not finding it. Any help greatly appreciated !
>
> You're going to kick yourself:
>
> f.name
>
> TJG

-- 
http://mail.python.org/mailman/listinfo/python-list


Installing dependencies in Windows

2011-02-22 Thread RVince
Im installing to a Win7 machine, duplicating a CentOS setup. The
dependences in CentOs for a particular project are:
_ldap.so
dsml.py
easy-install.pth
ldap
ldapurl.py
ldapurl.pyc
ldapurl.pyo
ldif.py
libxml2.py
libxml2.pyc
libxml2mod.a
libxml2mod.la
libxml2mod.so
libxslt.py
libxslt.pyc
libxsltmod.a
libxsltmod.la
libxsltmod.so

I have easy_install setup in windows. These are the non-egg
dependencies I need to install in Windows. Where do I get them ? Where
do I put them? (I assume the .so files will be .dll in Windows, but I
dont know where to get these, put these) Anyone have a clue on this?
Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list