Programming language comparison examples?

2009-06-05 Thread skip
ch of smaller examples. I'm looking for a site with this sort of information to pass along to my son who's entering his sophomore year of college, has one Java course under his belt, and will take a second course in the fall. I'm hoping to reach him before his brain turns to mush.

Re: Programming language comparison examples?

2009-06-05 Thread skip
; http://pleac.sourceforge.net/ >> http://www.angelfire.com/tx4/cus/shapes/index.html Thanks for the extensive list of sites! Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: unladen swallow: python and llvm

2009-06-08 Thread skip
bearophile> I'm sure lot of people like Cython, but I prefer a more bearophile> transparent language, that doesn't hide me how it works bearophile> inside. Why not just write extension modules in C then? -- Skip Montanaro - [email protected] - http://www.smontanaro

Re: spammers on pypi

2009-06-08 Thread skip
ings (like RoundUp). Somebody even built a SpamBayes for YouTube browser extension: http://userscripts.org/scripts/show/13839 Skip -- http://mail.python.org/mailman/listinfo/python-list

Generating a unique filename in the face of unicode filename

2009-06-13 Thread skip
me() >>> os.path.join(dirname, "%s.%s.%s" % (h, tname, os.getpid())) u'/tmp/\xef.MainThread.11004' It works for Frank on his Windows box as well. Any ideas how to properly Unicode-proof this code? Thanks, -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i wake up with a heart rate below 40, i head right for the espresso machine. -- chaos @ forums.usms.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread skip
acquire the GIL before executing any calls into the Python runtime or returning. -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i wake up with a heart rate below 40, i head right for the espresso machine. -- chaos @ forums.usms.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Status of Python threading support (GIL removal)?

2009-06-20 Thread skip
it's likely that rewriting critical parts in C or using packages like numpy would improve there performance with or without multi-threading. For people who aren't used to C there are tools like Pyrex and Cython which provide a middle road. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Status of Python threading support (GIL removal)?

2009-06-20 Thread skip
i-threading under the covers * use multiple processes * rewrite your code to use more efficient algorithms I don't write those out of ignorance for your plight. It's just that if you want a faster Python program today you're going to have to look elsewhere for your

Re: Open source python projects

2009-06-22 Thread skip
use some assistance. We have been held up because our existing Windows experts have been too busy to contribute much for a couple years. -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i wake up with a heart rate below 40, i head right for the espresso machine.

Re: Reading a large csv file

2009-06-24 Thread skip
(fs) ... for s, row in enumerate(reader): dset.resize(s, axis=0) -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i wake up with a heart rate below 40, i head right for the espresso machine. -- chaos @ forums.usms.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout when connecting to sybase DBS

2009-06-30 Thread skip
module where I work, but I've never encountered this problem (or a timeout parameter of any kind). At any rate, you'll probably have more luck asking on the python-sybase mailing list: [email protected] -- Skip Montanaro - [email protected] - http://www.smontanaro.ne

Re: Timeout when connecting to sybase DBS

2009-07-01 Thread skip
Gil> There's no such group as python-sybase :-( http://sourceforge.net/mailarchive/forum.php?forum_name=python-sybase-misc S -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout when connecting to sybase DBS

2009-07-01 Thread skip
version are you using? We're still running 2.4.5 at work and have a slightly hacked very old version of the python-sybase package (0.36). -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i wake up with a heart rate below 40, i head right for the espresso

Re: Implementing a cache

2009-07-12 Thread skip
http://www.smontanaro.net/python/Cache.py Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Implementing a cache

2009-07-12 Thread skip
>> My Cache module does #1 and #3.  I'm not sure if you want #2 for >> internal cache maintenance or for as part of the API. >> >>    http://www.smontanaro.net/python/Cache.py pdpi> I'm not sure whether #2 is doable at all, as written. You _need_ a pdpi> complete history

Re: Memory error due to big input file

2009-07-13 Thread skip
file into memory. Learn to operate a line (or a few lines) at a time. Try something like: a = open("/home/sservice/nfbc/GenoData/CompareCalls3.diff") for line in a: do your per-line work here -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i

Re: [Python-projects] [TIP] Teaching pylint about keyword placeholders in string formatting

2009-07-15 Thread skip
Nicolas> Here is the ticket: Nicolas> https://www.logilab.net/elo/ticket/9634 Is it possible to get read-only access to the tracker? It's prompting me for a login which I don't have. Thx, -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ when i wake

