enjoy it.
Seasons greetings
Steve
Steve Holden
On Wed, Dec 6, 2017 at 2:29 AM, Ned Deily wrote:
> Announcing the immediate availability of Python 3.6.4 release candidate 1
> and of Python 3.7.0 alpha 3!
>
> Python 3.6.4rc1 is the first release candidate for Python 3.6.4, the next
>
://www.eventbrite.com/e/uk-python-training-day-tickets-14720737121
regards
Steve
--
Steve Holden st...@holdenweb.com +1 571 484 6266 @holdenweb
--
https://mail.python.org/mailman/listinfo/python-list
Hi everybody,
I am pleased to announce the availability of a Python Programming Skills Lab in
London on December 9, 2014 in The Church House, Westminster. The blurb follows.
Led by Steve Holden, a well-known educator and member of the Python community,
this one-day lab presents Python
Pythonistas:
We are happy to remind all Django users that DjangoCon US is in DC this year,
from September 3-8 (main conference September 4-6). Early bird pricing is
available until August 3, and the schedule will be published shortly after this
announcement is made.
http://djangocon.us/
Sin
Haven't had much Cc input so far, but this one is definitely worth following up
on. Thanks!
regards
Steve
On Aug 4, 2011, at 5:42 PM, Eric Snow wrote:
> On Wed, Aug 3, 2011 at 9:14 PM, Steve Holden wrote:
>> [Ccs appreciated]
>> After some three years labor I (@holdenweb)
dth student would be abused and
the thousandth murdered).
So I wondered if anyone had any good ideas.
regards
Steve
--
Steve Holden
st...@holdenweb.com
--
http://mail.python.org/mailman/listinfo/python-list
it. I've been
> crashing against one bit of cleverness after another in Python's
> unification of types and classes...
Well if you can find a way to implement a class system that doesn't use
clever tricks *in its implementation* please let me know.
regards
Steve
--
Steve Hol
On 12/24/2010 2:21 AM, Juha Nieminen wrote:
> In comp.lang.c++ small Pox wrote:
>> http://...
>
> You should take your religion somewhere else.
And you should learn that by re-posting their links you assist spammers.
--
Steve Holden +1 571 484 6266 +1 800 494
> CHEERIOS
>
Sure you do.
regareds
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
else are they to use?
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
n help them.
Squid is a different matter. For that, probably if you go on an IRC
channel (freenode.net is what I use, but others have their favorites).
Maybe #squid?
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
As Steven
d'Aprano has already said, these *are* corner cases and not the whole of
the language.
Don't worry about having a complete knowledge of the language before you
start to use it. That can induce paralysis ...
regards
Steve
--
Steve Holden +1 571 484 62
There's a dict at sys.modules that has a key for each loaded module's
name. When an attempt is made to import a module the first thing the
interpreter does is to look at sys.modules. If it has the correct key in
it then the assumption is that the module has already been imported, and
its
ted due
> to all the interactions with the existing comparison methods) special
> method.
>
But the *real* point is (as the documentation attempts to point out)
that by providing the key argument it gets called only once per element,
whereas the cmp argument (or the objects' __cmp_
can be really useful as long
as you know who to listen to and who to ignore ...
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC
On 12/17/2010 11:13 AM, Tim Golden wrote:
> On 17/12/2010 15:53, Steve Holden wrote:
>
> [... snip example of for-else ...]
>
>> This construct appears to be unpopular in actual use, and when it comes
>> up in classes and seminars there is always interesting debate as peo
d is probably not Guido's crowning language
achievement, but then since the English keywords don't make natural
sense to those who speak other languages it's at least fair that there
should be one that isn't totally natural to English speakers. A small
price to pay for all
ust
>> don't need such guarantees in python.
>
> Even without the cleanup issue, sometimes you want to edit a function
> to affect all return values somehow. If you have a single exit point
> you just make the change there; if you have mulitple you have to hunt
> the
on how to apply and
>>> what are the prerequisites
>>
>> http://www.oreillyschool.com/certificates/python-programming.php
>>
>> No prerequisites that I could see, and currently they are running a 25%
>> discount promotional.
>>
>> ~Ethan~
>>
ing content.
>
> id('foo')
> 3082385472L
> id('foo')
> 3082385472L
>
> Anyone has that kind of code ?
>
> JM
>
>>> id("foo")
2146743808
>>> id ("f"+"o"+"o")
2146744096
>>>
regards
On 12/16/2010 5:44 AM, BartC wrote:
>> On 12/12/2010 2:32 PM, Christian Heimes wrote:
>>> Am 12.12.2010 19:31, schrieb Steve Holden:
>>> $ python -m timeit -n20 -- "i = 0" "while 1:" "i+=1" "if i ==
>>> 100: break"
On 12/15/2010 4:21 PM, Stefan Sonnenberg-Carstens wrote:
> Am 15.12.2010 22:11, schrieb Steve Holden:
>> On 12/15/2010 3:40 PM, Tim Chase wrote:
>>> On a more serious note, it would be interesting to know if it's possible
>>> to test out of the certification for
act me
privately by email on a "no promises" basis.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holden
On 12/15/2010 12:54 PM, Ethan Furman wrote:
> So I just got an e-mail from O'Reilly and their School of Technology
> about a Python Certification course... anybody have any experience with
> this?
>
> It also says Steve Holden is involved -- is this True? (Steve?)
>
> That's wrong:
>
>>>> "to be" or not "to be"
> 'to be'
>
> You need to wrap it with bool() at least (even without interpreting
> Pythons answer to the duality contradiction of consciousness for
> now ;-))
>
>> but d
onality, I will
> encounter problems.
>
Benedict:
Have you considered running a virtual Windows machine to handle the
specific issues that really require a Windows environment? If the
loading isn't at brutal levels VirtualBox is a very adequate solution,
and of course Python user VMWare
d you mind
teaching me to drive?".
Google for phrases like "web services architecture" and "SOAP WSDL" to
get some idea of how these technologies are put together. This assumes,
of course, that you already possess a fair idea of how the web is put
together.
regards
Steve
-
nter the
stdout-stdin pipelines carrying information between coordinating processes.
If a current task is assuming the prior logging package's behavior and
analysing a process's stdout for messages it arguably needs fixing
anyway, though I agree that breakage of any kind is unfortunate.
r
On 12/14/2010 11:52 PM, JohnWShipman wrote:
> you
> know how us ancient Unix weenies are.
Indeed we do ... ;-)
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video!
e more accurate to say that if
C.foo is rebound this does not change the binding of the val default
value. "Change the value of foo" could be though to include "mutate a
mutable value", but in that case both C.foo and the method's val
parameter would still be bound to t
On 12/12/2010 2:32 PM, Christian Heimes wrote:
> Am 12.12.2010 19:31, schrieb Steve Holden:
>> > Would you care to quantify how much CPU time that optimization will
>> > typically save for a loop of fair magnitude (say, a billion iterations)?
> The difference is minimal
while 1:
...
and is, I'd say, therefore to be preferred (except in a code base
intended to compile on 2.2 and before).
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http:/
sy
packages to install over the last ten years.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
On 12/11/2010 6:46 AM, Lie Ryan wrote:
> Also, class scope and instance scope, though similar, are distinct
> scopes. Python also have the hidden interpreter-level scope (the
> __builtins__).
Kindly ignore my last post. Class scopes are lexical, instance scopes
are not.
regards
Steve
> Also, class scope and instance scope, though similar, are distinct
> scopes. Python also have the hidden interpreter-level scope (the
> __builtins__).
But classes and instances don't have scopes. They have namespaces.
That is, if we are talking about lexical scoping.
regards
Steve
your solution but
have programmed less carefully.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
s an AttributeError that this instance doesn't have the __call__
> method, so how to add this kind of method to my instance?
>
> Thanks a lot in advance.
>
> Regards
> Frank.Cui
>
Try renaming your .calc() method to .__call__(). That way the method
will be called when
ing, and not without making the courts free and preventing
> knowledge monopolies. If a certain group is going up
> disproportionately, then there is something to look at. I see everyone
> work as hard as anyone else.
This is completely off-topic for c.l.py. Kindly bugger off.
regards
S
to guess/know it.. ; I guess the best answer would be :
> bad IDE, change IDE but I'm guessing that others IDE can't do a lot
> better in this case.
>
If you'd told us which IDE you were using we might have offered better
advice, but you seem to want to keep that a secre
nfosmark.com/2008/06/string-interpolation-in-python/
>
> but I don't see anything exact, and getting this right would be fairly
> tricky, so I was hoping for canned solution.
>
> Any ideas would be great on this, including pitfalls that people see
> in implementing it.
On 12/7/2010 1:48 AM, MRAB wrote:
> Perhaps Python could use Guido's time machine to check whether the
> sequence will yield another object in the future. :-)
Since there's only one time machine that would effectively be a lock
across all Python interpreters.
regards
Steve
till terminates
by raising a StopIteration error.
I have no idea what Shed Skin does, but to the extent that iterators
don't raise StopIteration on exhaustion I'd say it is in error.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atla
work, because my newsreader
(Thunderbird) makes the assumption that the colons are part of the URLs.
This behavior is common enough that people need to be aware of it.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 h
hat dict lookup
has been extensively optimized, and while I am no longer involved in
numerical computing it seems to me there's still a lot to do to compute
a sin unless your CPU will do it for you.
regards
Steve
>This is why you don't write your own collision library.
> (I on
27;t have the answer about py2exe, but I'm using cxFreeze to create
> executables with Python 3.1, if it's what you're looking for.
>
> http://cx-freeze.sourceforge.net/
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17
ong since I used PL/1
I may be mistaken.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
d take average (3.9 MB/s) users to
> download your app if it were included.
Just as a matter of interest where do you get the information that the
average user has a 3.9 MB/s path to the Internet?
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atla
k the class attribute for that instance.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail
platforms and without the use of COM
magic. There's also an xlwt module for writing spreadsheets. However I
understand that the two together may not be as convenient as modifying a
spreadsheet in place.
In particular, if sh is a spreadsheet then sh.nrows gives you the number
of rows cur
to know what needs to be
done when a specific conditions arises, in which case (presumably) you
have to return some error code and test for that ...
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video!
On 12/2/2010 1:31 PM, Terry Reedy wrote:
> It turns out that try block are computationally lighter weight (faster)
> for normal execution ;-)
Though that alone would hardly be sufficient reason to use them.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCo
to me like a
prejudice that will harm your Python development.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.h
you think about using exceptions to handle exceptional conditions?
If you are new to Python it may not be the obvious soltuion, but it can
greatly simplify program logic.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us
ttribute us bound to the name of the
module. When the module is run as a main program (from the command line)
its __name__ attribute is set to "__main__".
The main() call just calls a function that (presumably) tests the
functions the module provides.
regards
Steve
--
Steve Holden
for a fight
walking into a bar in Glasgow.
However, an unpacking assignment can make everything much more
comprehensible [pun intended] by removing the index operations. The
canonical solution would be something like:
def query():
x, y = sendList()
return ["Formatting only {0} i
27;, 'w' )
> mex9.write(ascii)
>
> Again I'm looking for something simple even it's a few more lines of
> codes...or upgrade(?)
>
> Thanks, appreciate any help.
> mex9.close()
I'm just as stumped as I was when you first asked this question 13
minutes ago. ;-)
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
or multiple inheritance.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
On 11/25/2010 5:58 PM, Yingjie Lan wrote:
> --- On Thu, 11/25/10, Steve Holden wrote:
>>> And even if I made a patch,
>>> then how to publish it?
>>>
>> Once you have a patch, attach it to the issue as a file and
>> try and get
>> it reviewe
ython in a Nutshell" contains a very
thorough description of the new-style class system with an example
showing the resolution of the diamond pattern.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon
On 11/25/2010 10:49 AM, Yingjie Lan wrote:
> --- On Thu, 11/25/10, Steve Holden wrote:
>> From: Steve Holden
>> Subject: Re: tilted text in the turtle module
>> To: python-list@python.org
>> Date: Thursday, November 25, 2010, 7:00 PM
>> On 11/25/2010 5:06 AM, Yin
dislike is to allow existing code to
continue to work. Some of it is removed in Python 3, when backwards
compatibility could be ignored.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video!
e been able to do so far (due to split's annoying habit of
including the matches of any groups in the pattern I have to throw away
every second element) is:
>>> re.split("\s*(,|and)?\s*", 'whatever a, bbb, and c')[::2]
['whatever', 'a', 'bbb'
delay function and
time.time() as your time function.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb
ate a
new issue (assuming a search reveals that there is not already such an
issue).
You may find if you look at the module's code that you can imagine how
to make the change. If not, the request will wait until some maintainer
sees it and has time.
regards
Steve
--
Steve Holden
implicit rule is thrown out of
> the window so cheaply,
> that it literally worth less
> than an empty tuple!
>
Surely an exaggeration. In fact current best practice (which you should
inform yourself of as best you can to help you in your teaching work -
so you are to be congratula
ow number of success stories. On
> the other hand, I'm doing rapid web development in it.
>
> After all there aren't many CL success stories either, but Paul Graham's
> story [1] speaks for itself.
>
> [1] http://www.paulgraham.com/avg.html
>
Perhaps we could take
g because the argument specifies a set of characters, not a
string. So the "d" of "def" is removed because there's a "d" in "abcd_".
If you want to remove a string, try testing is with its .startswith()
method and them removing the right number of
d. it would be awesome to have
> this sucker as a method on the builtin dict, but that'd take a pep, no?
>
>
>
A PEP *and* some explanation of why you would want such an obscure piece
of code built in to the dict object, yes.
regards
Steve
--
Steve Holden +1 571 48
n't break the encapsulation of dict itself, it
>> just takes the liberty to assume that globals() is a non-subclassed
>> dict, at least as far as __setitem__ is concerned.
>
> But it doesn't make this assumption for locals().
>
That's because it reserves the rig
ot; instead of "==", which makes a comparison
> to True or False perfectly safe.
>
But it's still the wrong thing to do.
if condition==True:
and
if condition is True:
should both be replaced (under most circumstances) by
if condition:
regards
Steve
--
Steve Holden
finding a file with that extension on the PATH will
trigger it to be run by the registered interpreter. As far as I know,
anyway.
By default on my Vista system I see PATHEXT contains
C:\Users\sholden\workspace\Python3_Lesson3\src>echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS
ht be helped right away and it's a good addition to any
> Python programmer's library.
>
I'd say "Nushell" is a great book for experienced programmers, whether
in Python or other languages. It's definitely not something I would
recommend for a programming noob
but no cigar. They are only created (assuming file permissions
permit) when the module is *imported*.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommuni
d care less if they see the source code, my goal is all
> around ease of use. I would love to have one distribution file for
> all platforms, but I can live with making three if that's the only
> option.
>
> So, what's my options.
The only one I could find was cxFreeze:
On 11/17/2010 10:19 PM, Tim Harig wrote:
> On 2010-11-18, Steve Holden wrote:
>> On 11/17/2010 7:21 PM, Tim Harig wrote:
>>> On 2010-11-18, dave wrote:
>>>> http://sourceforge.net/projects/mysql-python/
>>>>
>>>> Using this package, WITHOUT
o add that the trend for built-in extension
modules is to require a reference implementation in Python to ease the
task of those wishing to port the language and get as much functionality
(albeit at some performance in cost) available as early in the porting
cycle as possible.
regards
Steve
--
St
On 11/17/2010 7:51 PM, Terry Reedy wrote:
> On 11/17/2010 6:10 PM, Steve Holden wrote:
>
>> $ cat data.py
>> lines = open("data.txt").readlines()
>
> Since you iterate through the file just once, there is no reason I can
> think of to make a complete in-memo
n't affect the logic.
$ cat data.py
lines = open("data.txt").readlines()
from collections import defaultdict
c = defaultdict(int)
for line in lines:
ls = line.split()
if len(ls) > 3 and ls[3].startswith("NCPU="):
amt = int(ls[3][5:])
c[ls[0]] += a
ke a noobish one. Thanks.
>
> Check out
> http://cse.csusb.edu/dick/samples/python.syntax.html#stringprefix
> which lists alternate string prefixes.
>
> Does any bodyy know if "ur" and "UR" mean the same thing?
Yes, they do.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
> the first book I reach for after 6 years of Python coding and it rarely
> disappoints.
+1
It's encyclopedic.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://
to point me to such a method.
I would prefer to think of
a = something
and
lst[i] = something
as in some sense different, because I see names as referencing locations
in a namespace. Perhaps you can help to unify my perceptions.
regards
Steve
--
Steve Holden +1 571 484 6266
t; Without examples of text that the regex is intended to match its
> difficult to say more.
>
>
Or you could look at the Kodos tool, which is written in Python and will
tell you exactly what a Python pattern will and will not match.
http://kodos.sourceforge.net/
regards
Steve
-
do.
>>
>> You can be such an ass sometimes.
>
> "Sometimes"?
>
OK, that's probably enough.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://py
27;s quite easy to "keep objects alive" that were created inside
functions - just make sure you hold on to references outside the
functions, and you are fine.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
S
On 11/12/2010 12:00 PM, Brett Bowman wrote:
> Steve Holden -
> A traceback sounds like a great idea, but I don't know how to go about
> it, or know what is involved. Could you suggest a tutorial I could follow?
>
The traceback is the listing of modules and line numbers that
0-11-12, Lawrence D'Oliveiro wrote:
?
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
address.
>
> You mean from this one on
> <http://mail.python.org/pipermail/python-list/2010-November/1259515.html>?
Here's a screen capture from Thunderbird. Anything else you need?
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atl
rogram gives a
traceback or whether it's a PIL crash, for a start.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http
python-list, you would be
> lying, would you not?
I still await some insight (which, of course, you are under no
obligation to provide) about just why you perceive these innocent
mistakes to be great wrongs that need righting.
regards
Steve
--
Steve Holden +1 571 484 6266
On 11/11/2010 3:23 PM, r0g wrote:
> On 11/11/10 18:01, Steve Holden wrote:
>> On 11/11/2010 9:22 AM, Stef Mientki wrote:
>>> hello,
>>>
>>> finally got Python running at my server.
>>>
>>> Now I would like to replace the PHP server scripts wi
$_Cookie ?
> Google finds lots of links, but I can't find the answer.
>
> thanks,
> Stef Mientki
Stef:
Moving from one language to anther is not just a matter of
transliterating the code. Of you try that you will end up with a messy
code base that looks like PHP written in Python
, for example, experimental work. I seem to remember
that the major server project in "Python Web Programming" has all
configurable modules importing a common Config module, though in my own
defense that *was* almost ten years ago now. (That wasn't intended to be
a production ser
;two\n', 'three\n', 'four\n', 'five\n']
>>> f.next()
Traceback (most recent call last):
File "", line 1, in
StopIteration
>>>
This suggests that you are mistaken about not exhausting the source.
regards
Steve
--
Ste
NT < 5 # ] ## Increment
>> COUNT somewhere
>> ===
>
> print [v for v in sys.stdin.readlines()[:5]]
>
how about print [sys.stdin.readline() for i in range(5)]
At least that won't consume the whole file.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3
, and it does little or no good to draw people's
attention to it.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://w
times from a bash script. Any input or pointers to functions
> that'd help would be very much appreciated. Thanks!
>
from glob import glob
for filename in glob("*"):
# do something with filename
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Py
tion, which might have
added it for all users. If this is an issue you may want to undo the
installation manually by removing its additions to your Python's
Lib/site-packages directory.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atl
style guide) eschew
the single-line form as less readable because the guarded suites (in
this case, simple statements) are not flagged as clearly by indentation
or a trailing colon, and are therefore more likely to be missed by the
casual reader.
regards
Steve
--
Steve Holden +1 571 484 6
On 11/7/2010 10:46 AM, Grant Edwards wrote:
> On 2010-11-07, Steve Holden wrote:
>> On 11/7/2010 8:23 AM, Grant Edwards wrote:
>> [...]
>>> (I bought 4:3 monitors before they got replaced by cheap 16:8
>>> screens)
>>
>> I think you'll fin
On 11/7/2010 8:23 AM, Grant Edwards wrote:
[...]
> (I bought 4:3 monitors before they got replaced by cheap 16:8
> screens)
I think you'll find the new aspect ration is 16:9.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17
1 - 100 of 4732 matches
Mail list logo