I hope I spelt the title right (Firefox is saying I spelt "spelt" wrong :D)- I put in [help] to indicate I was asking not giving a tut.
So anyway here is my problem:
I have a Python application that is chopping words in half at the end of each line. This is REALLY annoying. (Especially when I'm speed reading reports). So how can I make it shift the ENTIRE word on to the next line?
Thanks
Bbqroast
And yes Google is my friend :D
4 replies to this topic
#1
Posted 06 February 2011 - 10:30 PM
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
|
|
|
#2
Posted 06 February 2011 - 11:54 PM
#3
Posted 07 February 2011 - 05:12 AM
I believe Python has a standard library function named "wrap":
7.7. textwrap ? Text wrapping and filling — Python v2.7.1 documentation
Also, spelt is not standard American English if I recall, so it says it is wrong. it is correct though: "verb, spelled or spelt, spellĀ·ing."
7.7. textwrap ? Text wrapping and filling — Python v2.7.1 documentation
Also, spelt is not standard American English if I recall, so it says it is wrong. it is correct though: "verb, spelled or spelt, spellĀ·ing."
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#4
Posted 07 February 2011 - 10:22 PM
Thanks...
Do you know any friendly user guides for that???
It seems a bit complex.
Do you know any friendly user guides for that???
It seems a bit complex.
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
#5
Posted 08 February 2011 - 12:56 AM
That is a friendly guide, I would recommend you get used to the Python document format so you may get more out of reading them when you need to know a function. You will notice the function is defined like this:
So you will need to input your text in the first parameter, and the desired width of the column of text.
wrap(text, width);
So you will need to input your text in the first parameter, and the desired width of the column of text.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









