o Think Like a Computer Scientist - Learning with Python 3":
http://openbookproject.net/thinkcs/python/english3e/
If you're after a printed book, the original (I believe) author's current
version is here:
http://www.greenteapress.com/thinkpython/thinkpython.html
Simon
--
https://mail.python.org/mailman/listinfo/python-list
Hi guys ..
Uhm, ı have to download youtube videos ı was tried urlretrive but doesn't work
ı have no idea that's why.So there is my question, "we cant donwload youtube
videos directly ? ".
--
https://mail.python.org/mailman/listinfo/python-list
tionaries online is not just British English, it derives common usage
from a corpus of English used around the world:
http://www.oxforddictionaries.com/words/what-are-the-main-differences-between-the-oed-and-odo
http://www.oxforddictionaries.com/words/the-oxford-english-corpus
Simon
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, 15 October 2014 19:39:43 UTC+1, Shiva wrote:
> I am trying to search a string through files in a directory - however while
> Python script works on it and writes a log - I want to present the user with
> count of number of strings found. So it should increment for each string
> foun
On Wednesday, 15 October 2014 20:31:15 UTC+1, Ian wrote:
> I agree. I very rarely use blank lines inside functions. As I see it,
> if you feel you need a blank line for separation within a function,
> that's an indication your function is overly complex and should be
> broken up.
Whereas I feel t
On Thursday, 16 October 2014 15:05:47 UTC+1, Ian wrote:
> I would have suggested a Counter if I thought it fit the OP's use
> case. If you're listing directory contents, you're not going to have
> any repeated strings, so all the counts will be 1, and your Counter
> might as well be a list, which
On Saturday, 18 October 2014 11:53:16 UTC+1, Steven D'Aprano wrote:
> I'm curious what aspect of idiomatic Perl code you are referring to. When
> people talk about Perl code dismissively, I normally think of three things:
>
> - excessively long one-liners;
> - excessive use of symbols and sigils
On Monday, 20 October 2014 18:56:05 UTC+1, Ian wrote:
> Rather, I'm saying that where the blank line is should be the start of
> a new function. There would still be a blank line, just no longer
> inside the function.
>
> Now, maybe you think there should be more blank lines in the above, in
> wh
essentially a contents page or sitemap for the site.
Interestingly, despite trying quite a few keyword combinations, I was
unable to find such a script.
Anyone have any ideas?
--
Cheers Simon
Simon Cropper - Open Content Creator / Website Administrator
Free and Open Source Software
he pages in that website (recursive list of internal links to HTML
documents; ignore images, etc.).
In subsequent notes to Thomas 'PointedEars'...
I pointed to an example of the desired output here
http://lxml.de/sitemap.html
--
Cheers Simon
Simon Cropper - Open Content Creator / We
On 09/09/11 10:32, Rhodri James wrote:
On Fri, 09 Sep 2011 00:40:42 +0100, Simon Cropper
Ahem. You should expect a certain amount of ribbing after admitting that
your Google-fu is weak. So is mine, but hey.
I did not admit anything. I consider my ability to find this quite good
actually
d when the python script is run.
I am now considering how I might address this requirement. If I create a
python script I will post it on PyPI. As with all my work it will be
released under the GPLv3 licence.
Thanks for your help.
--
Cheers Simon
Simon Cropper - Open Content Creator /
On 09/09/11 12:59, Chris Angelico wrote:
On Fri, Sep 9, 2011 at 12:43 PM, Simon Cropper
wrote:
At present I am definitely getting the impression that my assumption that
something like this' must out there', is wrong.
I have found a XML-Sitemaps Generator at http://www.xml-sitemaps
After receiving the data, check the
received data for correct format, correct first and last characters, and if
possible, check sum. I've worked through this problem with rs-485 data
collection systems where there is no hand shaking and would not be surprised
to expect the same even with rs-232.
Paul Simon
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 4, 2013 4:27 PM, "nn" wrote:
>
> On Feb 4, 10:10 am, Chris Angelico wrote:
> > This isn't particularly related to the post I'm quoting, it's more a
> > point of curiosity.
> >
> > On Mon, Feb 4, 2013 at 10:53 AM, João Bernardo wrote:
> >
> > Re: [Python-ideas] constant/enum type in stdlib
"nothing".)
(())A -> i(i)(A) -> I(A) -> A
I just discovered this (that the Laws of Form have a direct mapping to
the combinator calculus[5] by means of λc.cSK) and I haven't found anyone
else mentioning yet (although [6] might, I haven't worked my way all
browne.com/ser-48.html ?
If there are indices and especially linked primary and foreign keys its
much more complicated than that. One has to delve into Access container
structures etc. As far as I know it has to be done from Access.
Paul Simon
--
http://mail.python.org/mailman/listinfo/python-list
"rusi" wrote in message
news:92551c63-1347-4f1a-9dca-d1bbd5e4d...@ys5g2000pbc.googlegroups.com...
Its hard to distinguish what you are saying from what I said because
you've lost the quotes.
On Apr 15, 9:01 pm, "Paul Simon" wrote:
> "rusi" wrote in me
The only self aware Python scripts that I'm aware are the timbot and
the effbot. Their sources are available from the PSU website at
--
http://mail.python.org/mailman/listinfo/python-list
On 12/15/05, Steve Holden <[EMAIL PROTECTED]> wrote:
> Aahz wrote:
> > python -c 'import this'
>
> Faster:
>
>python -m this
So, there's two ways to do it. ;-)
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-
t
> duplicate matches of any of them. I know I can filter the
> list containing found matches myself, but that is somewhat
> expensive for a list containing thousands of matches.
Probably the cheapest way of de-duping the list would be to dump it
straight into a set, provided that you ar
an only get one argument
> with each option. In the above case, there isn't even an option string
> before the *, but even if there was, I don't know how to get getopt to
> give me all the expanded filenames in an option.
>
> Help! :)
You could use the glob module to expand t
this argument when you build your Node objects...
> am trying to connect them, but when i try to print the connection i
> got this:
> ===
> >>>
> connection done
> None
So it's hardly surprising that printing
, suggestions and ideas.
Have fun,
--
Simon Hengel
--
http://mail.python.org/mailman/listinfo/python-list
promize between shortness and readibility
> plus elegance of design"""?
I would love to choose those criteria for future events. But I'm not
aware of any algorithm that is capable of creating a ranking upon them.
Maybe we can come up with a solution. Any ideas?
Cheers, Simon.
-
> I would suggest that all whitespace (except within string literals)
> should be ignored, as well.
Good point, but i assume that is not possible with regular expressions.
Cheers, Simon
--
python coding contest - http://www.pycontest.net/
--
http://mail.python.org/mailman/listinfo/python-list
esidents of
> the Americas would have to go to bed VERY late, get up VERY early, or
> spend extra effort setting up cron jobs), and that would bias everything
> in a most unfair manner.
Not sure what to do about it, is there something more fair
than first come first serve?
Cheers, Simon
> What is your algorithm for determining "shortest" program? Are you
> counting tokens, lines or characters? Does whitespace count?
like:
$wc -c seven_seg.py
At the moment we have to live with characters, and yes whitespace
characters do count. Sorry for that.
Have fu
ersonally I prefer
> that if be illegal, but if it's legal I'll have to do it).
You may change input to something more short, like x. Everything that
passes the test, has a good chance to be accepted.
Cheers,
Simon Hengel
--
python coding contest - http://www.pycontest.net/
--
h
> the dream of winning the contest seems to be over.
Sorry for that, I'm considering doing a ranking on the nicest cheats too.
Have fun,
Simon Hengel
--
python coding contest - http://www.pycontest.net/
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
> After all, I'd really love to set up another contest with
> different measures and criteria.
for future events i will take a close look at other possibilities for
doing a ranking. At the moment the 22c3 and the contest is eating up all
my time. Pleas appreciate that i may not keep up wit
i broke things while tweaking some stuff.
Sorry for the inconveniences,
Simon Hengel
--
python coding contest - http://www.pycontest.net/
--
http://mail.python.org/mailman/listinfo/python-list
> It seems, that the site had some trouble to stay online and especially
> to provide the ranking today.
There was a problem with our server, sorry for that.
Have fun,
Simon Hengel
--
http://mail.python.org/mailman/listinfo/python-list
i = 4
Rebind the name "i" to the integer object 4. Note that this has no
effect on the object that used to be bound to "i" at this point, nor
any effect on the list object.
> print lst
Print your old list.
Clear now?
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list
Don't use self.__class__, use the name of the class.
--
http://mail.python.org/mailman/listinfo/python-list
On 18 Jan 2006 11:59:23 GMT, Johannes Zellner <[EMAIL PROTECTED]> wrote:
> Hi,
>
> can I make an object read-only, so that
>
> x = new_value
>
> fails (and x keeps it's orginal value)?
This works for me:
http://groups.google.com/group/comp.lang.python/msg/2b17
the more esoteric python projects,
such as the AST integration,
and PyPy. Participating in a sprint would be brilliant.
The line-up of talks at this year's PyCon looks more interesting to me,
compared to Europython 2005.
thanks,
Simon Burton.
--
http://mail.python.org/mailman/listinfo/p
hould do it for
herself.
The "pythonic" form is safe, not weird, and just as explicit.
There's no more point to using the len() form than there is to saying
"seq[len(seq)-1]" rather than just "seq[-1]" to get the last item of a
sequence.
My $0.02
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
except Exception, err:
if err not in (DontCatchMe1, DontCatchMe2):
# Handle err
HTH,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
Simon Forman wrote:
> Carl J. Van Arsdall wrote:
> > Hrmms, well, here's an interesting situation. So say we wanna catch
> > most exceptions but we don't necessarily know what they are going to
> > be. For example, I have a framework that executes modules (pytho
n
GUI form, and panels defined as seperate objects in seperate files.
Various panels will contain controlls for manipulating data in the
DataObject, or wherever data storage end up.
Best regards,
Simon Hibbs
(who strugles to get his head round this OOP stuff sometimes).
--
http://mail.pyt
7;s hard to get out of that mentality.
Many thanks,
Simon Hibbs
P.S. Regular reader of your blog on Oreillynet.
--
http://mail.python.org/mailman/listinfo/python-list
On 12 Jul 2006 11:14:43 -0700, John Henry <[EMAIL PROTECTED]> wrote:
> Is there a more elagant way of doing this?
>
> # logflags is an array of logicals
> test=True
> for x in logflags:
>test = test and x
> print test
min(logflags)
I feel dirty now. ;-)
--
Cheers
nd it.
This seems to me to be the superior approach.
Are there any other architectural options that anyone could suggest?
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
for all the transformations I
want to perform on the data.
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
ing engine using
Python, SQLite and wxPython. It's easily my most ambitious project so
far.
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
lass()
my_object.bad_name = "This should issue a warning"
print my_object.bad_name # This too
print my_object.good_name # But this should be fine
if __name__ == '__main__':
test()
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list
On 7/13/06, Simon Brunning <[EMAIL PROTECTED]> wrote:
> Something like this any use to you?
Or this, about a squillion times cleaner:
class MyClass(object):
def _get_bad_name(self):
warn('"bad_name" deprecated. Please refer to "good_name&qu
On 13 Jul 2006 05:45:21 -0700, John Henry <[EMAIL PROTECTED]> wrote:
>
> Simon Brunning wrote:
> >
> > min(logflags)
> >
>
> !!!
Be aware that not only is this an outrageous misuse of min(), it's
also almost certainly much less efficient than /F's s
able
> file to install it. But is it possible to do it some other way, such as
> how you might build it yourself on Linux (although I don't know how to
> do that yet) and then just write and run scripts normally straight from
> your memory stick?
Google for Movable Python
On 7/13/06, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Maybe the right thing to ask back is: how much do you pay?
And possibly; *which* bay? ;-)
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list
Pythonic way to do this? (Maybe I could somehow use generators?)
>
> thx.
> -tom!
strings have a count() method.
Since you know that you won't have things like '%%s' in your
boilerplate, it's perfectly reasonable to use:
return boilerplate % ((module,) * boilerplate.count('%s'))
in your code.
Peace,
~Simon
return boilerplate % ((module,) * 3)
--
http://mail.python.org/mailman/listinfo/python-list
Tom Plunket wrote:
> Simon Forman wrote:
>
> > strings have a count() method.
>
> thanks!
>
> For enrichment purposes, is there a way to do this sort of thing with
> a generator? E.g. something like:
>
> def SentenceGenerator():
>words = ['I', &
John Henry wrote:
> Hi list,
>
> Is there a more elagant way of doing this?
>
> # logflags is an array of logicals
> test=True
> for x in logflags:
>test = test and x
> print test
>
> --
> Thanks,
So many ways *drool*
How about:
False not in logflags
(Anybody gonna run all these throu
>
> False not in logflags
>
Or, if your values aren't already bools
False not in (bool(n) for n in logflags)
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
Simon Forman wrote:
...
> I usually use this with assert statements when I need to check a
> sequence. Rather than:
>
> for something in something_else: assert expression
>
> I say
>
> assert False not in (expression for something in something_else)
>
> This way the
an instance of a class.
:) One can ONLY create instances of classes.
> 4. An instance can only perform functions that are provided from the
> method it was instanced from.
Yes, *IF* you replace "method" in that sentence with "class", and
"functions" with "methods".
> 5. Is there any other key information I am missing.
I hope this helps,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
a multi gigabyte
log file. I found that a very fast way to do this was to build an
index file containing the int offset in bytes of each line in the log
file.
I could post the code if you're interested.
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
, class_ in getmembers(m, isclass):
if class_ is m.A:
continue
if m.A in getmro(class_):
exec t % (name, name)
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
> > > classes themselves. But I only would like to do this with classes that
> > > are subclasses of A.
> > >
> > > Any ideas?
> >
> > It's pretty easy
> >
> >
> > import m
> > from inspect import getmembers, isclass, get
On 17 Jul 2006 08:56:34 -0700, PTY <[EMAIL PROTECTED]> wrote:
> Which is better?
>
> lst = [1,2,3,4,5]
>
> while lst:
> lst.pop()
>
> OR
>
> while len(lst) > 0:
> lst.pop()
How about:
lst = [1,2,3,4,5]
while lst:
lst.pop()
Or even just:
spec wrote:
> Thanks, actually there are no args, is there something even simpler?
>
> Thanks
> Frank
you could try os.system()
>From the docs:
system(command)
Execute the command (a string) in a subshell. This is implemented
by calling the Standard C function system(), and has the same
limi
rybook/os.htm> - but it really
couldn't be simpler. There's not much to demonstrate.
If it's deprecated, it's the first I've heard of it.
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list
ET framework (if they don't already have it!).
So, they'll download and install the .NET framework at 23 MB, but they
won't download and install Python at 9 and half?
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list
Dan Bishop wrote:
> [EMAIL PROTECTED] wrote:
> > it seems that range() can be really slow:
> ...
> > if i in range (0, 1):
>
> This creates a 10,000-element list and sequentially searches it. Of
> course that's gonna be slow.
And you're doing it 3 times.
--
http://mail.python.org/m
in range(lo, hi, step) without doing "the necessary
algebra".
i.e. n in set(xrange(0, 10000, 23)) ...
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
> Simon Forman wrote:
>
> > Nick Craig-Wood wrote:
> >>
> >> Sets are pretty fast too, and have the advantage of flexibility in
> >> that you can put any numbers in you like
> >>
> >
> > I know this is self-evid
arbitrary commands?
For piping subcommands check out the subprocess module, especially
http://docs.python.org/lib/node242.html , for bzip2 check out the bz2
module http://docs.python.org/lib/module-bz2.html , but note, there's
also a tarfile module http://docs.python.org/lib/module-tarfile.
K.S.Sreeram wrote:
> Simon Forman wrote:
> > Nick Craig-Wood wrote:
> >> Sets are pretty fast too, and have the advantage of flexibility in
> >> that you can put any numbers in you like
> >>
> >
> > I know this is self-evident to most of the people r
tac-tics wrote:
> Simon Forman wrote:
> > To me, and perhaps others, "T =
> > set(xrange(0, 1, 23))" and "n in T" are somewhat easier to read
> > and write than "not n % 23 and 0 <= n < 1", YMMV.
>
> Eh? How is the first eas
, would be a Very Good Thing.
They're planning on manufacturing 100 million of these things!
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
ould implement this, or a similarly
user friendly behaviour?
Best regards,
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
On 19 Jul 2006 02:34:09 -0700, Simon Hibbs <[EMAIL PROTECTED]> wrote:
> I was reading an article about the One Laptop Per Child initiative the
> other day, and being a Python fan I wondered if there are any plans to
> put Python on it, or at least make it available. A cut-down vers
ge in the console.
I'm trapping other events successfuly elsewhere using similar code.
Simon Hibbs
.
--
http://mail.python.org/mailman/listinfo/python-list
rony steelandt wrote:
> Since the event handler of a textctrl inherits from wxCommandEvent,
> I would guess that the binding should be to EVT_COMMAND_KILL_FOCUS
Still not working :(
Simon
--
http://mail.python.org/mailman/listinfo/python-list
Simon Hibbs wrote:
> rony steelandt wrote:
> > Since the event handler of a textctrl inherits from wxCommandEvent,
> > I would guess that the binding should be to EVT_COMMAND_KILL_FOCUS
>
> Still not working :(
I can trap EVT_TEXT_ENTER events successfuly, without using
EV
Frank Millman wrote:
> Try self.PlantCtrl.Bind(wx.EVT_KILL_FOCUS, self.OnUpdatePlantCtrl)
And Voila! It works. Many, many thanks.
Any idea what is going on?
Simon
--
http://mail.python.org/mailman/listinfo/python-list
.
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Jim Jones wrote:
> > Is there a Python library that would allow me to take a paragraph of text,
> > and generate a one or two sentence summary of that paragraph?
>
> There is a OTS wrapper.
http://libots.sourceforge.net/
as for the wrapper, this was all I could find (i
rse..
server = smtplib.SMTP('smtp.gmail.com', 587)
try:
server.ehlo()
server.starttls()
server.ehlo()
server.login(me, p)
# Do some more stuff here...
finally:
server.close()
HTH,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
> Colin
You should check out the fileinput module.
HTH,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
e map() (or really don't like list comprehensions
;P ) you could use this:
lower_list = map(lambda s : s.lower(), str_list)
Hope this helps,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
ur re pattern with the "$" character (depending on what
the rest of your pattern matches.)
HTH,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> Simon Forman wrote:
>
> > Python's re.match() matches from the start of the string, so if you
> > want to ensure that the whole string matches completely you'll probably
> > want to end your re pattern with the "$" character (de
T wrote:
> fuzzylollipop wrote:
> >
> > you can make the usage line anything you want.
> >
> > ...
> > usage = 'This is a line before the usage line\nusage %prog [options]
> > input_file'
> > parser = OptionsParser(usage=usage)
> > parser.print_help()
> > ...
> >
>
> No, that affects the string pri
subclass the
Formatter passed in to the Parser.
IMHO, optparse does a tricky task well, but it's implemented in a hard
to follow, inflexible manner. My "favorite" pet peeve is that the
options "dictionary" it returns isn't a dict. I wound up doing this to
it to get
John Salerno wrote:
> Thanks guys!
A pleasure. : )
--
http://mail.python.org/mailman/listinfo/python-list
Gerhard Fiedler wrote:
> On 2006-07-21 21:05:22, Josiah Manson wrote:
>
> > I found that I was repeating the same couple of lines over and over in
> > a function and decided to split those lines into a nested function
> > after copying one too many minor changes all over. The only problem is
> > th
t;, at
http://infohost.nmt.edu/tcc/help/lang/python/tkinter.html
HTH,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
ually someone did. http://python-xlib.sourceforge.net/ It's old
but it works fine. Speaks X protocol in pure python.
HTH,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
gmax2006 wrote:
> Hi,
>
> Is it possible that a python script finds out whether another instance
> of it is currently running or not?
>
> Thank you,
> Max
Yes, there are several ways. What OS are you using?
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
gmax2006 wrote:
> Simon Forman wrote:
> > gmax2006 wrote:
> > > Hi,
> > >
> > > Is it possible that a python script finds out whether another instance
> > > of it is currently running or not?
> > >
> > > Thank you,
> &
e this, as I have noticed that IDLE
seems to do exactly this, and on windows and linux, but I was afraid to
look the fool if it was indeed foolish. (and also, I didn't know
details of it.)
Thanks Cameron.
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
ral way to express yourself.
Any objctions to this, or pitfalls?
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
h you would
need to distribute the .NET and IronPython runtimes.
Multiple-language and library integration is after all what .NET is all
about.
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
ession('dbh', [1,2,3,4], 5)
>>> spam.regressors
[1, 2, 3, 4]
What makes you think you only have the first member of the list? Can
you show us the code that's not working?
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
http://mail.python.org/mailman/listinfo/python-list
This link seems to have some relevent code.
http://lists.wxwidgets.org/archive/wxPython-users/msg07340.html
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
Simon Hibbs wrote:
> I'm wondering about whether to use objects in this way or dictionaries
> for a program I'm writing at the moment. It seems to me that unless you
> need some of the functionality supplied with dictionaries (len(a),
> has_key, etc) then simple objects are
digits:" will evaluate True because
> '121206' is not in '0123456789'.
>
> Whereas test.isdigit() returns true if all the characters in test are
> digits.
>
> So yes, there is a big difference between the two.
>
> Regards,
>
> John
>
>
>
Your first test could be rewritten to do what I think you're thinking
it should do like so:
import string
test='121206'
for ch in test:
if ch not in string.digits:
print "I am not all Digits"
break
else:
print "I am all Digits"
But isdigit() would be the better way.
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
ine (it will cause a space to appear instead if you print
something else, but NOT if you write directly to stdout.)
print "Hello",
print "world!"
# prints Hello world! on one line with a space between them, but
import sys
print "Hello",
sys.stdout.write("world!")
# prints Helloworld!
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
501 - 600 of 1585 matches
Mail list logo