Re: Why not enforce four space indentations in version 3.x?

2009-07-15 Thread skip
ake them away from me ! I don't think your tabs have been taken away, you just can't mix them with spaces. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread skip
uot;avec" means "with", but I don't understand the difference between "avec malloc *int" and "avec []". Can you explain please? Thx, -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ That's more than a dress. That's an Audrey Hep

Wrapping prstat on Solaris

2009-07-27 Thread skip
(I'm currently using a 5-second interval and 10 lines of output). I would have expected that prstat would simply flush stdout after each block of output. Any ideas about how to get prstat to cooperate better? Thanks, -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ That

test message

2009-08-11 Thread skip
Sorry for the low content email. Testing the mail-to-news gateway on mail.python.org. Don't flame me for not using a test newsgroup. ;-) -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ Getting old sucks, but it beats dying young -- http://mail.python.org/mailman/lis

Is there a concerted effort afoot to improve the Python Wiki?

2009-09-20 Thread skip
people are aware of to wrangle the wiki into better shape? Thanks, Skip -- http://mail.python.org/mailman/listinfo/python-list

Poll: Do you use csv.Sniffer?

2009-09-24 Thread skip
other comments you like to your response. Private replies please. Thanks, -- Skip Montanaro - [email protected] - http://www.smontanaro.net/ Getting old sucks, but it beats dying young -- http://mail.python.org/mailman/listinfo/python-list

Re: Style question -- plural of class name?

2013-05-08 Thread Skip Montanaro
This one: > "A list of FooEntry instances" Besides the obvious spelling issues in the others, it's not immediately clear if the list contains just FooEntry instances, FooEntry classes (perhaps subclasses) or a mix of the two. #4 makes it clear. Skip -- http://mail.python.or

Re: [Off topic] Software epigrams

2013-05-13 Thread Skip Montanaro
to figure them out from the code > layout. But this one is absolutely right: I think "irrelevant" in this context means stuff like memory management. My fave was #7: "It is easier to write an incorrect program than understand a correct one," which explains in large part why

Re: ssl proxy server

2013-05-14 Thread Skip Montanaro
I haven't touched the SpamBayes setup for the usenet-to-mail gateway in a long while. For whatever reason, this message was either held and then approved by the current list moderator(s), or (more likely) slipped through unscathed. No filter is perfect. Skip On Tue, May 14, 2013 at 1:

Re: Determine actually given command line arguments

2013-05-15 Thread Skip Montanaro
ne weren't set on the command line. At that point, set them to the actual defaults. I think that's a pretty common idiom. Note: I am an old cranky dude and still use getopt. This idiom is pretty easy there. YMMV with argparse or optparse. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine actually given command line arguments

2013-05-15 Thread Skip Montanaro
> However, maybe I could ... ... switch to getopt? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread Skip Montanaro
Perhaps you want len(reader) instead? Or a counter which increments for every row read which has an item in column A? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread Skip Montanaro
> len(reader) gives me an error. Apologies. len(list(reader)) should work. Of course, you'll wind up loading the entire CSV file into memory. You might want to just count row-by-row: n = 0 for row in reader: n += 1 Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of cells, using CSV module

2013-05-16 Thread Skip Montanaro
> So rather than >>a >>b >>c >>d >>e >>f > I would get [a, b, c, d, e, f] all_items = [] for row in reader: all_items.append(row[0]) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: any cherypy powred sites I can check out?

2013-05-16 Thread Skip Montanaro
hrough this before asking the CherryPy folks for help: http://www.catb.org/esr/faqs/smart-questions.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: sympy.nsimplify

2013-05-21 Thread Skip Montanaro
nrelated can be. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: @staticmethods called more than once

2013-05-21 Thread Skip Montanaro
basically useless in Python -- you can just use a > module function instead of a staticmethod. That is, the "@staticmethod" decorator doesn't mean, "call this function once." Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-21 Thread Skip Montanaro
's format method. You might be able to get by with a change of your LOCALE setting and/or a peek at the documentation for the locale module. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Myth Busters: % "this old style of formatting will eventually be removed from the language"

2013-05-22 Thread Skip Montanaro
apologize for (inadvertently) spreading FUD. It does seem like the documentation should be updated in a few places. If the decision has been made to not remove the older system, it might be worthwhile to mention that somewhere. Clearly the tutorial and PEP 3101 should be updated. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Skip Montanaro
>>>> Please stop perpetuating this myth, see >>>> http://mail.python.org/pipermail/python-dev/2012-February/116789.html >>>> and http://bugs.python.org/issue14123 >>>> >>> What myth? >> >> The myth that % string formatti

Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Skip Montanaro
#x27; >>> print s2.getvalue() What is it about io.StringIO that it doesn't like strings and requires Unicode? This is on an OpenSUSE 12.1 system. I have tried with LANG set to the default ("en_US.UTF-8") and to "C". I also tried on a Solaris system with an older micro revision of Python 2.7. Same result. Am I missing something about how io.StringIO works? I thought it was a more-or-less drop-in replacement for StringIO.StringIO. Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Skip Montanaro
am, expecting Unicode > objects for transcription. 'str' is, in that context, probably > considered as 'bytes' in Python 3. > Thanks. This example was based on a function in Matplotlib. It appears the author switched from StringIO.StringIO to io.StringIO between 1.1

Re: Python #ifdef

2013-06-02 Thread Skip Montanaro
> The terror that most people feel when hearing "m4" is because m4 was associated with sendmail, not because m4 was inherently awful. In fact, m4 made sendmail configs easier to maintain. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to increment date by week?

2013-06-04 Thread Skip Montanaro
Check out the rrule module in the python-dateutil package: http://labix.org/python-dateutil https://pypi.python.org/pypi/python-dateutil Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-06 Thread Skip Montanaro
> Did you tried running that by a standalone Python interpreter? Did you > notice something strange, something like that an empty line is missing > between headers and body? He will get an extra blank line, since he added a newline character at the end of his Content-Type string. Skip

Re: Build Python 2.7.5 - Modules missing

2013-06-10 Thread Skip Montanaro
spelling, and thus fail to find it. For example tcl 8.5 might be installed as libtcl85.so, libtcl8.5.dylib, etc. I believe the modules which failed for you are probably all named in a straightforward fashion, so missing underlying libraries are probably the culprit. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Skip Montanaro
uild 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print >>> x = print File "", line 1 x = print ^ SyntaxError: invalid syntax Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Skip Montanaro
>>> int="five" >>> [int(i) for i in ["1","2","3"]] TypeError: str is not callable > Now how are you going to get the original int type back? Magic. :-) >>> int = "five" >>> int("a") Traceback (most recent call last): File "", line 1, in TypeError: 'str' object is not callable >>> from __buil

