On Mon, May 6, 2013 at 5:55 PM, duncan smith wrote:
>
> What license?
>>
>> Thanks!
>>
>>
> Here's the text I usually prepend.
>
>
> ##Copyright (c) 2013 duncan g. smith
> ##
> ##Permission is hereby granted, free of charge, to any person obtaining a
> ##copy of this software and associated docume
On 5/7/13, 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 for most
> file systems (e.g., C/A/T has forward slashe
OK, I've got one copy of trees.py with md5
211f80c0fe7fb9cb42feb9645b4b3ffe. You seem to be saying I should have
two though, but I don't know that I do...
On 5/8/13, duncan smith wrote:
> On 07/05/13 02:20, Dan Stromberg wrote:
>>
>> On Mon, May 6, 2013
5
11 False 6 15
11 False 6 15
11 False 6 15
Thoughts?
BTW, printing an empty tree seems to say "sentinel". 'not sure if that was
intended.
Thanks!
On Thu, May 9, 2013 at 6:52 AM, duncan smith wrote:
> On 09/05/13 02:40, Dan Stromberg wrote:
>
>> OK, I've got o
On Sat, May 11, 2013 at 4:24 PM, Dan Stromberg wrote:
>
> I'm afraid I'm having some trouble with the module. I've checked it into
> my SVN at
> http://stromberg.dnsalias.org/svn/red-black-tree-mod/trunk/duncan
>
> I have two versions of your tests in there now
I'm getting the error in the subject, from the following code:
def add(self, key):
"""
Adds a node containing I{key} to the subtree
rooted at I{self}, returning the added node.
"""
node = self.find(key)
if not node:
node.key = key
With CPython 2.7.3:
./t
time taken to write a file of size 52428800 is 15.86 seconds
time taken to write a file of size 52428800 is 7.91 seconds
time taken to write a file of size 52428800 is 9.64 seconds
With pypy-1.9:
./t
time taken to write a file of size 52428800 is 3.708232 seconds
What kind of ordered dictionaries? Sorted by key.
I've redone the previous comparison, this time with a better red-black tree
implementation courtesy of Duncan G. Smith.
The comparison is at
http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/just-trees/
The Red-Black tree g
On Tue, May 21, 2013 at 12:35 PM, Gisle Vanem wrote:
> Are anyone aware of a tool that can show me at run-time
> which modules (pyd/dll) are loaded into a Python program at a specific
> time (or over time)?
>
> To clarify, e.g. when running a sample from PyQt4
> (examples\tutorials\**addressbook\
On Thu, May 23, 2013 at 9:41 AM, duncan smith wrote:
>
> RBT is quicker than Treap for insertion with randomized data, but slower
> with ordered data. Randomized data will tend to minimize the number of tree
> rotations needed to keep the RBT balanced, whilst the Treap will be
> performing rotatio
On Wed, May 8, 2013 at 10:54 PM, dieter wrote:
> jamadagni writes:
> > ...
> I cannot help you with "ctypes". But, if you might be able to use
> "cython", then calling callbacks is not too difficult
> (you can find an example in e.g. my "dm.xmlsec.binding").
>
> Note, however, that properly hand
On Fri, May 24, 2013 at 3:53 PM, Thomas Murphy
wrote:
> Hi beloved list,
>
> I'm having a dumb and SO doesn't seem to have this one answered. I was
> sent a long list of instagram usernames to tag for a nightlife
> announcement in this format(not real names(i hope))
>
> cookielover93
> TheGermanHa
I'm putting together a spreadsheet about Python-in-the-browser technologies
for my local python user group.
I've been hitting the mailing lists for the various implementations
already, but I thought I should run it by people here at least once.
Anyway, here it is:
http://stromberg.dnsalias.org/~
Security is an important topic... but I'm not sure how I could gather info
about the security of these implementations. Still, it's an idea worth at
least keeping in the back of my mind.
On Fri, May 24, 2013 at 4:43 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
> Thanks Dan! All o
On Sun, May 26, 2013 at 9:12 AM, Shriramana Sharma wrote:
> On Friday, May 24, 2013 8:56:28 AM UTC+5:30, Dan Stromberg wrote:
> > Cython is good. So is the new cffi, which might be thought of as a
> > safer (API-level) version of ctypes (which is ABI-level).
>
> Hi -- can you
Here're slides from a presentation about writing code that runs on 2.x and
3.x: http://stromberg.dnsalias.org/~dstromberg/Intro-to-Python/
And in case you still want a preprocessor for Python (you likely don't need
one this time), here's an example of doing this using the venerable m4:
https://pyp
On Wed, May 29, 2013 at 11:13 AM, Ma Xiaojun wrote:
> Hi, list.
>
> For the core language, I have mixed feeling. On one hand, I find that
> Python has some sweet feature that is quite useful. On the other hand,
> I often find Pyhton snippets around hard to understand. I admit that I
> never learn
From
http://stromberg.dnsalias.org/~dstromberg/Intro-to-Python/Python%202%20and%203.pdf:
Try/Except: both 2.x and 3.x
try:
print(1/0)
except ZeroDivisionError:
extra = sys.exc_info()[1]
print('oops')
HTH
On Sun, Jun 2, 2013 at 7:13 AM, Jason Swails wrote:
> Hello Everyone,
>
> I ha
On Sun, Jun 2, 2013 at 11:19 AM, wrote:
>
> I am trying to get the arp cache poisoning working with scapy and python
> but having problems
>
> The python script itself is very simple:
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py
> #!/usr/bin/env python
>
> import sys
On Sun, Jun 2, 2013 at 6:12 PM, Fdama wrote:
> Hi,
>
> I was following an exercise in a book when I edited the code and came
> across something I did not get. Here is the relevant part of the code that
> works:
>
> start=None #initialise
> while start !="":
> start=input("\nStart: ")
>
>
On Mon, Jun 3, 2013 at 7:31 AM, Grant Edwards wrote:
> That's a common assumption, but historically, a "byte" was merely the
> smallest addressable unit of memory. The size of a "byte" on widely
> used used CPUs ranged from 4 bits to 60 bits.
>
> Quoting from http://en.wikipedia.org/wiki/Byte
>
>
On Mon, Jun 3, 2013 at 4:18 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
>
> > Date: Mon, 3 Jun 2013 15:41:41 -0700
> > Subject: Re: How to get an integer from a sequence of bytes
> > From: drsali...@gmail.com
> > To: python-list@python.org
> [...]
On Tue, Jun 4, 2013 at 4:53 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
> Do you consider Python a 4GL? Why (not)?
>
By the wikipedia definition of 4GL and 5GL, I'd say Python is neither. And
it's not a VHLL either, again according to the wikipedia definition. But
IMO it is too
On Thu, Jun 6, 2013 at 9:49 AM, Rick Johnson
wrote:
> Congrats: Again you join the ranks of most children who make excuses for
> their foolish actions along the lines of:
>
> "Hey, they did it first!"
>
> Well, the lemmings get what they deserve i suppose.
>
Lemmings don't really jump off cliffs
On Fri, Jun 7, 2013 at 8:53 AM, wrote:
> I also understand that Python isn't exactly the *BEST* choice programming
> a game, but I have heard it is possible. Tell me if it's true. Thanks!
>
One of the Blizzard people told me that it's very common to program game
logic in Python, with the 3D stuf
http://www.unixguide.net/network/socketfaq/4.7.shtml
It's better to add the ability to recreate a socket if it encounters
trouble. SO_KEEPALIVE is there to help you detect if the other end of
your connection has disappeared.
Network programming has relatively few absolutes - it's best to build
in
If something happens with this for CPython, it'll likely come from Pypy
developers first. They seem to be interested in doing things in a way that
is (or can be made) compatible with CPython. If you want to help them
along, they're taking donations to fund the work, or you could donate your
own t
On Sun, Jul 1, 2012 at 11:58 AM, Thomas Jollans wrote:
> On 07/01/2012 08:44 PM, Dan Stromberg wrote:
> > IronPython, sadly, lacks a python standard library.
>
>
> Beg pardon?
>
>
> https://github.com/IronLanguages/main/tree/master/External.LCA_RESTRICTED/Languages/
On Tue, Jul 3, 2012 at 3:08 PM, Miheer Dewaskar wrote:
> On Tue, Jul 3, 2012 at 8:10 PM, Tim Chase
> wrote:
> I want it to be a generic Game solver.So the number of states depends
> on the game.
>
Keep in mind that it would probably be a generic game solver for games that
have simple board evalu
Why is it that so much 3rd party python code gets installed to
site-packages?
Even for things that are almost certainly going to be used by a single
application?
Even for things you might only use once?
Even for things that might require one version for one app, and another
version for another a
On Tue, Jul 3, 2012 at 9:04 PM, Ian Kelly wrote:
> On Tue, Jul 3, 2012 at 2:40 PM, Dan Stromberg wrote:
> >
> > Why is it that so much 3rd party python code gets installed to
> > site-packages?
>
> Because that's what site-packages is for?
>
Agh. But -why-
On Tue, Jul 3, 2012 at 10:04 PM, Ian Kelly wrote:
>
> >> The site module has to process any .pth files in the site-packages,
> >> but apart from that, I think the actual amount of stuff in
> >> site-packages should be irrelevant.
> >
> > Irrelevant to what? More stuff in site slowing things dow
On Mon, Jul 9, 2012 at 8:24 PM, John Nagle wrote:
> On 7/8/2012 2:52 PM, Christian Heimes wrote:
>
>> You are contradicting yourself. Either the OS is providing a fully
>> atomic rename or it doesn't. All POSIX compatible OS provide an atomic
>> rename functionality that renames the file atomical
On Sat, Jul 14, 2012 at 4:29 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> I don't remember whether it is Javascript or PHP that uses dynamic
> binding, but whichever it is, it is generally considered to be a bad
> idea, at least as the default or only behaviour.
>
> Bash is
On Fri, Jul 20, 2012 at 8:59 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Sat, 21 Jul 2012 13:35:21 +1000, Simon Cropper wrote:
>
> > Hi,
> >
> > Can you use PyPy as a direct replacement for the normal python or is it
> > a specialized compiler that can only work with li
Is there such a thing as a Python option parsing module, that plays well
with pylint?
I've been doing my own option parsing to get working static analysis.
--
http://mail.python.org/mailman/listinfo/python-list
If a class has defined its own __repr__ method, is there a way of getting
the default repr output for that class anyway?
I'm attempting to graph some objects by digging around in the garbage
collector's idea of what objects exist, and when I go to format them for
the graph node labels, the ones th
On Sat, Jul 14, 2012 at 1:00 AM, Gelonida N wrote:
>
> What I do at the moment is:
>
> For Windows I use winsound.Beep
>
> For Linux I create some raw data and pipe it into sox's
> 'play' command.
>
> I don't consider this very elegant
You may want to get over that. Some software vendors/distr
On Thu, Jul 26, 2012 at 9:06 PM, Ethan Furman wrote:
> Chris Angelico wrote:
>
>> On Tue, Jul 24, 2012 at 1:20 AM, Steven D'Aprano
>> >
>> wrote:
>>
>>> (Although if you think about the implementation of dicts as hash tables,
>>> it does seem likely that it is trivial to enforce this -- one would
On Sun, Jul 29, 2012 at 5:52 PM, Andrew Berg wrote:
> On 7/29/2012 7:12 PM, Rodrick Brown wrote:
> > Python is a glue language much like Perl was 10 years ago. Until the
> > GIL is fixed I doubt anyone will seriously look at Python as an option
> > for large enterprise standalone application devel
On Mon, Jul 30, 2012 at 12:44 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> I wish to extract the bit fields from a Python float, call it x. First I
> cast the float to 8-bytes:
>
> s = struct.pack('=d', x)
> i = struct.unpack('=q', s)[0]
>
> Then I extract the bit fields fr
On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott wrote:
> lspci gets all its information from the files in /sys/bus/pci/devices.
>
> You can use os.listdir() to list all the files in the folder and then open
> the files you want to get the data you need.
>
Gee, wouldn't it be more portable to parse
On Mon, Jul 30, 2012 at 11:14 PM, Emile van Sebille wrote:
> On 7/30/2012 3:56 PM Dan Stromberg said...
>
>
>> On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott >
>
> And of course you can write list comprehensions on as many lines as
>> it take to make the code
CGI's old stuff. Sure it's easy to find doc about it - it's been around
longer.
I'd recommend either CherryPy or Bottle - because these are the two (that I
know of) that support Python 3 today.
Here's a nice comparison of Python REST frameworks:
http://www.youtube.com/watch?v=AYjPIMe0BhA
I'm u
A select() loop should work.
On Fri, Aug 10, 2012 at 1:01 PM, loial wrote:
> I am writing an application to send data to a printer port(9100) and then
> recieve PJL responses back on that port. Because of the way PJL works I
> have to do both in the same process(script).
>
> At the moment I do n
This sounds like a ScriptAlias thing:
http://httpd.apache.org/docs/2.2/howto/cgi.html
On Fri, Aug 10, 2012 at 5:14 PM, Smaran Harihar wrote:
> Hi,
>
> I have set executable permissions for my py script (cgi-script) but for
> some reason rather than executing it, the browser simply downloads the p
On Mon, Aug 20, 2012 at 10:25 PM, Cameron Simpson wrote:
> I was going to chime in with this anyway had the thread said nothing; I
> strongly prefer to specify --prefix explicitly with configure.
>
> My personal habit to to build with (adjust to match):
>
> --prefix=/usr/local/python-2.6.4
>
>
I know I've seen this discussed before, and I came away from observing the
discussion thinking "Python doesn't do that very well...", but we have some
people here who really would like to do this, and I need to better
understand the pros and cons now.
Is there a good way of reimporting an _indepen
I'm familiar with pylint, and have recently played with pyflakes and
flake8. I've also heard of pychecker.
Are there others, perhaps including some that aren't written in Python, but
still check Python?
We're considering doing static analysis of a large CPython 3.2 project, but
so far the traditi
On Wed, Oct 17, 2012 at 11:06 PM, Zero Piraeus wrote:
> :
>
> Okay, so, first thing vaguely Python-related that comes to mind [so
> probably not even slightly original, but then that's not really the
> point]:
>
> What are people's preferred strategies for dealing with lines that go
> over 79 cha
What's a good debugger for CPython 3.2? I'd prefer to use it on Linux Mint
13, and I'd be happy with something based on X11 or curses.
I tried winpdb, but it was cranky that Linux didn't have a spawn callable.
Why they didn't use the portable subprocess module escapes me.
I also tried ddd, but i
On Fri, Oct 19, 2012 at 9:26 AM, Dan Stromberg wrote:
>
> What's a good debugger for CPython 3.2? I'd prefer to use it on Linux
> Mint 13, and I'd be happy with something based on X11 or curses.
>
> I tried winpdb, but it was cranky that Linux didn't have a
On Thu, Oct 25, 2012 at 9:24 AM, Mark Lawrence wrote:
> On 25/10/2012 15:47, Charles Hixson wrote:
>
>> In Python3 is there any good way to count the number of on bits in an
>> integer (after an & operation)?
>> Alternatively, is there any VERY light-weight implementation of a bit
>> set? I'd pre
I'm attempting to build cpython 2.{5,6,7} and cpython 3.[0,1,2,3}. I find
that having them all around facilitates interversion testing and
discovering what works in which versions.
Anyway, in 3.3, I'm getting a bz2 module, but in 3.2, I'm not - but only
when compiling on Linux Mint 14. On Linux
On Wed, Nov 21, 2012 at 12:18 PM, Dan Stromberg wrote:
>
> I'm attempting to build cpython 2.{5,6,7} and cpython 3.[0,1,2,3}. I find
> that having them all around facilitates interversion testing and
> discovering what works in which versions.
>
> Anyway, in 3.3, I'
I think that /usr/*/python-whatever/site-packages and related directories
are very much overused in the python world, and tend to cause problems
eventually - EG when you need to install two versions of a program on the
same machine, same interpreter.
I prefer to provide a configure script that acc
On Wed, Feb 15, 2012 at 3:36 PM, Paul Rubin wrote:
> Martin Schöön writes:
> > A very quick internet search indicated that this should be no big
> > deal if I go for an Android-based phone. What about the alternatives?
>
> It works pretty well with Maemo, though phones with that are not so easy
On Wed, Feb 29, 2012 at 8:07 PM, Xah Lee wrote:
> fun example.
>
> in-place algorithm for reversing a list in Perl, Python, Lisp
> http://xahlee.org/comp/in-place_algorithm.html
>
> plain text follows
>
>
> What's “In-place Algorithm”?
>
> Xah Lee, 2012-02
I've done little with Ciscos, but what if you use individual things like
"show ip ospf", "show ip rip database", etc. instead of "show ip route".
Does that makes things a little more consistent?
Often big problems are simpler if we can divide them into smaller, more
manageable subproblems.
On S
You might check out pymite. http://wiki.python.org/moin/PyMite Oh, but
I'm now realizing that's part of the python on a chip project, so in a way
it's already been mentioned.
Anyway, PyMite, I gather, is a tiny python for microcontrollers.
On Sun, Mar 4, 2012 at 2:58 AM, Justin Drake wrote:
>
If the ID's are sorted, you could probably rig a binary search using seek.
This'll be easier if the records have a constant length, but it's still
possible for variable-length, just messier.
Otherwise you could stash them all in a dictionary (in memory) or anydbm
(on disk) to get indexed access.
A suggestion:
1) strace it.
http://stromberg.dnsalias.org/~strombrg/debugging-with-syscall-tracers.html
2) Show the output to a C programmer, or take some educated guesses
yourself.
On Thu, Mar 15, 2012 at 11:47 PM, Steven Lo wrote:
> **
>
> Hi,
>
> We are getting the following error during a 'm
I personally feel that python-list should be restricted to discussing
Python the language, not just CPython the implementation.
Anyway, there are many kinds of production, no?
But I use Pypy for my backups frequently, which is a form of production
use. Pypy+backshift pass my automated tests as w
You could use an hbox. Or rather, a vbox with a bunch of hbox's in it.
On Thu, Mar 29, 2012 at 10:45 PM, Jason Hsu, Mr. Swift Linux <
jhsu802...@gmail.com> wrote:
> I've decided to use PyGTK instead of gtkdialog for providing
> configuration menus/dialog boxes in Swift Linux, the Linux distro I
You might try running your Python process with:
strace -f -s 1024 -o /tmp/script.strace python /path/to/script.py
Then you (perhaps with a C programmer) can likely track down what happened
right before the crash by examining the system call tracer near the end of
the file.
http://stromberg.dns
Bringing this back to Python a bit:
http://newcenturycomputers.net/projects/rbtree.html
http://pypi.python.org/pypi/bintrees/0.3.0
http://pypi.python.org/pypi/treap/0.995
Red-Black trees are supposed to be slower than treaps on average, but
they're also supposed to have a lower standard deviation
http://code.google.com/p/android-scripting/
However, I've not used it, and I'm told it requires a stub for each new
android method exposed to python. I find it a little regrettable that they
didn't start frp, jython or pypy for jvm instead of cpython, to avoid all
the stubbing.
On Thu, Apr 12, 2
I wonder if this'll do what you need:
https://trac.calendarserver.org/browser/CalendarServer/trunk/twext/python/sendfd.py
On Thu, Apr 12, 2012 at 2:31 AM, Thibaut DIRLIK wrote:
> Hi,
>
> I'm writing a multiprocess server with Python 3.2 and the multiprocessing
> module. Here is my current impleme
Are you quite sure that your iPhone isn't using some sort of VPN?
On my Android phone, I need a VPN client to access my work mail, but I
install it once and forget about it; it doesn't require me to enter my
password more than once.
On Fri, Mar 30, 2012 at 10:39 PM, Julien wrote:
> Hi,
>
> I'm
Maybe it's a matter of two different protocols, one requiring a VPN, one
not.
You could perhaps try a sniffer to check that out. Where to place the
sniffer could be complicated though.
On Fri, Mar 30, 2012 at 10:39 PM, Julien wrote:
> Hi,
>
> I'm able to connect to an Exchange server via SMTP
On Thu, Apr 12, 2012 at 10:48 AM, Merwin wrote:
> Le 12/04/2012 19:10, Dan Stromberg a écrit :
>
>
>> I wonder if this'll do what you need:
>> https://trac.calendarserver.**org/browser/CalendarServer/**
>> trunk/twext/python/sendfd.py<https://trac.calendarserv
On Tue, Apr 17, 2012 at 5:52 PM, Chris Angelico wrote:
>
> isatty() is supported on Windows (the underlying C API is different,
> but the beauty of a high-level language is that you no longer need to
> care), but the standard Windows console doesn't support ANSI
> sequences. I think there is a wa
On Wed, Apr 18, 2012 at 7:02 AM, Richard Shea wrote:
> On Apr 19, 1:56 am, Irmen de Jong wrote:
> > On 18-4-2012 15:35, Richard Shea wrote:
> >
> > > ... which I think would work and be sufficiently flexible to deal with
> > > alternatives to putty.exe but is there a more established (...
> > >
On Wed, Apr 18, 2012 at 5:16 PM, Miki Tebeka wrote:
> > So I'm interested in suggestions/examples where a user can update a
> > config file to specify by which means they want (in this case) the ssh
> > functionality to be supplied.
> You can do something like that (it's called a factory):
>
> CO
On Thu, Apr 19, 2012 at 5:14 PM, Chris Angelico wrote:
> The question then is whether to choose or auto-detect. Attempting to
> auto-detect could be quite inefficient; imagine if you have to call on
> ssh every couple of seconds, and something in $PATH is on a slow
> network share (or on a floppy
A while back I did a sort algorithm runtime comparison for a variety of
sorting algorithms, and then mostly sat on it.
Recently, I got into a discussion with someone on stackoverflow about the
running time of radix sort.
I realize it's commonly said that radixsort is n*k rather than n*log(n).
I'v
On Tue, May 1, 2012 at 12:21 AM, Ian Kelly wrote:
> On Mon, Apr 30, 2012 at 11:25 PM, Dan Stromberg
> wrote:
> >
> > A while back I did a sort algorithm runtime comparison for a variety of
> > sorting algorithms, and then mostly sat on it.
> >
> > Recently,
On Tue, May 1, 2012 at 10:51 AM, Terry Reedy wrote:
> On 5/1/2012 1:25 AM, Dan Stromberg wrote:
>
> Anyway, here's the comparison, with code and graph:
>> http://stromberg.dnsalias.org/**~strombrg/sort-comparison/<http://stromberg.dnsalias.org/%7Estrombrg/sort-compariso
On Tue, May 1, 2012 at 11:52 AM, Ian Kelly wrote:
> On Tue, May 1, 2012 at 12:00 PM, Dan Stromberg
> wrote:
> >
> > On Tue, May 1, 2012 at 12:21 AM, Ian Kelly
> wrote:
> >>
> >> On Mon, Apr 30, 2012 at 11:25 PM, Dan Stromberg
> >> wrote:
&
On Thu, May 3, 2012 at 12:21 PM, Garrett Cooper wrote:
> On Thu, May 3, 2012 at 12:03 PM, Ian Kelly wrote:
> > On Thu, May 3, 2012 at 12:49 PM, Garrett Cooper
> wrote:
> >>I was wondering whether this was a parser bug or feature (seems
> >> like a bug, in particular because it implicitly en
If you need the same ordering in two lists, you really should sort the
lists - though your comparison function need not be that traditional. You
might be able to get away with not sorting sometimes, but on CPython
upgrades or using different Python interpreters (Pypy, Jython), it's almost
certain
On Thu, May 3, 2012 at 11:03 PM, Paul Rubin wrote:
> > Sort of as you suggest, you could build a Huffman encoding for a
> > representative run of data, save that tree off somewhere, and then use
> > it for all your future encoding/decoding.
>
> Zlib is better than Huffman in my experience, and Py
Generators and iterators are laziness where you tend to need laziness the
most. Generator expressions are tiny generators - more full fledged
generators are supported.
Python probably won't have laziness at its core ever, but it's nice having
a dose of it. IOW, you probably won't be able to writ
How much physical RAM (not the virtual memory, but the physical memory)
does your machine have available? We know the number of elements in your
dataset, but how big are the individual elements? If a sort is never
completing, you're probably swapping.
list.sort() is preferrable to sorted(list),
You've had some good responses already, but here're two more:
1) Easiest would be to use setvbuf in the child process, if you have access
to its source. This allows you to force line-oriented buffering.
2) stdio likes to buffer to tty/pty's in a line-oriented manner, and other
things in a block-
FWIW, I do manual argument parsing, because pylint understands how to
detect typos with manual argument parsing, but not the highly dynamic
modules that parse arguments.
On Wed, May 16, 2012 at 7:16 PM, Rita wrote:
> Hello,
>
> I currently build a lot of interfaces/wrappers to other applications
On Tue, May 22, 2012 at 3:20 PM, Ben Finney wrote:
> Python Recruiter writes:
>
> > Can any one help? I am looking for a Senior Python Developer
>
> Yes, please use the Python Job Board for this purpose instead
> http://www.python.org/community/jobs/>.
>
> Good hunting!
I find it more than a li
If the pythons you require are in synaptic (sudo to root and run synaptic),
you probably can just use them.
If not, then you, for each release, need to:
1) download a tarball using a browser or whatever
2) extract the tarball: tar xvfp foo.tar.bz2
3) cd into the newly created, top-level directory,
On Wed, May 23, 2012 at 2:27 AM, Jean-Michel Pichavant <
jeanmic...@sequans.com> wrote:
> Dan Stromberg wrote:
>
>>
>> On Tue, May 22, 2012 at 3:20 PM, Ben Finney
>> > ben+python@benfinney.**id.au >> wrote:
>>
>>Python Recruiter mailto:ro
On Wed, May 23, 2012 at 3:30 AM, Chris Withers wrote:
> On 23/05/2012 00:34, Dan Stromberg wrote:
>
>>
>> I find it more than a little disappointing that the Python Job Board
>> doesn't do latitude and longitude. It's a big missed opportunity. Yes,
>> i
I've put together a comparison of some tree datastructures for Python, with
varied runtime and varied workload:
http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/
I hope to find time to add heaps to the article at some point, but for now,
it only covers trees and the treap.
Did the import semantics change in cpython 3.3a4?
I used to be able to import treap.py even though I had a treap directory in
my cwd. With 3.3a4, I have to rename the treap directory to see treap.py.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Jun 8, 2012 at 3:16 PM, Ethan Furman wrote:
> Dan Stromberg wrote:
>
>>
>> Did the import semantics change in cpython 3.3a4?
>>
>> I used to be able to import treap.py even though I had a treap directory
>> in my cwd. With 3.3a4, I have to rename th
On Fri, Jun 8, 2012 at 3:48 PM, Ian Kelly wrote:
> On Fri, Jun 8, 2012 at 4:24 PM, Dan Stromberg wrote:
> > Am I misinterpreting this? It seems like according to the PEP, I should
> > have still been able to import treap.py despite having a treap/. But I
> > couldn
And a link to the ticket:
http://bugs.python.org/issue15039
>
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Jun 17, 2012 at 2:54 AM, gmspro wrote:
> We know python is written in C.
>
Yes, at least CPython is. Of course, java is written in C, as are many
other languages.
> C is not portable.
>
C gives you lots of rope to hang yourself with, but if you use C well, it's
more portable than anyth
FWIW, I took what I believe to have been the 2nd generation of this code,
and put some of my own spin on it - mostly making it pass pylint, changing
the __init__ arguments to be a little more intuitive (to me), and expanding
the tests a bit.
It's at http://stromberg.dnsalias.org/svn/bloom-filter/t
On Thu, Jun 9, 2011 at 10:55 AM, geremy condra wrote:
> On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel wrote:
> > On 01/-10/-28163 02:59 PM, Chris Rebert wrote:
> >>
> >> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium
> >> wrote:
> >>>
> >>> Hi Guru's,
> >>> I'm working on a solution to fin
If your dependencies are satisfiable with 3.2, you're better off with 3.2.
If not, use 2.7, or consider porting the dependencies yourself (assuming
those dependencies have code available).
Both 2.x and 3.x are good, but 3.x is clearly the way forward.
3.x has some annoyances corrected: more cent
On Sun, Jun 12, 2011 at 6:46 PM, Nobody wrote:
> Any message with non-ASCII characters in the headers can safely be
> discarded as spam (I've never seen this bug in "legitimate" email).
> Many MTAs will simply reject such messages.
http://en.wikipedia.org/wiki/Email_address#Internationalization
1 - 100 of 1015 matches
Mail list logo