ah sorry for not being clear what i am trying to do is save preset .so read all the values from option box and check boxes and save it to the notpad file the "/n" command is what i found online to type it in the next line and "/t" is is the tab command on the keyboard for indentation
so when i run the comand it should do the following things create a note pad file in the user pref dir called preset open the file in write mode type "i am line 1" (go to next line) type "i am line 2 " close file but in my case every thing is happening properly except for the type in the next line part hope i am clear this time Thank you for your time On Thu, Jun 4, 2015 at 12:47 PM, Justin Israel <[email protected]> wrote: > I don't know what this means. What do you mean by "printing this out in > note pad" and "not working" and "other commands like \t"? > > Please be very specific about what exactly you are trying to do, what you > expect, and what exactly the results were. > > On Thu, 4 Jun 2015 3:30 PM Sumant Shenoy <[email protected]> wrote: > >> ok i am trying to print this out in note pad line by line but but for >> some reason "\n"is not working am i doing some thing wrong because all the >> other commands like "\t" are working >> >> import maya.cmds as cmds >> path=cmds.internalVar(upd=True)+"preset.txt" >> file=open(path,'w') >> file.write("i am line 1"+"\n") >> file.write("i am line 2") >> file.close() >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CAGhqNnn75f%3DBRq6aQV34fZWE0MCraOxHrXWYxFwjSVqOnXZ%2BjA%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAGhqNnn75f%3DBRq6aQV34fZWE0MCraOxHrXWYxFwjSVqOnXZ%2BjA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Auaciu%3DppT0JS%3DBShTbMvejtVHsJBrHiQoYJ0OHQcAQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Auaciu%3DppT0JS%3DBShTbMvejtVHsJBrHiQoYJ0OHQcAQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAGhqNn%3DcPKmR7a7QzosX3aityqMhYSX%2Bj-vZm3wyVCtv1mVNHA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
