In article ,
Mark Lawrence wrote:
> > while (number != guess) and (tries < 5):
>
> One of these days I'll work out why some people insist on using
> superfluous parentheses in Python code. Could it be that they enjoy
> exercising their fingers by reaching for the shift key in conjunction
>
In article ,
Chris Angelico wrote:
>On Mon, May 6, 2013 at 11:08 PM, Roy Smith wrote:
>> On the other hand, I've long since given up trying to remember operator
>> precedence in various languages. If I ever have even the slightest
>> doubt, I just go ahead and put in
In article
,
alex23 wrote:
> On May 6, 10:37 pm, Mark Lawrence wrote:
> > One of these days I'll work out why some people insist on using
> > superfluous parentheses in Python code. Could it be that they enjoy
> > exercising their fingers by reaching for the shift key in conjunction
> > with
In article ,
Sudheer Joseph wrote:
> Dear members,
> I need to print few arrays in a tabular form for example below
> array IL has 25 elements, is there an easy way to print this as
> 5x5 comma separated table? in python
>
> IL=[]
> for i in np.arange(1,bno
In article <72f93710-9812-441e-8d3d-f221d5698...@googlegroups.com>,
sokovic.anamar...@gmail.com wrote:
> Hi,
>
> what is the generally recommended structure when we have into play this type
> of problem:
> multiple versions of python (both in the sense of main versions and sub
> versions, e.g.
In article ,
Dave Angel wrote:
> On 05/07/2013 03:58 PM, Andrew Berg wrote:
> > Currently, I keep Last.fm artist data caches to avoid unnecessary API calls
> > and have been naming the files using the artist name. However,
> > artist names can have characters that are not allowed in file names
In article ,
"Colin J. Williams" wrote:
> Do you really need more than 2.7.3 and 3.3.1.
It's often useful to have older versions around, so you can test your
code against them. Lots of projects try to stay compatible with older
releases.
--
http://mail.python.org/mailman/listinfo/python-li
In article ,
Dave Angel wrote:
> While we're looking for trouble, there's also case insensitivity.
> Unclear if the user cares, but tom and TOM are the same file in most
> configurations of NT.
OSX, too.
--
http://mail.python.org/mailman/listinfo/python-list
In article <518a123c$0$11094$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
> I'm looking for some help in finding a term, it's not Python-specific but
> does apply to some Python code.
>
> This is an anti-pattern to avoid. The idea is that creating a resource
> ought to be the same as "t
Apropos to any of the myriad unicode threads that have been going on
recently:
http://xkcd.com/1209/
--
http://mail.python.org/mailman/listinfo/python-list
FooEntry is a class. How would you describe a list of these in a
docstring?
"A list of FooEntries"
"A list of FooEntrys"
"A list of FooEntry's"
"A list of FooEntry instances"
The first one certainly sounds the best, but it seems wierd to change
the spelling of the class name to make it plural
In article ,
Dennis Lee Bieber wrote:
> On Tue, 07 May 2013 18:10:25 -0500, Andrew Berg
> declaimed the following in
> gmane.comp.python.general:
>
> > None of these would work because I would have no idea which file stores
> > data for which artist without writing code to figure it out. If I
In article <518b00a2$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> > When somebody types in
> > "Blue Oyster Cult", they really mean "Blue Oyster Cult",
>
> Surely they really mean Blue Ãyster Cult.
Yes. The oomlaut was there when I typed it. Who knows what happened
In article <518b133b$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> I suspect that the only way to be completely ungoogleable would be to
> name yourself something common, not something obscure.
http://en.wikipedia.org/wiki/The_band
--
http://mail.python.org/mailman/lis
In article <518b32ef$0$11120$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
> There is no sensible use-case for creating a file without opening it.
Sure there is. Sometimes just creating the name in the file system is
all you want to do. That's why, for example, the unix "touch" command
In article <518be931$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> There is no sensible use-case for creating a file OBJECT unless it
> initially wraps an open file pointer.
OK, I guess that's a fair statement. But mostly because a python file
object only exposes those
In article ,
Michael Speer wrote:
> By his reasoning it simply shouldn't exist. Instead you would access the
> information only like this:
>
> with open("myfile.dat") as f:
> data = f.read()
The problem with things like file objects is they model external
real-world entities, which have ext
In article <518c5bbc$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> I must admit I am astonished at how controversial the opinion "if your
> object is useless until you call 'start', you should automatically call
> 'start' when the object is created" has turned out to be
In article ,
Chris Angelico wrote:
> The first hard disk I ever worked with stored 20MB in the space of a
> 5.25" slot (plus its associated ISA controller card).
Heh. The first hard disk I ever worked with stored 2.4 MB in 6U of rack
space (plus 4 Unibus cards worth of controller). That's no
In article <518c7f05$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> there is no way to create a C file descriptor in a closed state. Such
> a thing does not exist. If you have a file descriptor, the file is
> open. Once you close it, the file descriptor is no longer vali
On May 10, 2013, at 7:49 AM, William Ray Wing wrote:
> On May 10, 2013, at 12:55 AM, Roy Smith wrote:
>
>> In article ,
>> Chris Angelico wrote:
>>
>>> The first hard disk I ever worked with stored 20MB in the space of a
>>> 5.25" slot (plus
In article <518cc239$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> > int fd = 37;
> >
> > I've just created a file descriptor. There is not enough information
> > given to know if it corresponds to an open file or not.
>
> No, you haven't created a file descriptor. You
In article ,
Robert Kern wrote:
> I'd be curious to see in-the-wild instances of the anti-pattern that
> you are talking about, then. I think everyone agrees that entirely
> unmotivated "enable" methods should be avoided, but I have my doubts
> that they come up very often.
As I mentioned e
In article ,
Oscar Benjamin wrote:
> It's not just because of exceptions. In C++ virtual method calls in a
> constructor for a class A will always call the methods of class A even
> if the object being constructed is actually of a subclass B because
> the B part of the object isn't initialised w
In article ,
Chris Angelico wrote:
> On Sat, May 11, 2013 at 12:37 AM, Roy Smith wrote:
> > I suppose, if I had a class like this, I would write a factory function
> > which called the constructor and post-construction initializer. And
> > then I would make the
In article ,
Chris Angelico wrote:
> > Each language has its own set of best practices. Trying to write C++
> > code using Python patterns is as bad as trying to write Python code
> > using C++ patterns.
>
> Agreed, in generality. But what is actually gained by hiding data from
> yourself?
Y
In article ,
Nobody wrote:
> However: there are situations where it is useful to be able to separate
> the simple task of creating an object from more invasive actions such as
> system calls. Particularly in multi-threaded or real-time code (although
> the latter is a non-starter in Python for m
In article <518df898$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> I never intended to give the impression that *any* use of a separate
> "enable" method call was bad. I certainly didn't intend to be bogged
> down into a long discussion about the minutia of file descrip
In article <50bf9366-46e0-4a7f-865b-3f7c7b0f6...@googlegroups.com>,
krishna2pra...@gmail.com wrote:
> I am trying to use os.open() and os.lseek() methods to operate on a device
> file in Linux. My code goes something like this -
>
> # first, open the file as a plain binary
> try:
> self.
In article ,
Henry Leyh wrote:
> Is there a simple way to determine which
> command line arguments were actually given on the commandline, i.e. does
> argparse.ArgumentParser() know which of its namespace members were
> actually hit during parse_args().
I think what you're looking for is sys
In article ,
Henry Leyh wrote:
>On 15.05.2013 14:24, Roy Smith wrote:
>> In article ,
>> Henry Leyh wrote:
>>
>>> Is there a simple way to determine which
>>> command line arguments were actually given on the commandline, i.e. does
>>> argpa
In article <6012d69f-b65e-4d65-90c4-f04876853...@googlegroups.com>,
Bradley Wright wrote:
> Confusing subject for a confusing problem (to a novice like me of course!)
> Thx for the help in advance folks
>
> I have (2) dictionaries:
>
> prices = {
> "banana": 4,
> "apple": 2,
> "ora
In article ,
Chris Angelico wrote:
> On Sat, May 18, 2013 at 8:12 PM, Avnesh Shakya wrote:
> > avin@hp:~$ crontab -e
> > then type -
> > */2 * * * * python /home/avin/data/try.py
> >
>
> You may need to put an explicit path to your Python interpreter. Type:
>
> $ which python
>
> and put tha
In article ,
Dennis Lee Bieber wrote:
> tOn Sat, 18 May 2013 08:49:55 +0100, Fábio Santos
> declaimed the following in
> gmane.comp.python.general:
>
>
> > You mentioned "\n" translating to two lines, but this won't happen. Windows
> > will not mess with what you write to your file. It's just
In article ,
Ned Batchelder wrote:
> So here's a question for people who remember coming up from beginner: as
> you moved from exercises like those in Learn Python the Hard Way, up to
> your own self-guided work on small projects, what project were you
> working on that made you feel independ
In article ,
Ulrich Eckhardt wrote:
> if you have an intermediate class derived
> from unittest.TestCase, that class on its own will be considered as test
> case! If this is not what you want but you still want common
> functionality in a baseclass, create a mixin and then derive from both
>
I've got a suite of about 150 tests written using unittest. It takes
5-10 minutes to run, so I'd really like to use nose to run things in
parallel. The problem is, when I do that, I get lots of test failures.
Obviously, we've got some kind of inter-test dependency that I haven't
been able to
In article ,
Dave Angel wrote:
> On 05/23/2013 09:09 AM, Roy Smith wrote:
> >
> >
> >
> > nosetests --process-timeout=60 --processes=40 test_api.py
> >
>
> Do you have a 40-processor system?
No, but many of the tests are I/O bound.
> And
On May 24, 2013, at 5:05 AM, Jean-Michel Pichavant wrote:
> - Original Message -
>> In article ,
>> Dave Angel wrote:
>>
>>> On 05/23/2013 09:09 AM, Roy Smith wrote:
>>>>
>>>>
>>>>
>>>> nosetests -
In article ,
Malte Forkel wrote:
> Finding out why a regular expression does not match a given string can
> very tedious. I would like to write a utility that identifies the
> sub-expression causing the non-match. My idea is to use a parser to
> create a tree representing the complete regular ex
In article ,
Devin Jeanpierre wrote:
> On Fri, May 24, 2013 at 8:58 AM, Malte Forkel wrote:
> > As a first step, I am looking for a parser for Python regular
> > expressions, or a Python regex grammar to create a parser from.
>
> the sre_parse module is undocumented, but very usable.
>
> > Bu
In article ,
Roy Smith wrote:
> Is there some way to make nose print a report of how it partitioned the
> tests across the various processes?
I never found such a feature, but I did figure out a way to do what I
needed. We use a system of unique id's to track HTTP requests t
We've got a package (with an empty __init__.py), which contains a
setup.py file. When I run nosetests, the test discovery code finds
setup.py, thinks it's a test, and tries to run it (with predictably poor
results).
Is there some way to mark this file as not a test? If it was a method in
a fi
In article ,
Roy Smith wrote:
> We've got a package (with an empty __init__.py), which contains a
> setup.py file. When I run nosetests, the test discovery code finds
> setup.py, thinks it's a test, and tries to run it (with predictably poor
> results).
Ugh, I descri
In article <27969350-4dd8-4afa-881a-b4a2364b3...@googlegroups.com>,
DRJ Reddy wrote:
> Planning to start a python online chronicle.What you want to see in it. :)
Issue 1:
"Whitespace as syntax: mistake or magic?"
"Python 3 vs. IPv6: who will win the race for early adoption?"
"Did Python 3 br
In article <78192328-b31b-49d9-9cd6-ec742c092...@googlegroups.com>,
lokeshkopp...@gmail.com wrote:
> On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote:
> > i need to write a code which can sort the list in order of 'n' without use
> > builtin functions
> >
> > can anyone h
In article <74e33270-a79a-4878-a400-8a6cda663...@googlegroups.com>,
lokeshkopp...@gmail.com wrote:
> ya steven i had done the similar logic but thats not satisfying my professor
> he had given the following constrains
> 1. No in-built functions should be used
> 2. we are expecting a O(n) solut
In article ,
Chris Angelico wrote:
> > Also, comparison of Python flavors (CPython, PyPy, Cython, Stackles, etc.)
Stackles? That sounds like breakfast cereal.
"New all-natural stackles, with 12 essential vitamins, plus fiber!"
--
http://mail.python.org/mailman/listinfo/python-list
In article <51a0caac$0$30002$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Sat, 25 May 2013 16:41:58 +1000, Chris Angelico wrote:
>
> > On Sat, May 25, 2013 at 4:38 PM, zoom wrote:
> >> But why would anyone want to use IPv6?
> >
> > I hope you're not serious :)
>
> He's pl
In article <15a1bb3a-514c-454e-a966-243c84123...@googlegroups.com>,
John Ladasky wrote:
> Because someone's got to say it... "The generation of random numbers is too
> important to be left to chance." Robert R. Coveyou
Absolutely. I know just enough about random number generation to
unders
In article <7cd17be8-d455-4db8-b8d0-ccc757db5...@googlegroups.com>,
John Ladasky wrote:
> On Saturday, May 25, 2013 8:30:19 AM UTC-7, Roy Smith wrote:
> > From my phone, I
> > can call any other phone anywhere in the world. But I can't talk
> > directly to
In article <8f19e20c-4f77-43dc-a732-4169e482d...@googlegroups.com>,
John Ladasky wrote:
> A perfectly fair point, Roy. It's just when you started suggesting
> connecting to your neighbor's file server -- well, that's not something that
> many people would ordinarily do. So, my mind leaped to
In article <5f101d70-e51f-4531-9153-c92ee2486...@googlegroups.com>,
Ahmed Abdulshafy wrote:
> Hi,
> I'm having a hard time wrapping my head around short-circuit logic that's
> used by Python, coming from a C/C++ background; so I don't understand why the
> following condition is written this wa
In article ,
Jussi Piitulainen wrote:
> A light-weighter way is to have each task end by assigning the next
> task and returning, instead of calling the next task directly. When a
> task returns, a driver loop will call the assigned task, which again
> does a bounded amount of work, assigns the
In article <20130526194310.9cdb1be80b42c7fdf0ba5...@gmx.net>,
Wolfgang Keller wrote:
> HTTP will never be a suitable transport layer for a RPC protocol.
What, in particular, is wrong with HTTP for doing RPC? RPC is pretty
straight-forward. Take this method, run it over there, with these
arg
In article <4d02f46f-8264-41bf-a254-d1c204696...@googlegroups.com>,
RVic wrote:
> Suppose I have a deck of cards, and I shuffle them
>
> import random
> cards = []
> decks = 6
> cards = list(range(13 * 4 * decks))
> random.shuffle(cards)
>
> So now I have an array of cards. I would like to cut
In article ,
Michael Torrie wrote:
> On good thing web development has brought us is the knowledge that
> modularization and layers are a brilliant idea.
Modularization and layers were a brilliant idea long before the web came
around.
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Terry Jan Reedy wrote:
> On 5/26/2013 7:11 AM, Ahmed Abdulshafy wrote:
>
> > if not allow_zero and abs(x) < sys.float_info.epsilon:
> > print("zero is not allowed")
>
> The reason for the order is to do the easy calculation first and the
> harder one only i
In article ,
Chris Rebert wrote:
> On May 23, 2013 3:42 AM, "Schneider" wrote:
> >
> > Hi list,
> >
> > how can I serialize a python class to XML? Plus a way to get the class
> back from the XML?
>
> There's pyxser: http://pythonhosted.org/pyxser/
>
> > My aim is to store instances of this cl
In article <51a28f42$0$15870$e4fe5...@news.xs4all.nl>,
Irmen de Jong wrote:
> On 26-5-2013 22:48, Roy Smith wrote:
>
> > The advantage of pickle over json is that pickle can serialize many
> > types of objects that json can't. The other side of the coin is that
In article <10be5c62-4c58-4b4f-b00a-82d85ee4e...@googlegroups.com>,
Bryan Britten wrote:
> If I use the following code:
>
>
> import urllib
>
> urlStr = "https://stream.twitter.com/1/statuses/sample.json";
>
> fileHandle = urllib.urlopen(urlStr)
>
> twtrText = fileHandle.readlines()
>
>
>
In article ,
Chris Angelico wrote:
> I'll use XML when I have to, but if I'm inventing my own protocol,
> nope. There are just too many quirks with it. How do you represent an
> empty string named Foo?
>
>
>
> or equivalently
>
>
>
> How do you represent an empty list named Foo? The same w
In article ,
Jabba Laci wrote:
> I have a growing JSON file that I edit manually and it might happen
> that I repeat a key. If this happens, I would like to get notified.
The real answer here is that JSON is probably not the best choice for
large files that get hand-edited. For data that you
hey both have the same GIGO
issue.
> How to process (read) YAML files in Python?
Take a look at http://pyyaml.org/
---
Roy Smith
r...@panix.com
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Chris Angelico wrote:
> On Thu, May 30, 2013 at 3:10 PM, Steven D'Aprano
> wrote:
> > # Wrong, don't do this!
> > x = 0.1
> > while x != 17.3:
> > print(x)
> > x += 0.1
> >
>
> Actually, I wouldn't do that with integers either. There are too many
> ways that a subsequent e
In article ,
Jussi Piitulainen wrote:
> I wonder why floating-point errors are not routinely discussed in
> terms of ulps (units in last position).
Analysis of error is a complicated topic (and is much older than digital
computers). These sorts of things come up in the real world, too. For
In article ,
Nobody wrote:
> On Thu, 30 May 2013 19:38:31 -0400, Dennis Lee Bieber wrote:
>
> > Measuring 1 foot from the 1000 foot stake leaves you with any error
> > from datum to the 1000 foot, plus any error from the 1000 foot, PLUS any
> > azimuth error which would contribute to shorte
In article <51a86319$0$29966$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> In an early talk Ken was explaining the advantages of tolerant
> comparison. A member of the audience asked incredulously,
> âSurely you donât mean that when A=B and B=C, A may not equal C
In article ,
Erik Max Francis wrote:
> On 05/29/2013 08:05 AM, Chris Angelico wrote:
> > It's not a bad tool. I used it as a sort of PHP preprocessor, because
> > requirements at work had me wanting to have a source file defining a
> > PHP class and having an autogenerated section in the middle
In article ,
Larry Hudson wrote:
> def partdeux():
> print('A man lunges at you with a knife!')
> option = input('Do you DUCK or PARRY? ').lower()
> success = random.randint(0, 1)
> if success:
> if option == 'duck':
> print('He tumbles over you')
>
In article ,
Ralf Schmitt wrote:
> Hi,
>
> I have uploaded greenlet 0.4.1 to PyPI:
> https://pypi.python.org/pypi/greenlet
>
> What is it?
> ---
> The greenlet module provides coroutines for python. coroutines allow
> suspending and resuming execution at certain locations.
>
> concurr
On Sunday, June 9, 2013 8:22:17 PM UTC+3, Fábio Santos wrote:
>> This does not seem like a python question, instead a HTML/JavaScript
one.
In article <0021fabe-78ed-4e79-8cdf-468b4ccc7...@googlegroups.com>,
guytam...@gmail.com wrote:
> its a python question since the request is received on a py
In article
,
Jean Dubois wrote:
> I'm writing some code to check whether an url is available or not,
> therefore I make use of a wget-command in Linux and then check whether
> this is successful
In general, "shelling out" to run a command-line utility should be the
last resort. It's slower,
In article
<20165c85-4cc3-4b79-943b-82443e4a9...@w7g2000vbw.googlegroups.com>,
Jean Dubois wrote:
> But, really,
> > once you've done all that (and it's worth doing as an exercise), rewrite
> > your code to use urllib2 or requests. It'll be a lot easier.
>
> Could you show me how to code the
In article ,
Rui Maciel wrote:
> Essentially, a Model object stores lists of Point objects and Line objects,
> and Line objects include references to Point objects which represent the
> starting and ending point of a line.
>
> class Point:
> position = []
>
> def __init__(sel
I have a list, songs, which I want to divide into two groups.
Essentially, I want:
new_songs = [s for s in songs if s.is_new()]
old_songs = [s for s in songs if not s.is_new()]
but I don't want to make two passes over the list. I could do:
new_songs = []
old_songs = []
for s in songs:
if s.
In article ,
Roel Schroeven wrote:
> new_songs, old_songs = [], []
> [(new_songs if s.is_new() else old_songs).append(s) for s in songs]
Thanks kind of neat, thanks.
I'm trying to figure out what list gets created and discarded. I think
it's [None] * len(songs).
--
http://mail.python.org/ma
In article ,
Chris Angelico wrote:
> On Wed, Jun 12, 2013 at 1:28 AM, Serhiy Storchaka wrote:
> > 11.06.13 01:50, Chris Angelico напиÑав(ла):
> >
> >> On Tue, Jun 11, 2013 at 6:34 AM, Roy Smith wrote:
> >>>
> >>> new_songs = [s for s in
In article ,
Serhiy Storchaka wrote:
> 11.06.13 07:11, Roy Smith напиÑав(ла):
> > In article ,
> > Roel Schroeven wrote:
> >
> >> new_songs, old_songs = [], []
> >> [(new_songs if s.is_new() else old_songs).append(s) for s in songs]
> >
I'm attempting to write a nose plugin. Nosetests (version 1.3.0) is not
seeing it. I'm running python 2.7.3. The plugin itself is:
mongo_reporter.py:
import nose.plugins
import logging
log = logging.getLogger('nose.plugins.mongoreporter')
clas
In article
<69d4486b-d2ff-4830-b16e-f3f6ea73d...@kt20g2000pbb.googlegroups.com>,
alex23 wrote:
> On Jun 12, 10:54 am, Roy Smith wrote:
> > I'm attempting to write a nose plugin. Nosetests (version 1.3.0) is not
> > seeing it.
> >
&g
In article
<0d704515-46c9-486a-993c-ff5add3c9...@rh15g2000pbb.googlegroups.com>,
alex23 wrote:
> On Jun 12, 11:43 am, Roy Smith wrote:
> > Just to see what would happen, I tried changing it to:
> >
> > entry_points = {
> >
In article ,
Phil Connell wrote:
> > Well, continuing down this somewhat bizarre path:
> >
> > new_songs, old_songs = [], []
> > itertools.takewhile(
> > lambda x: True,
> > (new_songs if s.is_new() else old_songs).append(s) for s in songs)
> > )
> >
> > I'm not sure I got the syntax
In article ,
Roy Smith wrote:
>setup(
>name = "Mongo Reporter",
>version = "0.0",
>entry_points = {
>'nose.plugins.1.10': ['mongoreporter = mongo_reporter.MongoReporter'],
>},
>)
The problem turned ou
In article <98c13a55-dbf2-46a7-a2aa-8c5f052ff...@googlegroups.com>,
cutems93 wrote:
> I am looking for an appropriate version control software for python
> development, and need professionals' help to make a good decision. Currently
> I am considering four software: git, SVN, CVS, and Mercuria
In article <2644d0de-9a81-41aa-b27a-cb4535964...@googlegroups.com>,
cutems93 wrote:
> Thank you everyone for such helpful responses! Actually, I have one more
> question. Does anybody have experience with closed source version control
> software? If so, why did you buy it instead of downloadin
In article ,
Tim Chase wrote:
> On 2013-06-13 10:20, Serhiy Storchaka wrote:
> > 13.06.13 05:41, Tim Chase напиÑав(ла):
> > > -hg: last I checked, can't do octopus merges (merges with more
> > > than two parents)
> > >
> > > +git: can do octopus merges
> >
> > Actually it is possible i
In article
<8a75b1e4-41e8-45b5-ac9e-6611a4698...@g9g2000pbd.googlegroups.com>,
rusi wrote:
> On Jun 12, 8:20 pm, Zero Piraeus wrote:
> > :
> >
> > On 12 June 2013 10:55, Neil Cerutti wrote:
> >
> >
> >
> > > He's definitely trolling. I can't think of any other reason to
> > > make it so hard
In article
<545a441b-0c2d-4b1e-82ae-024b011a4...@e1g2000pbo.googlegroups.com>,
rusi wrote:
> Python is at least two things, a language and a culture.
This is true of all languages. Hang out on the PHP, Ruby, Python, etc,
forums and you quickly learn that the cultures are as different (or mor
In article
<8a333cd0-c1cf-4f41-ac49-65f0b23ed...@ow4g2000pbc.googlegroups.com>,
alex23 wrote:
> On Jun 14, 2:24 am, Íéêüëáïò Êïýñáò wrote:
> > iam researchign a solution to this as we speak.
>
> Spamming endless "ZOMG HELP ME I'M INCOMPETENT" posts isn't "research".
But it could be an argume
In article , Anssi Saari
wrote:
> I have some experience with ClearCase. I don't know why anyone would buy
> it since it's bloated and slow and hard to use and likes to take over
> your computer.
ClearCase was the right solution to certain specific problems which
existed 20 years ago. It does
In article ,
Chris Angelico wrote:
> On Sat, Jun 15, 2013 at 3:39 PM, Tim Delaney
> wrote:
> > I can absolutely confirm how much ClearCase slows things down. I completely
> > refused to use dynamic views for several reasons - #1 being that if you lost
> > your network connection you couldn't wo
In article ,
Grant Edwards wrote:
> There is some ambiguity in the term "byte". It used to mean the
> smallest addressable unit of memory (which varied in the past -- at
> one point, both 20 and 60 bit "bytes" were common).
I would have defined it more like, "some arbitrary collection of
adja
In article ,
Chris ï¾Kwpolskaï¾ Warrick wrote:
> (Iâm using wc -c to count the bytes in all files there are. du is
> unaccurate with files smaller than 4096 bytes.)
It's not that du is not accurate, it's that it's measuring something
different. It's measuring how much disk space the file
I've got a 170 MB file I want to search for lines that look like:
[2010-10-20 16:47:50.339229 -04:00] INFO (6): songza.amie.history - ENQUEUEING:
/listen/the-station-one
This code runs in 1.3 seconds:
--
import re
pattern = re.compile(r'ENQUEUEING: /listen/(.*)')
co
t; pattern, you could just as easily split the line yourself instead of
> creating a group.
At this point, I'm not so much interested in making this faster as
understanding why it's so slow. I'm tempted to open this up as a performance
bug against the regex module (which I assume
In article ,
Mark Lawrence wrote:
> Out of curiousity have the tried the new regex module from pypi rather
> than the stdlib version? A heck of a lot of work has gone into it see
> http://bugs.python.org/issue2636
I just installed that and gave it a shot. It's *slower* (and, much
higher var
On Tuesday, June 18, 2013 2:10:16 PM UTC-4, Johannes Bauer wrote:
> Resulting file has a size of 91530018 and md5 of
> > 2d20c3447a0b51a37d28126b8348f6c5 (just to make sure we're on the same
> > page because I'm not sure the PRNG is stable across Python versions).
If people want to test against m
On Tuesday, June 18, 2013 4:05:25 PM UTC-4, Antoine Pitrou wrote:
> One invokes a fast special-purpose substring searching routine (the
> str.__contains__ operator), the other a generic matching engine able to
> process complex patterns. It's hardly a surprise for the specialized routine
> to be f
On Wednesday, June 19, 2013 9:21:43 AM UTC-4, Duncan Booth wrote:
> I'd just like to point out that your simple loop is looking at every
> character of the input string. The simple "'ENQ' not in line" test can look
> at the third character of the string and if it's none of 'E', 'N' or 'Q'
> ski
1 - 100 of 2530 matches
Mail list logo