Re: Why is regex so slow?

2013-06-18 Thread Skip Montanaro
It seems that if you find a line matching the first part of the pattern, you could just as easily split the line yourself instead of creating a group. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: os.putenv() has no effect

2013-06-18 Thread Skip Montanaro
ght", "credits" or "license" for more information. >>> import os >>> os.putenv("PATH", "/tmp") >>> os.system("/usr/bin/env") ... PATH=/tmp ... Skip -- http://mail.python.org/mailman/listinfo/python-list

Problems with pkg_resources

2013-06-20 Thread Skip Montanaro
arse_requirements(requirements)) File "/opt/TWWfsw/distribute06/lib/python27/pkg_resources.py", line 584, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: logilab-astroid>=0.24.3 How do I work around this problem? I'd rather be hacking on pylint than struggling with distutils. Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Bubbles 0.1 – Virtual Data Object Framework

2013-06-24 Thread Skip Montanaro
When the bubbles URL fails, Chrome suggests simply databrewery.org, which seems to work, though it has no mention of bubbles. Skip On Mon, Jun 24, 2013 at 3:54 AM, Dariusz Suchojad wrote: > On 06/23/2013 07:58 PM, Stefan Urbanek wrote: > >> If you have any comments, suggestions

Re: settrace doesn't trace builtin functions

2013-07-01 Thread Skip Montanaro
function's namespace and modify it, you should be able to perform the same trick for most functions or methods written in C. >>> sys._settrace = sys.settrace >>> def settrace(*args, **kwds): ... return sys._settrace(*args, **kwds) ... >>> sys.settrace = sys._settrace Totally untested. No warranties expressed or implied. YMMV... etc, etc Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python list code of conduct

2013-07-02 Thread Skip Montanaro
ps like the stuff that Google Groups and Gmane create, this mailing list is my only exposure to Usenet. I have no idea if periodic FAQ posting is common practice anymore. It might be worthwhile to create one if it's kept fairly brief and to the point. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread Skip Montanaro
> Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on > Debian squeeze? Might Jython use some Python modules/packages unmodified? Does sys.path in Jython refer to the CPython tree? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Whatever happened to the Effbot? [was Re: python adds an etc]

