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 
Sent: Wednesday, May 30, 2012 8:22 AM
To: [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 | Technical Lead 
    Triggerfish Animation Studios 
    Zambezia Movie | Khumba Movie
    _______________________________________________
    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

Reply via email to