Re: [Tutor] Newbie Trouble Processing SRT Strings In Text File

2014-11-03 Thread Dave Angel
Please evaluate your email program. Some of your newline s are being lost in the paste into your email. Matt Varner Wrote in message: > TL:DR - Skip to "My Script: "subtrans.py" > > > > Optional Links to (perhaps) Helpful Images: > 1. The SRT download button: > http://i70.photobucket.com/alb

Re: [Tutor] Newbie Trouble Processing SRT Strings In Text File

2014-10-31 Thread Danny Yoo
[code cut] Hi Matt, It looks like you're trying to write your own srt parser as part of this problem. If you're in a hurry, you may want to look at existing parsers that people have written. For example: https://github.com/byroot/pysrt But, even though it successfully kills these additi

Re: [Tutor] Newbie Trouble Processing SRT Strings In Text File

2014-10-31 Thread Alan Gauld
On 31/10/14 11:07, Matt Varner wrote: # Import sys to get at stdout (standard output) - "print" results will be written to file import sys This is a bad idea. Instead, write your strings directly to o o.write(s) Print adds newlines automatically(unless you explicitly suppress them). But prin

[Tutor] Newbie Trouble Processing SRT Strings In Text File

2014-10-31 Thread Matt Varner
TL:DR - Skip to "My Script: "subtrans.py" Optional Links to (perhaps) Helpful Images: 1. The SRT download button: http://i70.photobucket.com/albums/i82/RavingNoah/Python%20Help/tutor1_zps080f20f7.png 2. A visual comparison of my current problem (see 'Desire Versus Reality' below): http://i70.ph