2013-07-03 Thread Skip Montanaro
Last I knew, Fredrik was working for Google. According to his LinkedIn profile he's a Google employee in Zurich, apparently doing YouTube stuff (assuming his profile is up-to-date). Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: analyzing time

2013-07-05 Thread Skip Montanaro
imestamps are represented as Python datetime objects, the problem gets a bit easier, especially if you want to find the beginning and ending timestamps of a bunch of dates. Sort, then throw some itertools.groupby pixie dust at it. My ancient, reptilian brain has never quite grokked all that iter

Editor Ergonomics [was: Important features for editors]

2013-07-06 Thread Skip Montanaro
text editors probably present similar issues for their users. They all involve: * a lot of typing, * use of modifier keys (ctrl, alt, command, etc) * movement between the mouse and the keyboard Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Important features for editors

2013-07-08 Thread Skip Montanaro
macros are, I find it very odd that recent versions of GNU Emacs dispensed with the old key binding to C-x c. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Important features for editors

2013-07-08 Thread Skip Montanaro
the GNU switch to kmacro, and reasserting my preference for the way I called ediff commands meant that the new spelling of the kmacro stuff got dropped. I do use C-x ( and C-x ) to define macros. Skip -- http://mail.python.org/mailman/listinfo/python-list

homework + obfuscation ... this might work ...

2013-07-08 Thread Skip Montanaro
print 2, output output = [] while len(output) < 10: r = int(round(random.random() * 500)) if r % 2: r *= 2 output.append(r) print 3, output getting-tired-of-homework-questions-in-my-old-age-ly, y'rs, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: homework + obfuscation ... this might work ...

2013-07-08 Thread Skip Montanaro
> You assume that the professor (or more likely, TA) will take the time > to ask them to explain the program and not just grade them down for > the extra work they had to do. Well, that would be fine too. :-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: hex dump w/ or w/out utf-8 chars

2013-07-09 Thread Skip Montanaro
> It wonder if 5-bit chars was a > common compression scheme. http://en.wikipedia.org/wiki/List_of_binary_codes Baudot was pretty common, as I recall, though ASCII and EBCDIC ruled by the time I started punching cards. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a new router

2013-07-09 Thread Skip Montanaro
04. Any idea if the plunge base is available separately and will fit my motor? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a new router

2013-07-09 Thread Skip Montanaro
> But hey, the plunge router recommendations are great! Yeah, based on Grant's research, I found a used PC 690-series base on eBay for my wife for her birthday. I think she will be psyched. Lots easier to make keyhole slots with a plunge base. :-) Skip -- http://mail.python.org

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Skip Montanaro
> ... meant to be the word "posted", before his sentence got cut off by the > Python Secret Underground. Argh! That which shall not be named! Please, for the sake of all that is right, please only use the initials, PS -- http://mail.python.org/mailman/listinfo/python-list

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Skip Montanaro
> Either that or it's funny only to other Australians. Or the Dutch. S -- http://mail.python.org/mailman/listinfo/python-list

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Skip Montanaro
On Wed, Jul 10, 2013 at 7:39 AM, Joshua Landau wrote: > On 10 July 2013 13:35, Skip Montanaro wrote: >>> Either that or it's funny only to other Australians. >> >> Or the Dutch. > > Or us Brits. Hells bells... It appears everyone found it funny except the tr

Re: UTF-EBCDIC encoding?

2013-07-12 Thread Skip Montanaro
> I can't help you. I'm astonished. Trying to imagine the work environment > where this technology would be necessary http://www.iseriespython.com/app/ispMain.py/Start?job=Home Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Messages to Python-List aren't posting

2013-07-19 Thread Skip Montanaro
s BCC'd (implicit destination). If you message was held by Mailman, moderator overload is the most likely cause of the delay. It's also possible Mailman got overwhelmed, but I've seen no postmaster messages suggesting there were any systemic problems. BTW, although SpamBayes serves as a last resort for mail arriving via SMTP, it is the only line of defense for mail gatewayed from Usenet. I'm sure I can dredge up the code I wrote for that if anyone wants it for another application. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Messages to Python-List aren't posting

2013-07-19 Thread Skip Montanaro
g subscription information in Mailman to make sure you haven't inadvertently done something. If the problem persists, send a note to [email protected] describing the problem, and include a message (with all its headers intact) that demonstrates the problem, as Chris did with the timestamps. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Find and Replace Simplification

