On Thu, Sep 21, 2017, 5:49 AM jettam <[email protected]> wrote:

> I am trying to capture the contents of this text document so I can operate
> on it. The contents is several lines making a paragraph.
>
> This is the approach I was taking but its not working. Any other
> suggestions ?
>
> inFile = r'E:\ProfessionalDevelopment\python\Python Scripting in
> Maya\week4\famousQuote.txt'
> theWholeQuote = ()
> with open (inFile,'r') as fin:
>     for line in fin:
>         theWholeQuote  = (line)
>

A paragraph implies that it is a number of sentences followed by a newline
character. Is that the case for you, or is it really a number of lines,
each with their newline character, followed by extra newlines? First we
would need to be explicit about what separates your lines or paragraphs.

Second, are you trying to operate on each line, each paragraph, or to just
capture the whole document?

If you are trying to build up a paragraph by some delimiter, then you
should make theWholeQuote a list and then use theWholeQuote.append() to add
each component.

Justin

-- 
> 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/27cdd0d9-9c7e-4a8a-b0c3-f041bdd8ac38%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/27cdd0d9-9c7e-4a8a-b0c3-f041bdd8ac38%40googlegroups.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/CAPGFgA2OufcnCuxe8gpm0951MGy7O_0nDZprcVz7dYH%2Bs6-gzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to