Rohan Perera schrieb:
> I am calling a matlab function which is in my file called test.py
> SINGLE_FILE_TO_CHECK="D:\study\python\Deceptive\Deceptive\ToCheck"
You should use raw strings for windows paths:
SINGLE_FILE_TO_CHECK = r"D:\study\python\Deceptive\Deceptive\ToCheck"
^^^
Otherwise the backslashes might get interpreted as special characters.
> def DetectFile():
> fullpath =SINGLE_FILE_TO_CHECK + "\\" + "OUTPUT.txt"
> y=mlab.detectfiles(fullpath)
What does the matlab.detectfiles() method do? Is it just there to check
for the existence of files? You can also use os.path.exists() for that.
http://docs.python.org/lib/module-os.path.html
> I get an exception when I call this from the controller
> File "C:\Python25\lib\site-packages\mlabwrap.py", line 477, in _do
> mlabraw.eval(self._session, "cd('%s');" % os.getcwd().replace("'", "''"))
>
> error: Unable to evaluate string in MATLAB(TM) workspace
It seems like matlab is trying to change to some directory, put parsing
that command fails. Maybe you have a space character in the path to your
TG project. Or it is related to the backslash-thing?
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---