2013-07-19 Thread Skip Montanaro
Serhiy> The string replace() method is fastest (at least in Python 3.3+). See Serhiy> implementation of html.escape() etc. I trust everybody knows by now that when you want to use regular expressions you should shell out to Perl for the best performance. :-) Skip -- http://mail.pyth

Re: Homework help requested, thanks to everyone.

2013-07-22 Thread Skip Montanaro
; random.shuffle(words) >>> words[0:4] ['live', 'skat', 'levy', 'cove'] >>> [makePigLatin(word) for word in words[0:4]] ['ivelay', 'atskay', 'evylay', 'ovecay'] :-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python testing tools

2013-07-23 Thread Skip Montanaro
s just me.) I use pylint all the time, and coverage from time-to-time, have used nose in the past, but not for my current stuff. All are worth your time. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python testing tools

2013-07-23 Thread Skip Montanaro
> Thank you! What tool do you use for coverage? coverage. :-) > And have you used pychecker? Yes, in fact, I used to use a wrapper script I wrote that ran both pylint and pychecker, then massaged the output into suitable-for-emacs-next-error-command > I heard it is as good as pylint. What do yo

Re: Python testing tools

2013-07-23 Thread Skip Montanaro
> Could you please elaborate on the difference of the two? I heard pylint > does not import your source code when it is analyzing, while pychecker does. > Does that make some difference? Moreover, do you personally like pylint or > pycheker and why? I haven't followed pychecker development for awh

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Skip Montanaro
] ... Traceback (most recent call last): File "", line 1, in RuntimeError: dictionary changed size during iteration >>> for k in list(d): ... if k == 3: ... del d[k+1] ... Traceback (most recent call last): File "", line 3, in KeyError: 4 >>> d.ke

Re: PEP8 79 char max

2013-07-29 Thread Skip Montanaro
ar of books meant to be read with page or column widths of 100 or more characters. I suspect they would be few and far between. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-30 Thread Skip Montanaro
ecent compromise. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-30 Thread Skip Montanaro
ee the attached graph for the distribution of line lengths for the current project where I spend most of my time these days (just Python code, blank lines elided, comment lines included). Stretching the max out to 100 columns when most lines are less than 60 columns just wastes screen real est

Re: PEP8 79 char max

2013-07-31 Thread Skip Montanaro
ut: >>> repr(1e+30) '1e+30' >>> repr(1e+99) '9.9997e+98' This problem was fixed in 2.7 (and presumably in 3.something as well), but it used to be a problem. :-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Test message - please ignore

2012-08-31 Thread Skip Montanaro
We just upgraded the Mailman installation on mail.python.org. Part of that installation includes spam filtering on messages gated from Usenet to the python- [email protected] mailing list. This message is a quick test of that function. You can ignore it. Skip Montanaro -- http

Problems building Python from hg trunk on Open SUSE

2012-10-05 Thread Skip Montanaro
x27;t turn up any promising web pages, and I didn't find anything in the various documentation files in the repo related to building Python. Any suggestions about how to resolve this would be appreciated. Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Supporting list()

