Omy Posted December 8, 2011 Share Posted December 8, 2011 I have used set contents to pass the script to a python module in the edit parameter window now I have a problem with python scripting whenever I pass t2=t1.split('\\n') by setcontents method to the python module the code gets passed as t2=t1.split('\n') ? I have also tried t2=t1.split(r'\\n')but no results! any solutions? Quote Link to comment Share on other sites More sharing options...
Solitude Posted December 8, 2011 Share Posted December 8, 2011 I have used set contents to pass the script to a python module in the edit parameter window now I have a problem with python scripting whenever I pass t2=t1.split('\\n') by setcontents method to the python module the code gets passed as t2=t1.split('\n') ? I have also tried t2=t1.split(r'\\n')but no results! any solutions? t2=t1.split('\n') seems to work fine for me... what does your string look like / what are you expecting to return? Quote Link to comment Share on other sites More sharing options...
3dbeing Posted December 8, 2011 Share Posted December 8, 2011 (edited) I believe if you want the litteral string to be passed as is without any expansion of special characters you can """//n""" this will evaluate to //n Edited December 8, 2011 by 3dbeing Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted December 9, 2011 Share Posted December 9, 2011 r'\\n' should work. Atleast if \\n is really what you wan't to pass into it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.