Ning wrote:
> Hello
>
> I am new to python. I have got two version of SQLAlchemy, 0.4.0 and
> 5.5.
>
> Some of my old script built in 0.4.0, and I do not want to change the
> script.
>
> Is that any way I can define in the script to use SQLAlchemy 0.3.11
> for my old script and 5.5 for my new script?
>
>   
I use this code:
if not hasattr(sys, 'frozen'):
    import pkg_resources
    pkg_resources.require("sqlalchemy") # get latest version
##    pkg_resources.require("sqlalchemy==0.4.3") # use a specific version

Use the last line and set it to the version you want.  I check for 
"frozen" as a deploy with py2exe and this would not work for the 
py2exe'd version.

Werner

--

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.


Reply via email to