2012-12-17 Thread Skip Montanaro
What method(s) does a class have to support to properly emulate a container which supports turning it into a list? For example: class Foo: pass f = Foo() print list(f) Is it just __iter__() and next()? (I'm still using 2.4 and 2.7.) Thx, Skip -- http://mail.python.org/ma

Re: Supporting list()

2012-12-17 Thread Skip Montanaro
> If using __getitem__ it needs to work with integers from 0 to len(f)-1, > and raise IndexError for len(f), len(f+1), etc. Ah, thanks. I have a __getitem__ method, but it currently doesn't raise IndexError. (I'm indexing into a ring buffer, and the usage of the class pretty much precludes index

Ctypes can't find libc on Solaris

2013-01-26 Thread Skip Montanaro
27/lib/python2.7/ctypes/util.py libm.so.6 libc.so.6 libbz2.so.1 libcrypt.so.1 On my Mac: % python ~/src/python/release27-maint/Lib/ctypes/util.py /usr/lib/libm.dylib /usr/lib/libc.dylib /usr/lib/libbz2.dylib On Solaris: % python /opt/TWWfsw/python27/lib/python2.7/ctypes/util.

Re: Ctypes can't find libc on Solaris

2013-01-26 Thread Skip Montanaro
> After worming around distutils' inability to use > environment variables to add command line flags to gcc, I'm stuck with > an error trying to locate libc: ... Should have poked around bugs.python.org first. This was reported, with a patch that works for me: http://bugs.python.org/issue528

Re: Questions.

2017-09-08 Thread Skip Montanaro
some questions explore various dark corners of the language and its libraries, the experience level runs the gamut, from people just learning the language to core developers. So, fire away. It does help if you don't ask us to do your homework for you. :-) Skip -- https://mail.python.org/mai

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-10 Thread Skip Montanaro
> * asyncio with its a-dialect What is a/the "a-dialect"? S -- https://mail.python.org/mailman/listinfo/python-list

Re: Python programming language vulnerabilities

2017-09-10 Thread Skip Montanaro
That link's not working for me, even after changing the double slash to a single slash. Skip On Sun, Sep 10, 2017 at 1:45 PM, Stephen Michell wrote: > My apologies. I maintain that website. > > There should have been no broken links. I will fix that. > > The previous ver

Re: Python programming language vulnerabilities

2017-09-10 Thread Skip Montanaro
These links work: * http://open-std.org/JTC1/SC22/WG23/docs/ISO-IECJTC1-SC22-WG23_N0702-tr24772-4-draft-python-before-mtg-48-2017-03-10.pdf * http://open-std.org/JTC1/SC22/WG23/docs/ISO-IECJTC1-SC22-WG23_N0702-tr24772-4-draft-python-before-mtg-48-2017-03-10.docx Skip On Sun, Sep 10, 2017 at

Totally OT - Looking for someone to translate some Japanese

2017-09-11 Thread Skip Montanaro
r photos. I put the pages up on my Google Drive. If you think you might be able to help (and are willing :-), let me know (offline) and I'll send you the links. Thanks, Skip -- https://mail.python.org/mailman/listinfo/python-list

How to get Nose to run doctests from my Markdown documentation?

2017-09-20 Thread Skip Montanaro
missing some sort of nose-markdown plugin which would magically make this work? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get Nose to run doctests from my Markdown documentation?

2017-09-20 Thread Skip Montanaro
ests from file ... I believe I figured this out. It appears to be sufficient to add doctest-extension=md to my noserc file. Camping happy, am I, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get Nose to run doctests from my Markdown documentation?

2017-09-20 Thread Skip Montanaro
rst, I suppose, but then I'd have to add a magic token to my files to tell Emacs they are really in Markdown format. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get Nose to run doctests from my Markdown documentation?

2017-09-20 Thread Skip Montanaro
Actually, I semi-lied. It seems to pick up the second of two examples, and gets a bit confused about leading whitespace. I think I need to do some more fiddling. S -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get Nose to run doctests from my Markdown documentation?

2017-09-20 Thread Skip Montanaro
es in the document. They are just concatenated into one big "test". Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get Nose to run doctests from my Markdown documentation?

2017-09-20 Thread Skip Montanaro
w here at work. Markdown seems to be the agreed upon way to write plain text documentation. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Skip Montanaro
s stuff best. In theory, [email protected] might be the best place to contact them, though I suspect that's not quite the right place for an extended discussion of the topic. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: The mysterious ways of Python mailing list

2017-09-30 Thread Skip Montanaro
[email protected] for one of the smart folks there to investigate. Skip -- https://mail.python.org/mailman/listinfo/python-list

How best to initialize in unit tests?

2017-10-04 Thread Skip Montanaro
which guarantees that your initialize function is called precisely once? This all seems rather messy. I'm open to better ways to do this, but as I've only had one cup of coffee this morning, no spark of insight has zapped my frontal cortex as yet. Thx, Skip -- https://mail.python.org/m

Re: How best to initialize in unit tests?

2017-10-04 Thread Skip Montanaro
est. The declaration goes > in a conftest.py file alongside your test files. Thanks. I'm not a py.test user, but it turns out that nose (which I do use) appears to have something similar: https://nose.readthedocs.io/en/latest/doc_tests/test_init_plugin/init_plugin.html Thanks for the nudge

Re: How best to initialize in unit tests?

2017-10-04 Thread Skip Montanaro
On Wed, Oct 4, 2017 at 9:53 AM, Steve D'Aprano wrote: > On Thu, 5 Oct 2017 12:07 am, Skip Montanaro wrote: > >> Suppose you want to test a package (in the general sense of the word, >> not necessarily a Python package). > > I'm... not sure I understand. Given

<    5   6   7   8   9   10   11   12   13   14   >