Re: optional types

2014-10-29 Thread Nick Cash
> Am I the only one who'd like to see optional types introduced in Python? Nope! Some dude named "Guido" would like to see them as well: https://mail.python.org/pipermail/python-ideas/2014-August/028742.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Template language for random string generation

2014-08-08 Thread Nick Cash
On 08/08/2014 01:45 PM, cwolf.a...@gmail.com wrote: > On Friday, August 8, 2014 10:35:12 AM UTC-4, Skip Montanaro wrote: >> P.S. Probably a topic for a separate thread, and not actually >> Python-related, but on a related note, I have never found a free password >> keeper which works on all my p

Re: Python's re module and genealogy problem

2014-06-11 Thread Nick Cash
On 06/11/2014 10:35 AM, Michael Torrie wrote: > On 06/11/2014 06:23 AM, BrJohan wrote: >> For some genealogical purposes I consider using Python's re module. >> >> Rather many names can be spelled in a number of similar ways, and in >> order to match names even if they are spelled differently, I

RE: kivy

2014-02-04 Thread Nick Cash
ou narrow down where the problem lies. -Nick Cash -- https://mail.python.org/mailman/listinfo/python-list

RE: the Gravity of Python 2

2014-01-09 Thread Nick Cash
> and "%s" (which is incredibly useful) is not even documented (I suspect it's > also not available on all platforms). The format specifiers available to Python are just whatever is available to the underlying c time.h. The manpage for strftime indicates that %s isn't part of the C standard, bu

RE: cascading python executions only if return code is 0

2013-12-23 Thread Nick Cash
utions. Which is to say, not at all. -Nick Cash -- https://mail.python.org/mailman/listinfo/python-list

RE: Does Python optimize low-power functions?

2013-12-06 Thread Nick Cash
>My question is, what do Python interpreters do with power operators where the >power is a small constant, like 2? Do they know to take the shortcut? Nope: Python 3.3.0 (default, Sep 25 2013, 19:28:08) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

RE: How to tell an HTTP client to limit parallel connections?

2013-11-08 Thread Nick Cash
tc. It's not the prettiest solution, but it could work. -Nick Cash -- https://mail.python.org/mailman/listinfo/python-list

RE: chunking a long string?

2013-11-08 Thread Nick Cash
be added to itertools before, but rejected: https://mail.python.org/pipermail/python-ideas/2012-July/015671.html and http://bugs.python.org/issue13095 - Nick Cash -- https://mail.python.org/mailman/listinfo/python-list

RE: Code golf challenge: XKCD 936 passwords

2013-10-09 Thread Nick Cash
eeded! Although it's not as pretty as the original post, but neither was Roy's. -Nick Cash -- https://mail.python.org/mailman/listinfo/python-list

RE: Creating a Super Simple WWW Link, Copy, & Paste into Spreadsheet Program

2013-06-13 Thread Nick Cash
use COM >to control the Excel >application in reading and writing the files. Outside >of Windows, the best bet is usually to work >with csv files instead, as Dave >suggested. I've had success with the xlrd and xlwt suite of modules (http://www.python-excel.org/), using bo

RE: (any)dbm module lacks a context manager

2013-01-31 Thread Nick Cash
db. If dbm objects were real context managers, they would do this for you. This does seem like a useful enhancement. It might be slightly involved to do, as the dbm module has multiple implementations depending on what libraries are available on the OS. -Nick Cash -- http://mail.python.org/mailman/listinfo/python-list

RE: Split string first data have ",

2013-01-29 Thread Nick Cash
ction to be a single token? Have you looked at the CSV module (http://docs.python.org/3/library/csv.html)? If my guess is wrong, or you're having difficulties with the csv module, a more specific question will help you get the answer you're looking for. -Nick Cash -- http://mail.python.org/mailman/listinfo/python-list

urllib2 FTP Weirdness

2013-01-23 Thread Nick Cash
ted or closed... that seems like a stretch, though. Is this a urllib2 bug, or am I crazy? -Nick Cash -- http://mail.python.org/mailman/listinfo/python-list

RE: Vote tallying...

2013-01-18 Thread Nick Cash
> I have a problem which may fit in a mysql database, but which I only > have python as an alternate tool to solve... so I'd like to hear some > opinions... Is there a reason you can't use an RDBMS for this? MySQL would certainly be fine, although I always recommend PostgreSQL over it. Based on t

RE: How to get time.strptime()?

2012-12-26 Thread Nick Cash
> Error: AttributeError: 'module' object has no attribute '_strptime' > > This problem is driving me crazy. It only happens in Python 3.3.0, > while on my server running 3.1.3 it behaves as expected. When I try to > access time.strptime() it errors with > > AttributeError: 'module' object has no

RE: urlopen in python3

2012-12-05 Thread Nick Cash
> In python2, this work if "something" is a regular file on the system as > well as a remote URL. The 2to3 script convert this to > urllib.request.urlopen. But it does not work anymore if "something" > is just a file name. > > My aim is to let the user specify a "file" on the command line and have

RE: len() on mutables vs. immutables

2012-10-18 Thread Nick Cash
pes would be similar, though I don't see anything explicitly saying so for bytearray. -Nick Cash -- http://mail.python.org/mailman/listinfo/python-list

RE: get google scholar using python

2012-10-01 Thread Nick Cash
uk/scholar?q=albert+einstein%2B1905&btnG=&hl=en&as_sdt=0%2C5&as_sdtp=";, headers={"User-Agent":"Mozilla/5.0 Cheater/1.0"})) -Nick Cash -- http://mail.python.org/mailman/listinfo/python-list

RE: Numpy combine channels

2012-09-10 Thread Nick Cash
ecessary. A simple solution would be just a quick list comprehension: stereo_array = [[1, 1], [1, 2], [2, 3]] mono_array = [l+r for (l, r) in stereo_array] Thanks, Nick Cash -- http://mail.python.org/mailman/listinfo/python-list

RE: vBulletin scraper -- feasible?

2012-06-25 Thread Nick Cash
You may want to look into http://www.crummy.com/software/BeautifulSoup/ It's made for parsing (potentially bad) HTML, and is quite easy to use. I'd say it's quite feasible. Thanks, Nick Cash NPC International -Original Message- From: python-list-bounces+nick.cash=n

RE: Where to set default data - where received, or where used

2012-06-11 Thread Nick Cash
This is really up to your programming style, but I'm of the opinion that defining all of the default values in one place keeps maintenance easier. Of course, if it's done differently elsewhere in your code base, I would aim for consistency instead. Thanks, Nick Cash -Origin