Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-25 Thread Rob Warnock
Robert Uhl <[EMAIL PROTECTED]> wrote: +--- | However, the only two which matter are GNU emacs and XEmacs. | Both have supported a GUI for 16 years now. I don't have | XEmacs installed, so I cannot tell you if it has the tutorial. | I would be truly surprised if it didn't. +---

Re: automatical pdf generating

2007-06-25 Thread Evan Klitzke
On 6/24/07, Jackie <[EMAIL PROTECTED]> wrote: > Hi, all, > > There are 50 folders in my hard driver C: > C:\01.c:\02,...,c:\50 > > There are 4 pictures in each folder: > 1.jpg,2.jpg,3.jpg,4.jpg > > For each folder, I want to print the 4 pictures into a single-paged > pdf file (letter sized; print h

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-25 Thread Douglas Alan
Paul Rubin writes: > Douglas Alan <[EMAIL PROTECTED]> writes: >> And likewise, good macro programming can solve some problems that no >> amount of linting could ever solve. > I think Lisp is more needful of macros than other languages, because > its underlying primitive

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-25 Thread David Kastrup
Cor Gest <[EMAIL PROTECTED]> writes: > Some entity, AKA JackT <[EMAIL PROTECTED]>, > wrote this mindboggling stuff: > (selectively-snipped-or-not-p) > >> We don't care about the 1970 version of Emacs, >> because of course back then there WAS NO GUI. > > But if you are blind as bat, any 2007's GUI

printing html document with internet explorer

2007-06-25 Thread Fred Terp
I can print from all applications except explorer 7 which will automatically convert all documents to HTML script before printing. I am sure this is a simple setting but I can't find it. Frederick D. Terp 14985 Rivers Edge Court #135 Fort Myers, Florida 33908-7920 Phone: (239) 822-5439 Fax:

automatically pdf files generating

2007-06-25 Thread Jackie Wang
Hi, all, There are 50 folders in my hard driver C: C:\01.c:\02,...,c:\50 There are 4 pictures in each folder: 1.jpg,2.jpg,3.jpg,4.jpg For each folder, I want to print the 4 pictures into a single-paged pdf file (letter sized; print horizontally). All together, I want to get 50 pdf fi

Re: The Modernization of Emacs

2007-06-25 Thread Giorgos Keramidas
On Thu, 21 Jun 2007 13:02:18 -0400, [EMAIL PROTECTED] (Joel J. Adamson) wrote: >David Kastrup <[EMAIL PROTECTED]> writes: >> You know you can use something like >> C-x C-f /su::/etc/fstab RET >> (or /sudo::/etc/fstab) in order to edit files as root in a normal >> Emacs session? > > I did not know t

convert hex to decimal - ala IBM Maniframe Assembly Language

2007-06-25 Thread Dan McGarigle
In re: http://mail.python.org/pipermail/python-list/2006-March/371757.html Dear Peter Maas The Intel 80xxx architecture is horrible when compared to an IBM S/360, or S/370, or S/390 or Z machines. IBM mainframes performance is measured in Millions Of Instructions executed per second, and n

Re: Which XML?

2007-06-25 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > On Jun 24, 7:04 pm, Bruno Barberi Gnecco > <[EMAIL PROTECTED]> wrote: >> I've found a lot of XML libraries for Python. Any advices on which >> one to use (or *not* to use)? My requirements are: support for XPath, >> stability (a must, segfaults are not an option),

Re: urllib interpretation of URL with ".."

2007-06-25 Thread Duncan Booth
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> Is "urllib" wrong? > > I can't see how. HTTP 1.1 says that the parameter to the GET > request should be an abs_path; RFC 2396 says that > /../acatalog/shop.html is indeed an abs_path, as .. is a valid > segment. That RFC also has a section on relati

Emacs topic should be stopped....

2007-06-25 Thread Gabor Urban
Hi guys, I was going through most of this topic, but I find this not relevant on THIS mailing list... A short summary: there are some people who are not disturbed by proven facts. They are mostly attackers of emacs/Xemacs or vim... Or even linux and open source. Quite funny, since this is a

Professional Grant Proposal Writing Workshop (September 2007: Simon Fraser University)

2007-06-25 Thread Anthony Jones
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will be held at Simon Fraser University at Harbour Centre, September 12 - 14 , 2007. Interested development professionals, researchers, faculty, and graduate students should register as soon as possible, as demand mean

Re: comparing two lists and returning "position"

2007-06-25 Thread Charles Sanders
hiro wrote: > bare in mind that I have a little over 10 million objects in my list > (l2) and l1 contains around 4 thousand > objects.. (i have enough ram in my computer so memory is not a > problem) Glad to see you solved the problem with the trailing space. Just one minor point, I did say > o

multiple python versions of a 3rd party application/libarary

2007-06-25 Thread Karthik Krishnamurthy
hi, I maintain applications/libraries which I upgrade often at a different location. For example if I maintain mercurial at /opt/sfw/mercurial/0.9.3 I have PYTHONPATH set to /opt/sfw/mercurial/0.9.3/lib/python2.4/site-packages. How can I get python to look into python2.4 and python2.4/site-packa

Re: automatical pdf generating

2007-06-25 Thread Nick Craig-Wood
Jackie <[EMAIL PROTECTED]> wrote: > There are 50 folders in my hard driver C: > C:\01.c:\02,...,c:\50 > > There are 4 pictures in each folder: > 1.jpg,2.jpg,3.jpg,4.jpg > > For each folder, I want to print the 4 pictures into a single-paged > pdf file (letter sized; print horizontally). All

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jun 25, 1:43 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > You have to define your threat model. If the threat to prevent is > > a malicious user getting at your data, or spreading a virus > > through your files, then chroot is perfectly ade

ANN: YahooQuote 0.1.0

2007-06-25 Thread DavidM
Hi, After a 3-year break from working with it, I've just released version 0.1.0 (the first formally packaged release) of YahooQuote. As the name implies, it's a stockmarket prices fetcher. Features: - easily fetch stock price quotes and histories - fetch bulk histories across one or more of the

Re: Portable general timestamp format, not 2038-limited

2007-06-25 Thread Roedy Green
On Sun, 24 Jun 2007 18:14:08 -0700, [EMAIL PROTECTED] (Robert Maas, see http://tinyurl.com/uh3t) wrote, quoted or indirectly quoted someone who said : >- Stick to astronomical time, which is absolutely consistent but > which drifts from legal time? depends what you are measuring. IF you are doi

Re: is this a valid import sequence ?

2007-06-25 Thread Steven D'Aprano
On Mon, 25 Jun 2007 05:08:00 +, Michele Simionato wrote: > On Jun 24, 1:29 pm, Steven D'Aprano >> I would like to hear your opinion of whether the >> following two functions are equally as wrong: >> >> def f1(gizmo): >> global spam # holds the frommet needed for the gizmo >> gizmo.get_

Re: The Modernization of Emacs

2007-06-25 Thread Lars Brinkhoff
David Kastrup <[EMAIL PROTECTED]> writes: > I should think that version 2.3.1 would not even try ftp. Is that > on Multics? Note that the GNU Emacs version jumped directly from 1.12 to 13. See etc/ONEWS.1. -- http://mail.python.org/mailman/listinfo/python-list

Re: is this a valid import sequence ?

2007-06-25 Thread Michele Simionato
On Jun 25, 1:46 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > To me, this code is redundant but not wrong: > > def sin(x): > return math.sin(x) > > It's not wrong, because it does everything that it is supposed to do, and > nothing that it isn't supposed to do. I told you, redundant/useles

Re: socket on cygwin python

2007-06-25 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > I've installed cygwin with latest python 2.5.1, but it seems that the > socket lib file do NOT support IPv6(cygwin\lib\python2.5\lib-dynload > \_socket.dll), what can I do if I want to use IPv6? I don't think Cygwin supports IPv6. Use the native Windows Python. -- Micha

Re: Which XML?

2007-06-25 Thread Paul Boddie
On 25 Jun, 02:04, Bruno Barberi Gnecco <[EMAIL PROTECTED]> wrote: > I've found a lot of XML libraries for Python. Any advices on which > one to use (or *not* to use)? My requirements are: support for XPath, > stability (a must, segfaults are not an option), with DOM API and good > performan

Re: Internationalised email subjects

2007-06-25 Thread bugmagnet
I'm an idiot! Gabriel, you're right! Turns out the ISP was running Python 2.3, which has known issues with the GB2312 codec. They've upgraded to 2.4 and now everything runs smoothly! -- http://mail.python.org/mailman/listinfo/python-list

Re: Which XML?

2007-06-25 Thread kyosohma
On Jun 25, 3:47 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Jun 24, 7:04 pm, Bruno Barberi Gnecco > > <[EMAIL PROTECTED]> wrote: > >> I've found a lot of XML libraries for Python. Any advices on which > >> one to use (or *not* to use)? My requirements are:

Re: Changing sound volume

2007-06-25 Thread simon kagwe
> And finally a way that might work using ctypes: > > http://mail.python.org/pipermail/python-win32/2006-March/004436.html > > Mike Hi, Thanks for your reply. I had already read about the Snack, but I can't use it since my program uses wxPython for the GUI and Snack requires tk. The best opt

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-25 Thread Martin Gregorie
Twisted wrote: > The manuals came with the computers, at no additional charge. It was a > different time. This isn't going to be true of any separately- > purchased book or user-made printout concerning emacs. Also, the > manuals provided a basic introduction for the beginning user. A > traditional

Re: Setuptools, build and install dependencies

2007-06-25 Thread Harry George
Robert Kern <[EMAIL PROTECTED]> writes: > Harry George wrote: > >> We need to know the dependencies, install them in dependency order, >> and expect the next package to find them. "configure" does this for >> hundreds of packages. cmake, scons, and others also tackle this >> problem. Python's o

Re: Portable general timestamp format, not 2038-limited

2007-06-25 Thread Steve O'Hara-Smith
On Mon, 25 Jun 2007 11:17:27 GMT Roedy Green <[EMAIL PROTECTED]> wrote: > On Sun, 24 Jun 2007 18:14:08 -0700, [EMAIL PROTECTED] (Robert Maas, > see http://tinyurl.com/uh3t) wrote, quoted or indirectly quoted > someone who said : > > >- Stick to astronomical time, which is absolutely consistent bu

Capturing and sending keys {Esperanto}

2007-06-25 Thread AJK
Hello there! I've been googleing yet, and suppose it's hopeless to try, but better ask it... I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE TYPING. (i.e. converting Esperanto x-system to real hats, for those who know about this.) Therefore I though will need to capture the las

Re: Reading multiline values using ConfigParser

2007-06-25 Thread Phoe6
On Jun 21, 7:34 pm, "John Krukoff" <[EMAIL PROTECTED]> wrote: > > > > Is there anyway, I can include multi-line value in the configfile? I > > > > Following the link to RFC 822 (http://www.faqs.org/rfcs/rfc822.html) > > > indicates that you can spread values out over multiple lines as long as > > >

New Thread- Supporting Multiline values in ConfigParser

2007-06-25 Thread Phoe6
Hi, Am starting a new thread as I fear the old thread which more than a week old can go unnoticed. Sorry for the multiple mails. I took the approach of Subclassing ConfigParser to support multiline values without leading white-spaces, but am struct at which position in _read I should modify to acc

Re: What was that web interaction library called again?

2007-06-25 Thread John Pye
Harald Korneliussen wrote: > Hi, > > I remember I came across a python library that made it radically > simple to interact with web sites, connecting to gmail and logging in > with four or five lines, for example. I thought, "that's interesting, > I must look into it sometime". I was looking for

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread walterbyrd
On Jun 24, 10:31 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > Especially since variables in python do not have to be explicitly > > assigned > > ??? I have probably expressed this incorrectly. What I meant was: >>> a = [1,2,3] >>> b = a >>> a[1] = 'spam' Here, I have changed b, withou

Re: comparing two lists and returning "position"

2007-06-25 Thread Paul Rubin
Charles Sanders <[EMAIL PROTECTED]> writes: > from itertools import izip, count > d = dict(izip(l2,count())) > pos = [ d[i] for i in l1 ] > > or the more memory intensive > > d = dict(zip(l2,range(len(l2 > pos = [ d[i] for i in l1 ] If you're itertools-phobic you could alternatively write

Re: Capturing and sending keys {Esperanto}

2007-06-25 Thread kyosohma
On Jun 25, 8:26 am, AJK <[EMAIL PROTECTED]> wrote: > Hello there! > > I've been googleing yet, and suppose it's hopeless to try, but better ask > it... > > I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE > TYPING. (i.e. converting Esperanto x-system to real hats, for those > who

Re: Capturing and sending keys {Esperanto}

2007-06-25 Thread kyosohma
On Jun 25, 8:26 am, AJK <[EMAIL PROTECTED]> wrote: > Hello there! > > I've been googleing yet, and suppose it's hopeless to try, but better ask > it... > > I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE > TYPING. (i.e. converting Esperanto x-system to real hats, for those > who

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread [EMAIL PROTECTED]
On Jun 25, 1:43 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > This wiki page suggests using a chroot jail to sandbox Python, but > > wouldn't running something like this in your sandboxed Python instance > > still break you out of the chroot jail: > > > os.exe

Re: Changing sound volume

2007-06-25 Thread Laurent Pointal
simon kagwe a écrit : > Hi, > > I am playing sounds using the winsound module. Is there a way I can change > the > volume? > Maybe with pyGame, but you may have to switch from winsound to pygame.mixer.music http://www.pygame.org/ http://www.pygame.org/docs/ref/music.html A+ Laurent. -- ht

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread Josiah Carlson
[EMAIL PROTECTED] wrote: > On Jun 25, 1:43 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >>> This wiki page suggests using a chroot jail to sandbox Python, but >>> wouldn't running something like this in your sandboxed Python instance >>> still break you out of t

How to save initial configuration? (program installation)

2007-06-25 Thread Jason Zapman II
I've written a program. To install this program, I'm going to need to initialize some stuff for the users environment, specifically the name/ location of an internal state file. Currently, I'm hard coding the location of this file, but that's in- elegant. What I'd like to do is just ask the user

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread Eduardo \"EdCrypt\" O. Padoan
> I don't think there is anything wrong with the data structures that > exist in python. I was just wondering if there was a structure that > would restrict a collection to only allow certain types. The > "restrictedlist" class discussed in another thread may be the sort of > thing I was looking fo

Re: How to save initial configuration? (program installation)

2007-06-25 Thread kyosohma
On Jun 25, 10:02 am, Jason Zapman II <[EMAIL PROTECTED]> wrote: > I've written a program. To install this program, I'm going to need to > initialize some stuff for the users environment, specifically the name/ > location of an internal state file. > > Currently, I'm hard coding the location of thi

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread David E. Konerding DSD staff
On 2007-06-25, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jun 25, 1:43 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >> > This wiki page suggests using a chroot jail to sandbox Python, but >> > wouldn't running something like this in your sandboxed Python

Re: How to save initial configuration? (program installation)

2007-06-25 Thread Jason Zapman II
On Jun 25, 11:10 am, [EMAIL PROTECTED] wrote: > I would think you could pop-up some dialog when the program is first > run to ask where they want the file to be. On the first run though, > you can just have the config file located in the current working > directory with the script file itself. Then

amara bugs

2007-06-25 Thread Rustom Mody
I tried to install amara according to the recommendations on this list. There were evidently compilation errors. The results are below Also the quick reference gives 404 not found errors Thanks $ sudo easy_install amara Searching for amara Best match: Amara 1.2.0.2 Processing Amara-1.2.0.2-py2.

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread Neil Cerutti
On 2007-06-25, walterbyrd <[EMAIL PROTECTED]> wrote: > BTW: I think polymorphism is great and all. But it does have > (and IMO should have) it's limitations. For example, I don't > think you can divide a string by another string. It might be a pointless new spelling for the .split method. x = 'Sm

server wide variables

2007-06-25 Thread Jay Sonmez
I want to be able to save some server variables as long as Apache runs on the server (mod_python). How is that possible in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to save initial configuration? (program installation)

2007-06-25 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Jun 25, 10:02 am, Jason Zapman II <[EMAIL PROTECTED]> wrote: >> I've written a program. To install this program, I'm going to need to >> initialize some stuff for the users environment, specifically the name/ >> location of an internal state file. >> >> Currently, I'm

Re: server wide variables

2007-06-25 Thread Stephen R Laniel
On Mon, Jun 25, 2007 at 03:29:25PM -, Jay Sonmez wrote: > I want to be able to save some server variables as long as Apache runs > on the server (mod_python). > > How is that possible in Python? Would setting environment variables help you? You'd use os.environ. http://docs.python.org/lib/os-

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-25 Thread Alexander Schmolck
Douglas Alan <[EMAIL PROTECTED]> writes: >> Python has built-in abstractions for a few container types like >> lists and dicts, and now a new and more general one (iterators), so >> it's the next level up. > > Common Lisp has had all these things for ages. Rubbish. Do you actually know any common

Re: How to save initial configuration? (program installation)

2007-06-25 Thread Steve Holden
Jason Zapman II wrote: > On Jun 25, 11:10 am, [EMAIL PROTECTED] wrote: >> I would think you could pop-up some dialog when the program is first >> run to ask where they want the file to be. On the first run though, >> you can just have the config file located in the current working >> directory with

Re: How to save initial configuration? (program installation)

2007-06-25 Thread Jason Zapman II
On Jun 25, 11:37 am, Steve Holden <[EMAIL PROTECTED]> wrote: > The traditional choices are the registry for Windows, and the /etc > subtree for the various, almost uncountable, flavors of Unix and > nixalikes. You're right, it's much more difficult per-system than > per-user, since there are so man

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread Paul Boddie
On 25 Jun, 16:48, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I followed up with my ISP. Here's the answer I got: > > The os.exec call prepends the chroot directory to the absolute path, > but does NOT provide chroot for the child process. However, as long > as the environment is maintaine

Talks & presentations online

2007-06-25 Thread M.-A. Lemburg
Hello, just wanted to let you know that we've put up a few of our conference talks and presentations on the web-site: http://www.egenix.com/library/presentations/ At EuroPython this year, we'll be giving talks on relational databases with Zope and show how mxTextTools can be put to good use

Re: How to save initial configuration? (program installation)

2007-06-25 Thread kyosohma
On Jun 25, 10:58 am, Jason Zapman II <[EMAIL PROTECTED]> wrote: > On Jun 25, 11:37 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > The traditional choices are the registry for Windows, and the /etc > > subtree for the various, almost uncountable, flavors of Unix and > > nixalikes. You're right, i

Re: urllib interpretation of URL with ".."

2007-06-25 Thread John Nagle
Duncan Booth wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > >>>Is "urllib" wrong? > Section 5.2 is also relevant here. In particular: > > >> g) If the resulting buffer string still begins with one or more >> complete path segments of "..", then the reference is >>

Re: Capturing and sending keys {Esperanto}

2007-06-25 Thread Jakub Stolarski
On Jun 25, 3:26 pm, AJK <[EMAIL PROTECTED]> wrote: > Hello there! > > I've been googleing yet, and suppose it's hopeless to try, but better ask > it... > > I want to write a program which turns Cx to , cx to et al WHILE > TYPING. (i.e. converting Esperanto x-system to real hats, for those > who

listing all property variables of a class instance

2007-06-25 Thread André
Suppose I define a class with a number of variables defined as properties. Something like: class MyClass(object): def __init__(self): self.some_variable = 42 self._a = None self._b = "pi" def get_a(self): return self._a def set_a(self, value):

RE: Help With Better Design

2007-06-25 Thread Sells, Fred
> IMHO ... untested > > class LightBulb: > def __init__(self, on=False): self.IsOn = on > > def turnOn(self): self.switchIt(True) > def turnOff(self):self.switchIt(False) > > def switchIt(self, turnon): > if self.isOn==turnon: print "The Switch is Already %s

Re: socket on cygwin python

2007-06-25 Thread Jason Tishler
On Mon, Jun 25, 2007 at 01:53:18PM +0100, Michael Hoffman wrote: > [EMAIL PROTECTED] wrote: > > I've installed cygwin with latest python 2.5.1, but it seems that the > > socket lib file do NOT support IPv6(cygwin\lib\python2.5\lib-dynload > > \_socket.dll), what can I do if I want to use IPv6? > >

How to change default behavior

2007-06-25 Thread Mozis
Greetings, I am using pyuniit for my test cases. I want to change the default behavior to report the errors. I believe it calls TextTestRunner class before calling my test_class(which is child of TestCase class) to set up the framework for error reporting and so on. I can see that it makes the "

Re: listing all property variables of a class instance

2007-06-25 Thread Neil Cerutti
On 2007-06-25, André <[EMAIL PROTECTED]> wrote: > Suppose I define a class with a number of variables defined as > properties. Something like: > > class MyClass(object): > > def __init__(self): > self.some_variable = 42 > self._a = None > self._b = "pi" > > def get_

Re: listing all property variables of a class instance

2007-06-25 Thread Jay Loden
Neil Cerutti wrote: >> Is there a way to write a method that would list automatically >> all the variables defined as a property (say by printing their >> docstring and/ or their value), and only those variables? > > This is off the cuff. There's likely a better way. > > for k, v in MyClass.__di

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-25 Thread Andreas Eder
Hi Twisted, > "Twisted" == Twisted <[EMAIL PROTECTED]> writes: Twisted> That's entirely orthogonal to the issue of interface learning curve OR Twisted> interface ease-of-use. Emacs has deficiencies in both areas, if Twisted> principally the former. (For an example of the latter,

Re: Changing sound volume

2007-06-25 Thread kyosohma
On Jun 25, 7:48 am, simon kagwe <[EMAIL PROTECTED]> wrote: > > And finally a way that might work using ctypes: > > >http://mail.python.org/pipermail/python-win32/2006-March/004436.html > > > Mike > > Hi, > > Thanks for your reply. > > I had already read about the Snack, but I can't use it since my

Re: Portable general timestamp format, not 2038-limited

2007-06-25 Thread Martin Gregorie
Steve O'Hara-Smith wrote: > On Mon, 25 Jun 2007 11:17:27 GMT > Roedy Green <[EMAIL PROTECTED]> wrote: > >> On Sun, 24 Jun 2007 18:14:08 -0700, [EMAIL PROTECTED] (Robert Maas, >> see http://tinyurl.com/uh3t) wrote, quoted or indirectly quoted >> someone who said : >> >>> - Stick to astronomical tim

Python-URL! - weekly Python news and links (Jun 25)

2007-06-25 Thread Gabriel Genellina
QOTW: "[R]edundant/useless/misleading/poor code is worse than wrong." - Michele Simionato http://groups.google.com/group/comp.lang.python/msg/74adbb471826a245 "Unit tests are not a magic wand that discover every problem that a program could possibly have." - Paul Rubin http://groups.googl

Re: listing all property variables of a class instance

2007-06-25 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Jay Loden wrote: > > Neil Cerutti wrote: >>> Is there a way to write a method that would list automatically >>> all the variables defined as a property (say by printing their >>> docstring and/ or their value), and only those variables? >> >> This is off the cuff. There's

Re: eggs considered harmful

2007-06-25 Thread Christopher Arndt
On 21 Jun., 14:10, Harry George <[EMAIL PROTECTED]> wrote: > I've asked before, and I'll ask again: If you are doing a Python > project, please make a self-sufficient tarball available as well. Alomost all projects I know of that provide eggs, also have a CVS or SVN repository. Just download a tag

Re: Changing sound volume

2007-06-25 Thread Lenard Lindstrom
simon kagwe wrote: >> And finally a way that might work using ctypes: >> >> http://mail.python.org/pipermail/python-win32/2006-March/004436.html >> >> Mike > > Hi, > > Thanks for your reply. > > I had already read about the Snack, but I can't use it since my program uses > wxPython for the GUI

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread Marius Gedminas
On Jun 24, 2:12 pm, Bjoern Schliessmann wrote: > 7stud wrote: > > if hasattr(elmt, some_func): > >elmt.some_func() > > Personally, I prefer > > try: > elmt.some_func() > except AttributeError: > # do stuff That also hides attribute errors that occur within some_func. I think I'd rath

Re: listing all property variables of a class instance

2007-06-25 Thread Gabriel Genellina
En Mon, 25 Jun 2007 15:10:25 -0300, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> escribió: > In <[EMAIL PROTECTED]>, Jay Loden wrote: >> Neil Cerutti wrote: Is there a way to write a method that would list automatically all the variables defined as a property (say by printing their >>>

Re: pydoc with METH_VARGS

2007-06-25 Thread Farshid Lashkari
Stuart wrote: > I'm asking if there's some sort of commenting or input file or > something to customize the output pydoc generates. Thanks. AFAIK, there is no way to do this. However, you can edit the doc string for your function, which can include the argument list. I believe this is what most

Re: How to save initial configuration? (program installation)

2007-06-25 Thread Jason Zapman II
On Jun 25, 12:14 pm, [EMAIL PROTECTED] wrote: > > usersChosenPath = /usr/Path/to/Config > > > Kind of redundant, but I would think it would still work. Ok... How do I tell the program where the INI file lives? (What I want is to be able to ask the user Where do you want the datafile to live?

Re: Why isn't this query working in python?

2007-06-25 Thread erikcw
On May 27, 11:06 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > On May 27, 2007, at 4:01 PM, Steve Holden wrote: > > >>erikcwwrote: > >>> On May 26, 8:21 pm, John Machin <[EMAIL PROTECTED]> wrote: > On May 27, 5:25 am,erikcw<[EMAIL PROTECTED]> wrote: > > > On

Python SVN down?

2007-06-25 Thread [EMAIL PROTECTED]
Going to this URL: http://svn.python.org/view/ It gives me an error: Unable to connect Firefox can't establish a connection to the server at svn.python.org. And using SVN as so: $ svn checkout http://svn.python.org/projects/python/trunk/ ~/ python_work/ svn: PROPFIND request failed on '/projects

Re: getting the size of an object

2007-06-25 Thread Simon Brunning
On 6/18/07, filox <[EMAIL PROTECTED]> wrote: > is there a way to find out the size of an object in Python? e.g., how could > i get the size of a list or a tuple? mxTools includes a sizeof() function. Never used it myself, but MAL isn't notorious for getting things wrong, so I'm sure it does what i

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread Bruno Desthuilliers
walterbyrd a écrit : > On Jun 24, 10:31 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > > >>>Especially since variables in python do not have to be explicitly >>>assigned >> >>??? > > > I have probably expressed this incorrectly. What I meant was: > > a = [1,2,3] b = a a[1]

Re: Indenting in Emacs

2007-06-25 Thread John J. Lee
Michael Hoffman <[EMAIL PROTECTED]> writes: > John J. Lee wrote: >> Eugene Morozov <[EMAIL PROTECTED]> writes: >> >>> Steven W. Orr пишет: >>> > Ok. I'm not stupid but I do not see a 4.78 anywhere even though I >>> see refs from google. I have 4.75 The SVN tree doesn't seem to even have

Re: eggs considered harmful

2007-06-25 Thread Benji York
On Jun 21, 8:10 am, Harry George <[EMAIL PROTECTED]> wrote: [snip description of unacceptable behaviors] > These are unacceptable behaviors. I am therefore dropping ZODB3 If you have bugs to report against ZODB, I sugest posting to zodb-dev (http://mail.zope.org/mailman/listinfo/zodb-dev). -- Ben

Installing python under the linux

2007-06-25 Thread vedrandekovic
Hello, I have problem with installing Python on the Linux platform.Can you tell me step by step how can I install python on linux ( please detailed ) , because I don't know anything about linux and I really don't understand python documentation about installing python on linux. Thanks!!! --

Re: eggs considered harmful

2007-06-25 Thread John J. Lee
Harry George <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: [...] >> 2. You can run your own private egg repository. IIRC, it's as simple >> as a directory of eggs and a plain old web server with directory >> listings turned on. You then run easy_install -f URL package_name

Re: Installing python under the linux

2007-06-25 Thread Grant Edwards
On 2007-06-25, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have problem with installing Python on the Linux platform.Can you > tell me step by step how can I install > python on linux ( please detailed ) , because I don't know anything > about linux and I really don't understand > python doc

Re: Installing python under the linux

2007-06-25 Thread Danyelle Gragsone
Greetings, Python is usally already installed on most distros. In a terminal window type "python" to see if something happens. Also please provide what distro you are running. Danyelle On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > I have problem with installing Python o

Re: Python SVN down?

2007-06-25 Thread Pulu
Can confirm the same behavior from locations in California and Arizona. The machine responds to pings but sends resets on any connection to tcp port 80... Asked in IRC, no response. On Jun 25, 12:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Going to this URL:http://svn.python.org/view

Re: Python SVN down?

2007-06-25 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Going to this URL: > http://svn.python.org/view/ > > It gives me an error: > Unable to connect > Firefox can't establish a connection to the server at > svn.python.org. > [...] > Any ideas? Clear case. $ nc -v svn.python.org 80 svn.python.org [82.94.237.220] 80 (www)

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Bruno Desthuilliers wrote: > walterbyrd a écrit : >> For example, I don't think you can divide a string by another string. > > No, because this operation is not implemented for strings - IOW, strings > doesn't understand this message. What would be the meaning of dividing

Re: Setuptools, build and install dependencies

2007-06-25 Thread John J. Lee
Harry George <[EMAIL PROTECTED]> writes: > Robert Kern <[EMAIL PROTECTED]> writes: > >> Harry George wrote: >> >>> We need to know the dependencies, install them in dependency order, >>> and expect the next package to find them. "configure" does this for >>> hundreds of packages. cmake, scons, a

finding an element in a string

2007-06-25 Thread Miguel Oliveira
Hi,   I was wondering if you could help me with this:   I want to make an if statement in which I would like to find a certain word in a sentence; here is what i have so far:   x = raw_input("how are you?")   if x == "fine":   print "Good."   But that, obviously, will only respo

Re: Installing python under the linux

2007-06-25 Thread vedrandekovic
Danyelle Gragsone je napisao/la: > Greetings, > > Python is usally already installed on most distros. In a terminal > window type "python" to see if something happens. Also please provide > what distro you are running. > > Danyelle > > On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > I followed up with my ISP. Here's the answer I got: > > The os.exec call prepends the chroot directory to the absolute > path, but does NOT provide chroot for the child process. That sounds like rubbish to me. If it worked like that, chrooting servers would be virtu

Re: finding an element in a string

2007-06-25 Thread Stephen R Laniel
On Mon, Jun 25, 2007 at 04:09:50PM -0400, Miguel Oliveira wrote: > But that, obviously, will only respond "good" when one writes "fine". I was > looking for a way for the program to respond "good" to any sentence that would > contain the word "fine" in it. What you want is a regular-expression mat

Re: Which XML?

2007-06-25 Thread Stefan Behnel
Paul Boddie wrote: > On 25 Jun, 02:04, Bruno Barberi Gnecco > <[EMAIL PROTECTED]> wrote: >> I've found a lot of XML libraries for Python. Any advices on which >> one to use (or *not* to use)? My requirements are: support for XPath, >> stability (a must, segfaults are not an option), with DO

Re: contextlib.closing annoyance

2007-06-25 Thread Klaas
On Jun 22, 4:54 pm, Paul Rubin wrote: > it looks like contextlib.closing fails to be idempotent, > i.e. wrapping closing() around another closing() doesn't work. > This is annoying because the idea of closing() is to let you > use legacy file-like objects as targets of t

Re: Using a switch-like if/else construct versus a dictionary?

2007-06-25 Thread Klaas
On Jun 19, 12:40 pm, asincero <[EMAIL PROTECTED]> wrote: > Which is better: using an if/else construct to simulate a C switch or > use a dictionary? Example: Whichever results in the clearest code that meets the performance requirements. FWIW, if you define the dictionary beforehand, the dict so

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-25 Thread Douglas Alan
Alexander Schmolck <[EMAIL PROTECTED]> writes: > Douglas Alan <[EMAIL PROTECTED]> writes: >>> Python has built-in abstractions for a few container types like >>> lists and dicts, and now a new and more general one (iterators), so >>> it's the next level up. >> Common Lisp has had all these thing

Re: Installing python under the linux

2007-06-25 Thread Grant Edwards
On 2007-06-25, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >>> I have problem with installing Python on the Linux >>> platform.Can you tell me step by step how can I install python >>> on linux ( please detailed ) , because I don't know anything >>> about linux and I really don't understand pytho

Re: eggs considered harmful

2007-06-25 Thread Fuzzyman
On Jun 21, 1:10 pm, Harry George <[EMAIL PROTECTED]> wrote: > ...at least around here. > > I run a corporate Open Source Software Toolkit, which makes hundreds > of libraries and apps available to thousands of technical employees. > The rules are that a) a very few authorized downloaders obtain > t

Internals and complexity of types, containers and algorithms

2007-06-25 Thread Harald Luessen
Hi, I am new to python and I miss some understanding of the internals of some types and containers. With my C/C++ background I hope to get some hints to chose the best data structure for my programs. Here are some questions: - Is there a brief description (not source) how the types tuple, stri

  1   2   >