[wingide-users] SQLAlchemy.orm

Leif Lensgraf, DC l.lensgraf at gmail.com
Thu May 6 09:01:04 MDT 2010

I’m a bit new to the whole programming thing. So be gentle please if I’ve
made a nub error.

I’ve been using python to do a fair bit of mssql database queries using
pyodbc, anyways I came across the SQLAlchemy package and seems like the
ticket for easing some of the things I want to do.

I’ve installed SQLAlchemy using easy_install  using the –Z option and
everything works fine.

When I use the statements
from sqlalchemy import *
from sqlalchemy.orm import * 
The 1st statement appears in wing without any errors, however; the 2nd
statement gets a redline under the ‘m import *’ indicating a SyntaxError –
and of course the completion function of wingide will not work with the
methods below sqlalchemy.orm.  If I ignore the “error” and code something
like Session = sessionmaker(bind=engine) – this code will execute just fine.

I’ve done a copy-cut-paste of my code into other python-ide programs and
they don’t seem to complain about the from --> sqlalchemy.orm import * --
being a syntaxerror.  I’m pasting the top of my code below.  Thanks in
advance for any ideas on how to fix this!

I should also state that the error appears even on a new editor with nothing
else typed into the editor except -- from sqlalchemy.orm import *

----------code follows----

import logging

from pylons.decorators import validate
from pylons import request, response, session, tmpl_context as c, url
from pylons.controllers.util import abort, redirect
from hhc.lib.base import BaseController, render

import formencode
from sqlalchemy import *
from sqlalchemy.orm import *

SAEngine = create_engine('mssql://mee:password@',echo=False)
metaDataSA = MetaData(SAEngine)

Session = sessionmaker(bind=SAEngine)
session = Session()

#My appointment class
class appt(object):

#Reflect the appoint table from SoftAid
appoint = Table('appoint',metaDataSA,autoload=True)

Leif L. Lensgraf, DC
Healing Health Centers

NOTICE:  This E-mail (including attachments) is covered by the Electronic
Communications Privacy Act, 18 U.S.C. §§ 2510-2521, is confidential and may
contain healthcare materials which are legally privileged and protected from
disclosure.  This e-mail is intended only for the addressee named above.  If
you are not the intended recipient, you are hereby notified that any
retention, dissemination, distribution, or copying of this communication is
strictly prohibited.  Please reply to the sender that you have received the
message in error, then delete it and any and all copies of it.   
Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20100506/93fd9038/attachment.html

More information about the wingide-users mailing list