skip to main
|
skip to sidebar
Sunday, August 9, 2009
how to print to string in Python
Here's how to do it. You have to use the
StringIO module
.
import StringIO
datastring = StringIO.StringIO()
...
print >>datastring, " Hello string."
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Labels
$variables
(1)
AMD
(1)
anime
(2)
announcement
(1)
apps
(1)
apt
(1)
apt-get
(1)
argh
(1)
arithmetic
(1)
array
(4)
art gallery theorems
(1)
ascii
(1)
assembly
(1)
audio
(1)
BackgroundWorker
(1)
backticks
(1)
backup
(1)
basename
(1)
bash
(4)
bc
(1)
bicycle
(1)
bike
(1)
binding
(1)
bingcode
(1)
BitmapSource
(1)
bless
(1)
books
(1)
browser
(1)
bsd
(1)
build
(1)
C
(2)
C#
(2)
C++
(2)
cables
(1)
caffeine
(1)
calculator
(1)
carp
(1)
case
(1)
CFG
(1)
CGI
(6)
chomp
(1)
chrome
(2)
class
(1)
CLI
(3)
cloud
(1)
cmake
(1)
code
(1)
codecs
(1)
Colts
(1)
command line
(20)
commandline
(16)
commodore64
(1)
comp40
(1)
compiler
(1)
complexity
(1)
computational geometry
(3)
concatenation
(1)
constructor
(1)
control
(2)
convert
(2)
cool
(4)
count
(1)
cpan
(1)
CPU
(1)
cr
(1)
crlf
(1)
croak
(1)
data structure
(6)
database
(2)
date
(2)
ddd
(1)
debian
(1)
debug
(3)
debugging
(3)
delete
(2)
design
(1)
dice
(1)
dictionary
(3)
die
(1)
distro
(3)
dos
(1)
dump
(1)
DVCS
(1)
dynamic
(1)
editor
(1)
eject
(1)
email
(1)
embedded
(1)
EMC
(1)
encryption
(1)
erase
(1)
exception
(1)
exception handling
(1)
facebook
(2)
ffmpeg
(4)
FindBin
(2)
flatten
(2)
football
(1)
format
(2)
fossil
(1)
free
(2)
freeware
(1)
Freeze
(1)
fstab
(1)
ftp
(2)
ftpdm
(1)
functional
(1)
funny
(2)
Gaiking
(1)
gcc
(1)
gdb
(1)
generator expressions
(1)
gentoo
(2)
geometry
(1)
gimp
(1)
git
(1)
gnuplot
(1)
google
(2)
google chrome
(1)
grammar
(1)
graphics
(12)
grep
(1)
gv im
(1)
gvim
(8)
hack
(2)
happynewyear
(1)
hardcopy
(1)
hash
(4)
hex
(2)
hexcurse
(1)
hg
(1)
highlight
(2)
howto
(2)
hp
(1)
http
(1)
idle
(1)
IE6
(1)
ignorecase
(1)
igraph
(1)
Imagemagick
(2)
incremental
(1)
inheritance
(1)
interval tree
(1)
interview
(1)
IPC
(1)
Iris dataset
(1)
itertools
(1)
java
(1)
json
(1)
justify
(1)
k-meleon
(1)
khexedit
(1)
kids
(1)
latex
(1)
layers
(1)
lf
(1)
line
(1)
line numbers
(3)
linebreak
(1)
links
(3)
linux
(13)
list
(12)
list comprehension
(3)
lookahead
(1)
loop
(2)
lynx
(1)
Mac OS
(1)
maintenance
(1)
make
(1)
map
(1)
match
(1)
math
(4)
mathematics
(3)
maximum
(1)
mecha
(1)
memory
(1)
mercurial
(1)
MIT
(1)
models
(1)
module
(2)
modulus
(1)
mount
(1)
mplayer
(1)
MSDN
(2)
mutt
(1)
mysql
(1)
namespace
(2)
naruto
(1)
NAT
(1)
negative
(2)
netbeans
(1)
network
(1)
networking
(1)
news
(1)
NFL
(1)
nonlocal
(1)
notes
(1)
NP-complete
(1)
object oriented
(1)
OOP
(1)
open source
(2)
openbsd
(1)
opensuse
(2)
optparse
(1)
Patriots
(1)
Pats
(1)
pdb
(1)
PDF
(3)
pdftk
(1)
perl
(12)
perlsucks
(1)
Philippines
(1)
photography
(1)
plan
(1)
PLplot
(1)
pointer
(1)
polymorphism
(1)
povray
(3)
print
(3)
probability
(1)
programming
(1)
programming interview
(1)
programming language
(1)
project
(1)
PSP
(1)
PyQwt
(1)
python
(33)
pythonic
(5)
qimo
(1)
question
(2)
Qwt
(1)
R
(2)
raytracing
(7)
redo
(1)
reduce
(1)
reformat
(1)
regex
(4)
regular expressions
(1)
reload
(1)
rename
(1)
rights
(1)
Ruby
(2)
running
(1)
sarcasm
(1)
scope
(1)
script
(1)
scripting
(1)
search
(7)
security
(2)
sed
(3)
segment tree
(1)
serious
(1)
service oriented architecture
(1)
shell
(1)
signal
(1)
simple
(1)
skiplist
(2)
SOA
(1)
software
(2)
software engineering
(1)
sort
(1)
space
(2)
split
(2)
sqlite
(2)
sqlite3
(2)
stack
(1)
statistics
(1)
storage
(1)
string
(5)
strip
(1)
subversion
(3)
svn
(2)
sysadmin
(4)
text
(4)
theory of computation
(2)
thread
(2)
time
(2)
tips
(5)
Tisch library
(2)
Tk
(1)
torrents
(1)
trailing
(2)
transparency
(1)
travelling salesman problem
(1)
tree
(1)
trivia
(1)
try::tiny
(1)
TSP
(1)
Tufts
(2)
tuple
(1)
tutorial
(1)
tweak
(1)
ubuntu
(2)
undo
(1)
unerase
(1)
unicode
(1)
unix
(2)
utility
(2)
uuid
(1)
vche
(1)
VCS
(2)
version
(4)
version control
(4)
video
(5)
vim
(24)
virtual
(1)
virtualization
(1)
visual analytics
(1)
visual studio
(1)
visualization
(1)
webscraping
(2)
whitespace
(2)
wikipedia
(2)
windows xp
(2)
wordcount
(1)
WPF
(3)
WTF
(2)
XAML
(1)
Xfree
(1)
Xming
(1)
XML
(1)
Blog Archive
►
2014
(3)
►
August
(2)
►
April
(1)
►
2013
(3)
►
September
(1)
►
August
(1)
►
February
(1)
►
2012
(8)
►
November
(1)
►
October
(1)
►
June
(2)
►
March
(3)
►
February
(1)
►
2011
(27)
►
December
(1)
►
November
(2)
►
October
(2)
►
July
(2)
►
June
(2)
►
May
(7)
►
April
(10)
►
March
(1)
►
2010
(33)
►
December
(7)
►
November
(2)
►
October
(2)
►
September
(2)
►
July
(1)
►
June
(4)
►
May
(5)
►
April
(1)
►
March
(3)
►
February
(4)
►
January
(2)
▼
2009
(86)
►
December
(1)
►
November
(6)
►
October
(13)
►
September
(15)
▼
August
(9)
project announcement: bingcode on Google Code: sea...
how to strip trailing characters in Python
how to get information about a video file using ff...
how to print in vim without using the GUI
what is a UUID?
how to print to string in Python
why i hate reading perl code (aka why I hate Perl)
apt search for packages on Ubuntu / Debian
how to print the current stack in Python
►
July
(9)
►
June
(9)
►
May
(2)
►
April
(13)
►
March
(3)
►
February
(6)
►
2008
(2)
►
December
(1)
►
November
(1)
followers
Stomach Pain After Eating?
Learn How I Overcame Stomach Pain Without Medicines Just A Change In Diet. Free Info Sign Up Now!
Follow me on Twitter!
No comments:
Post a Comment