Ok so managed to get _mysql working inside nuke.
I found out the version of nuke we use is using python 2.5 whereas the
system version is 2.6. So I got the python2.5 amd 64 mysql package and used:
sys.path.append( "\\\\server\\folder\\custom_location" )
and this now works perfectly!!!
This is awesome because it means I can put and update python packages on
the server while the artists can keep working without having to
uninstall/reinstall anything on their own computers.
Thanks for the help Nathan :)
On 2012/05/30 07:58 PM, Nathan Rusch wrote:
You're missing the actual _mysql module, which is the compiled library
layer that actually interacts with MySQL itself. Where did you get
that package?
-Nathan
*From:* Jared Glass <mailto:[email protected]>
*Sent:* Wednesday, May 30, 2012 8:22 AM
*To:* [email protected]
<mailto:[email protected]>
*Subject:* Re: [Nuke-python] Using the _mysql package from within nuke
Yeah that was the first thing I tried after nuke.pluginAddPath
I also tried:
|import imp
|
|mysql = imp.load_source('MySQLdb',
"C:\\Python26\\Lib\\site-packages\\MySQLdb")|
|import mysql|
With a few variations for the module name etc
Both methods seem to be fine for importing .py files but the package
I'm trying to import is a folder with .py files inside (see the
attached zip).
Thanks though Arno
On 2012/05/30 04:48 PM, ArnoB wrote:
Hey Jared,
did you try adding the path to sys.path?
import sys
sys.path.append( ("/path/to/folder/with/modules/" )
gr
Arno
On 30 mei 2012, at 15:53, Jared Glass wrote:
Hi
Does anyonw know how I can access _mysql inside of nuke?
I'v tried copying the
C:\Python26\Lib\site-packages\MySQLdb
folder to
C:\Program Files\Nuke6.1v3\lib\site-packages
but that didn't work. Also I'd prefer to rather put the MySQLdb on
our server and just import it on init of nuke with something like:
nuke.pluginAddPath("//server/nuke/plugins/python/lib/site-packages/MySQLdb",
addToSysPath=True)
Any ideas?
--
Kind Regards,
Jared Glass <mailto:[email protected]> | Technical Lead
Triggerfish Animation Studios <http://www.triggerfish.co.za/>
Zambezia Movie <http://www.zambeziamovie.com/> | Khumba Movie
<http://www.triggerfish.co.za/khumba/>
_______________________________________________
Nuke-python mailing list
[email protected]
<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected],http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python