How do I use SQLalchemy to treat an existing select object as a view?
I have a select object s1 and I would like to treat it as a view, so that I can join other tables onto it. I have tried something like this: s1 = select([t1], ...) s2 = s1.join(t2, t1.c.id==t2.c.id) but I get an error: sqlalchemy.exc.StatementError: Not an executable clause I have tried this: s1 = select([t1], ...) s2 = select([t1, t2], from_obj=s1.alias().join(t2, t1.c.id==t2.c.id)) but I get this error: sqlalchemy.exc.ProgrammingError: (ProgrammingError) invalid reference to FROM-clause entry for table "t1" The reason I need to do this is because s1 is returned from a function that applies a complex where clause and I'd rather not rebuild that where clause when constructing s2.
too many threads due to synch communication
How can I specify a relative path in a Python logging config file?
Python “draw() must be called with Label instance as first argument (got _WindowMetaclass instance instead)”
Writing to a file in Python inserts null bytes
Disable logging during manage.py test?
turbogears request/user object in templates and request context
Django date filter to output “am” or “A.M.”
Schedule Python Script - Windows 7
slicing arrays in numpy/scipy
Recommendations for a simple 2D graphics python library that can output to screen and pdf?
Reading numpy arrays outside of Python
Return value from thread
Is this control structure a code smell?
Django: How do I validate unique_together from within the model
Munging non-printable characters to dots using string.translate()
Error when using astWCS trying to create WCS object