Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > Thanks, now I am not getting that error, but now I am getting a > > different error: > > ---------------------error------------------------------- > > GLPK("C:\Documents and > > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) > > File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line 114, > > in solve > > return lp.solve(self) > > File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line > > 1740, in solve > > status = solver.actualSolve(self) > > File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line 188, > > in actualSolve > > raise "PuLP: cannot execute "+self.path > > PuLP: cannot execute C:\Documents and > > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples" > > ------------------------------------------------------------- > > can anyone tell me where the problem is? I am using following code. > > > GLPK("C:\Documents and > > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) > > The last character in that string is a double quote. You don't want that. What > you want to do is escape all of the backslashes (or use raw strings to avoid > the > escaping altogether). E.g. > > "C:\\Documents and Settings\\Amit\\Desktop\\glpk-4.9\\glpk-4.9\\examples\\" > > or > > r"C:\Documents and Settings\Amit\Desktop\glpk-4.9\gplk-4.9\examples\" > The second example won't work: you can't have a final backslash in a raw string!
-- http://mail.python.org/mailman/listinfo/python-list