It is a paragraph with a new line character at the end of each line. At 
this stage I am just trying to capture the whole paragraph. I was able to 
do that with your advice by using the name.append() in a for in statement. 
I was confused because I thought this should be captured as a string not a 
list. 



On Wednesday, September 20, 2017 at 12:47:03 PM UTC-7, Justin Israel wrote:
>
>
>
> On Thu, Sep 21, 2017, 5:49 AM jettam <[email protected] <javascript:>> 
> 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] <javascript:>.
>> 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/2b2ab4e7-598f-4a17-8b28-24d16eb3eac5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to