On Jul 15, 1:48 pm, Emile van Sebille em...@fenx.com wrote:
On 7/15/2009 10:23 AM MRAB said...
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
print
On Jul 16, 3:12 pm, seldan24 selda...@gmail.com wrote:
On Jul 15, 1:48 pm, Emile van Sebille em...@fenx.com wrote:
On 7/15/2009 10:23 AM MRAB said...
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold'
On Jul 15, 1:14 pm, seldan24 selda...@gmail.com wrote:
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
print s[:len]
s=s[len:]
s=A very
seldan24 wrote:
On Jul 15, 1:48 pm, Emile van Sebille em...@fenx.com wrote:
On 7/15/2009 10:23 AM MRAB said...
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
Michiel Overtoom wrote:
seldan24 wrote:
I know that Emile suggested that I can slice out the substrings rather
than do the gradual trimming of the string variable as is being done
by moving around the length.
An excellent idea.
def fold(s,chunklength):
offset=0
while offsetlen(s):
Hello,
I have a shell script, that I'm attempting to convert to Python. It
FTP's files down from an AS/400 machine. That part is working fine.
Once the files arrive, the script converts them from EBCDIC to ASCII
and then formats their line width based on a pre-determined size.
For example, if
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
print s[:len]
s=s[len:]
s=A very long string indeed. Really that long? Indeed.
fold(s,10)
Output:
A very lon
g string i
ndeed. Rea
lly that l
ong? Indee
d.
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
print s[:len]
s=s[len:]
s=A very long string indeed. Really that long? Indeed.
fold(s,10)
seldan24 wrote:
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
print s[:len]
s=s[len:]
s=A very long string indeed. Really that long? Indeed.
On 7/15/2009 10:23 AM MRAB said...
On Jul 15, 12:47 pm, Michiel Overtoom mot...@xs4all.nl wrote:
seldan24 wrote:
what can I use as the equivalent for the Unix 'fold' command?
def fold(s,len):
while s:
print s[:len]
s=s[len:]
snip
You might still need to tweak the
10 matches
Mail list logo