Re: usenet reading
On Fri, May 25 2012, Jon Clements wrote: Hi All, Normally use Google Groups but it's becoming absolutely frustrating - not only has the interface changed to be frankly impractical, the posts are somewhat random of what appears, is posted and whatnot. (Ironically posted from GG) Is there a server out there where I can get my news groups? I use to be with an ISP that hosted usenet servers, but alas, it's no longer around... Only really interested in Python groups and C++. Any advice appreciated, Jon. I have had good success with news.eternal-september.org . http://www.eternal-september.org/ Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Learn Technical Writing from Unix Man in 10 Days
On Sat, Apr 28 2012, Steven D'Aprano wrote: On Sat, 28 Apr 2012 14:55:42 -0700, Xah Lee wrote: Learn Technical Writing from Unix Man in 10 Days Quote from man apt-get: remove remove is identical to install except that packages are removed instead of installed. Do you also expect the documentation to define except, instead, is, to and the? If you don't know what install and remove means, then you need an English dictionary, not a technical manual. It is considerably worse than that. If you look at what the documentation for apt-get actually says, instead of just the badly mangled version that Xah shares you would realize that the post was basically a bald-face troll. The rest of Xah's links in this particular article was even worse. For the most part he was criticizing documentation flaws that have disappeared years ago. Heck, his criticism of Emacs' missing documentation has been fixed since Emacs 21 (the Emacs developers are currently getting ready to release Emacs 24). His criticism of git's documentation is also grossly misleading. kernel.org still has the empty directories, but git-scm.org has been the official home for git's documentation for years. I am sure that the rest of the examples are just as ridiculous. I tend to like Xah's writing. Heck, I even sent a few bucks his way as thanks for his Emacs Lisp tutorials. However, that particular post was simply ridiculous. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: a little parsing challenge ☺
On Wed, Jul 20 2011, Randal L. Schwartz wrote: Uri == Uri Guttman u...@stemsystems.com writes: Uri a better parsing challenge. how can you parse usenet to keep this troll Uri from posting on the wrong groups on usenet? first one to do so, wins the Uri praise of his peers. 2nd one to do it makes sure the filter stays in Uri place. all the rest will be rewarded by not seeing the troll anymore. Uri anyone who actually engages in a thread with the troll should parse Uri themselves out of existance. Since the newsgroups: line is not supposed to have spaces in it, that makes both his post and your post invalid. Hence, filter on invalid posts. I suspect that the spaces you are seeing are being added by Gnus. I see them too (and I see them in your post as well), but they disappear when I use C-u g and view the source of the posts. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Code hosting services
On Sat, Jul 16 2011, Thomas Jollans wrote: On 07/16/2011 10:32 AM, Andrew Berg wrote: Does anyone know if there are any services that have cross-project integration? I can see myself closing a ton of bug reports just because they are issues with the library part of the program, which will be a separate project (because there will be other projects based on that same library). Launchpad has a cross-project bug tracker. Launchpad also uses the excruciatingly slow (but distributed, and written-in-python) bzr for version control. I think that you will find that recent versions of bzr are no longer slow, at least compared to Mercurial. My experience with bzr is with the Emacs project, and it is true that there were some performance when it first switched. Most of the problems, however, were due to the fact that that the GNU server hosting the Emacs bzr repository did not allow updates via the bzr protocol but instead forced the use of a dumb transport (sftp). You don't have that problem when using Launchpad. I will certainly agree that bzr's past problems have made it difficult for the system to gain traction. The perception is that bzr is unusably slow. This is too bad, IMHO, as Launchpad is pretty cool. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Development tools and practices for Pythonistas
On Sun, May 01 2011, Dietmar Schwertberger wrote: Am 01.05.2011 02:47, schrieb Shawn Milochik: Look at the big two sites for open-source repositories -- github and bitbucket. One's git, the other Mercurial. I don't think you can go wrong picking either one. Can any of those be used from Python as a library, i.e. something like import Hg r = Hg.open(path) When I had a look at Mercurial, which is implemented in Python, it was implemented in a way that I could not do that. It was implemented as rather monolithic program which could be used from os.system(...) only. With a good API, I could easily have integrated it into my development flow. I have a codebase which is shared between different projects and there are many small changes on many different PCs. In theory a distributed VCS is good at supporting that, but in practice I went back to my lightweight synchronization scripts and file storage again. With the API, I could have best of both worlds. You should take a look at Bazaar. I found it fairly easy to use bzrlib from my own Python scripts. http://people.canonical.com/~mwh/bzrlibapi/ Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: opinion: comp lang docs style
On Tue, Jan 04 2011, Xah Lee wrote: a opinion piece. 〈The Idiocy of Computer Language Docs〉 http://xahlee.org/comp/idiocy_of_comp_lang.html -- The Idiocy of Computer Language Docs Xah Lee, 2011-01-03 Worked with Mathematica for a whole day yesterday, after about 10 years hiatus. Very nice. Mathematica lang and doc, is quite unique. Most other langs drivel with jargons, pettiness, comp-sci pretentiousness, while their content is mathematically garbage. (unixism mumble jumple (perl, unix), or “proper”-engineering OOP fantasy (java), or impractical and ivory-tower adacemician idiocy as in Scheme Haskell ( currying, tail recursion, closure, call-cc, lisp1 lisp2, and monad monad monad!)) (See: What are OOP's Jargons and Complexities ◇ Language, Purity, Cult, and Deception.) Mathematica, in its doc, is plain and simple. None of the jargon and pretention shit. Very easy to understand. Yet, some of its function's technical aspects are far more scholarly abstruse than any other lang (dealing with advanced math special functions that typically only a few thousand people in the world understand.). -- A Gander into the Idiocies Here's a gander into the doc drivel in common langs. -- unix In unix man pages, it starts with this type of garbage: SYNOPSIS gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ] gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ] zcat [ -fhLV ] [ name ... ] SYNOPSIS zip [-aabcddeeffghjkllmoqrrstuvvwx...@$] [-- longoption ...] [-b path] [-n suf fixes] [-t date] [-tt date] [zipfile [file ...]] [-xi list] Here, the mindset of unix idiots, is that somehow this “synopsis” form is technically precise and superior. They are thinking that it captures the full range of syntax in the most concise way. Actually, it *does* capture the full range of syntax in a concise way. If you know of man pages where the Synopsis does not match the syntax then you have found a documentation bug, which should be reported so that it can be fixed. In fact, if anything the real problem with the Synopsis is that it is too concise. Fortunately gzip is a bit of an extreme example. Most man pages look more like this: --8---cut here---start-8--- NAME tar — The GNU version of the tar archiving utility SYNOPSIS tar [-] A --catenate --concatenate | c --create | d --diff --compare | --delete | r --append | t --list | --test-label | u --update | x --extract --get [options] [pathname ...] --8---cut here---end---8--- That synopsis is pretty useful. If you have used tar before and just need a refresher chances are very good that the synopsis will do the trick. If you look at the man pages from the Linux Programmer's Manual the Synopsis makes even more sense. --8---cut here---start-8--- NAME open, creat - open and possibly create a file or device SYNOPSIS #include sys/types.h #include sys/stat.h #include fcntl.h int open(const char *pathname, int flags); int open(const char *pathname, int flags, mode_t mode); int creat(const char *pathname, mode_t mode); --8---cut here---end---8--- Heck, that's basically precisely what I want to know. In practice, it's seldomly read. It's actually not accurate as one'd thought; no program can parse it and agree with the actual behavior. It's filled with errors, incomprehensible to human. I've been using UNIX man pages for quite some time, and I don't think that I have ever come across an error. I am sure that there are errors, but I am also sure that Mathematica's documentation has its share of errors as well. Worse of all, the semantic of unix software's options are the worst rape to any possible science in computer science. See: The Nature of the Unix Philosophy ◇ Unix Pipe As Functional Language ◇ Unix zip Utility Path Problem. It seems to me that the problem is not UNIX software in general, but rather that the zip function does not have an analogue of tar's -C option (which sets the current directory for the command). -- Python In Python, you see this kinda garbage: 7.1. The if statement The if statement is used for conditional execution: if_stmt ::= if expression : suite ( elif expression : suite )* [else : suite] (Source docs.python.org) Here, the mindset of the python idiots is similar to the unix tech geekers. They think that using the BNF notation makes their doc more clear and precise. The fact is, there are so many variations of BNF each trying to fix other's problem. BNF is actually not used as a computer language for syntax
Re: Google AI challenge: planet war. Lisp won.
On Mon, Dec 20 2010, Jon Harrop wrote: Wasn't that the challenge where they wouldn't even accept solutions written in many other languages (including both OCaml and F#)? Cheers, Jon. http://ai-contest.com/faq.php Question: There is no starter package for my favorite language. What shall I do? Answer: You don't know C++, Java, or Python? Okay fine. Tell the forums what starter package you want to see, and we will try our best to make it for you. The folks working on Lisp submissions apparently created their own starter package. I am sure that something similar could have been done for OCaml or F#. That's probably too bad. These types of competitions are good publicity for less popular languages (assuming that the bots to well). Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Man pages and info pages
On Wed, Nov 03 2010, rustom wrote: On Nov 3, 3:11 pm, Daniel da Silva ddasi...@umd.edu wrote: Guys, this really has nothing to do with python. ?? python docs have nothing to do with python?? python docs by default on linux are read with info and many seem to find info unpleasant to use. Actually, the Python documentation is no longer available in info format. Which is unfortunate, as that was the documentation format that I personally preferred. Myself an old emacs user and cant say info helps me as much as google. However comparing info and man is also a bit strange. The printed python docs come to several thousand pages. Do we want them to be 1 manpage? a hundred? a thousand? I am pretty conversant with the Python documentation. I almost never need to search them. I do miss being able to read (and search) the documentation in my editor though. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Hide DOS console for .pyc file
On Fri, Sep 10 2010, Muddy Coder wrote: Hi Folks, For a quick testing purpose, I deliver .pyc files to my customer. I don't want the black DOS console appearing behind my GUI, but I have no idea how to do it. Somebody can help? Thanks! Cosmo I don't really use Windows any more, so I might be off the mark, but I think that you need to look into using pythonw.exe instead of python.exe. Solving your problem might be as easy as changing the name of your file from foo.py to foo.pyw. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Microsoft lessening commitment to IronPython and IronRuby
On Tue, Aug 10 2010, Ben Finney wrote: Steven D'Aprano steve-remove-t...@cybersource.com.au writes: On Tue, 10 Aug 2010 20:07:06 +1200, Gregory Ewing wrote: Is there any way for a non-.NET program to access a .NET library? Or is it necessary to drink the entire bottle of .NET kool-aid? http://www.mono-project.com/Main_Page Anyone thinking of using Mono needs to be aware of the dangers of software patents in general, and of .NET in paticular. The copyright license for Mono is under free software terms. But that gives no license at all for the patents. Novell, who have an exclusive deal for those patents, happily encourages use of Mono by third parties. The controversy has raged for a number of years. For more coverage than you have time for, see URL:http://techrights.org/wiki/index.php/Mono. The issue has polarised discussion, unfortunately, and there is a lot of name-calling and hyperbole on the record now. As the Mono site hints, the patent situation for .NET is *very* muddy. Microsoft hold patents covering much of .NET, but have made a (non-binding) “Community Promise” that applies to *some* parts of .NET URL:http://www.mono-project.com/Licensing#Patents. Which is more of a promise than Microsoft has given to Python. I am not arguing for Mono, as I am not a fan. But if you honestly think that Python doesn't infringe on some of Microsoft's patents you are crazy. So where is the promise from Microsoft saying that they won't sue the Python development team into oblivion, or Python end users, for that matter? There isn't one. So while the Mono promise doesn't cover all of Mono, it does cover *some* of Mono, which is better than what Python can say. If you happen to be believe that Microsoft is likely to attack Free Software via patents then Mono is arguably the safest choice. Especially if you confine yourself to the ECMA-sponsored core and the Free Software libraries that are not re-implementations of Microsoft's technology. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode
Xah Lee xah...@gmail.com writes: Fresh out of the oven: • How to use and setup Emacs's whitespace-mode http://xahlee.org/emacs/whitespace-mode.html Xah ∑ http://xahlee.org/ Xah, I disagree with you about the usefulness of whitespace-mode's defaults, and I certainly disagree with the need to use profanity on your usenet post on the subject, but it is hard to argue against your whitespace-mode.html page. Very well done. Thanks, Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: standalone python web server
eric [EMAIL PROTECTED] writes: Hi all, I want to setup simple python web server and I want it to just unzip and run, without any installation steps (have no right to do it). I've tried to write by myself, however, I find I am getting into more details like processing image file, different file type(like FLV) .. etc. Any recommendation or tools suggested for me? CherryPy has a built in web server that can be installed without admin rights (it is pure Python), and can easily be configured to serve up static files. Just something to think about. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Tried Ruby (or, what Python *really* needs or perldoc!)
msoulier [EMAIL PROTECTED] writes: I have found the Python sidebar VERY helpful: Personally, I can't use local docs on my desktop as they may not be the same version of the docs for the Python distro running on the server that I'm deploying on. I usually go to python.org and use the wayback machine to look at the old docs for the release that I'm on. Why don't you instead install the info version of the Python documentation on your server. Then you can do info Python2.3-lib and have at it. If you are hacking in emacs then this is about as slick a documentation system as you could ask for, but even if you use some other editor info is a much better documentation tool than man. But, if Python would match Perl for docs available on the command-line, then I'd have it all at my fingertips. I simply don't understand why this is not being done. When I'm coding in C, I use the manpages on the remote host so that I know the docs are correct for my target. Why can't I do that in Python? It's yet another thing that my Perl-using coworkers point out as a Python weakness. Python does match (and exceed) Perl for docs available on the command line. Once you get used to using the excellent info-based Python documentation using man is downright primitive. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: spell check code
rtilley [EMAIL PROTECTED] writes: What is the most common way to spell check comments in code? Are there any idle plugins or modules that do this? In Emacs you can use flyspell-prog-mode to check strings and comments automagically. Just a bit of editor elitism... Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: HTML page into a string
Tempo [EMAIL PROTECTED] writes: In my last post I received some advice to use urllib.read() to get a whole html page as a string, which will then allow me to use BeautifulSoup to do what I want with the string. But when I was researching the 'urllib' module I couldn't find anything about its sub-section '.read()' ? Is that the right module to get a html page into a string? Or am I completely missing something here? I'll take this as the more likely of the two cases. Thanks for any and all help. Here's a short example of how this all works: #!/usr/bin/env python import urllib2 from BeautifulSoup import BeautifulSoup response = urllib2.urlopen('http://www.cnn.com') soup = BeautifulSoup(response) print soup.prettify() It's not a particularly useful example, unless, of course, you wish to prettify cnn's html, but it should get you to the point where BeautifulSoup's documentation starts to make sense. Jason -- http://mail.python.org/mailman/listinfo/python-list
Re: Extract contents of html cells
Robot [EMAIL PROTECTED] writes: Dear all, I need to create a script which will extract the contents of 2 cells of an html that contains a specified number of cells.Then I need to put that contents in another cells of my own html page.How can i do that?Any samples, tutorials, advice? The tricky bit is parsing HTML. Chances are good that what you want for that is BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/ Take a look at the examples there and then feel free to ask more questions. Jason -- http://mail.python.org/mailman/listinfo/python-list