Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 16 Online
OpenStudy (anonymous):

how do you post code? It keeps truncating the lines

OpenStudy (espex):

There is no reason I can think of that you couldn't post your code, however if you are having issues you can always use pastebin or a similar service.

OpenStudy (e.mccormick):

As eSpeX pointed out, there is pastebin. There is a similar thing on github. Where these come in VERY handy is when someone else wants to try your code. If I copy and paste a code sample people put on OS, it removes all the carriage returns. So for longer code samples, this makes things VERY hard to work with. If you use a code or text keeping service, this can eliminate the problem. That makes it much easier on people that want to try your code to debug it.

OpenStudy (anonymous):

For the Mechanical MOOC, we recommend GitHub's Gist (github.com)

OpenStudy (anonymous):

- http://dpaste.com - http://pastebin.com - http://www.repl.it/ - http://pastie.org - http://codepad.org - http://ideone.com paste your code there and post the link here. select Python syntax highlighting when u paste.

OpenStudy (anonymous):

you may attach it by file

OpenStudy (e.mccormick):

``` # indent your Python code to put into an email import glob # glob supports Unix style pathname extensions python_files = glob.glob('*.py') for file_name in sorted(python_files): print ' ------' + file_name with open(file_name) as f: for line in f: print ' ' + line.rstrip() print ``` It looks like ``` above and below a block also causes code to paste properly, and retain format on copy back. It turns on the preformatted text mode!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!