Re: Online documentation split onto many small pages

2007-08-24 Thread Peter Otten
Ben Finney wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: > >> I don't really understand what the advantage for splitting up >> documentation into screen-sized chunks is supposed to be -- all the >> web browsers I've ever seen can scroll. > > The issue is the time to download the page. Most

Online documentation split onto many small pages (was: py2exe/distutils: how to include a tree of files?)

2007-08-24 Thread Ben Finney
Grant Edwards <[EMAIL PROTECTED]> writes: > I don't really understand what the advantage for splitting up > documentation into screen-sized chunks is supposed to be -- all the > web browsers I've ever seen can scroll. The issue is the time to download the page. Most of the world does not have fas

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

2007-08-24 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: GUI and distrubution

2007-08-24 Thread Bjoern Schliessmann
James Stroud wrote: > One of these days, someone needs to write a tutorial on > distributing for the Big 3 (Linux, OSX, and Amiga--or was that > last one supposed to be M$?). I think the last one was Wintendo ;) Regards, Björn -- BOFH excuse #221: The mainframe needs to rest. It's getting

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-24 Thread Xah Lee
2007-08-24 Steve Holden wrote: «It's already well-established that there's no point flamingXahLee, as he's pretty much an output-only source. See any responses from him on this thread?» Hum? so you want to dance? FYI, i have made a second post to this thread. See: http://groups.google.com/group/

Re: GUI and distrubution

2007-08-24 Thread Basilisk96
On Aug 24, 12:53 pm, anders <[EMAIL PROTECTED]> wrote: > I have looked att Python onwww.showmedo.com > And after this i start testing writing som program i Python. > But... > > So how is the preferably way to distribute software written i Python > i am NOT into hiding stuff, more a easy way of givi

Re: py2exe/distutils: how to include a tree of files?

2007-08-24 Thread Basilisk96
On Aug 24, 4:55 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > I'm packaging up a python program and need to include an entire > directory tree in the distribution. the data_files=[] option to > setup() is fine for individual files, but what do I do when I > need to include an entire directory tree

Running daemon with zdaemon ... example help?

2007-08-24 Thread Genie T
Hi all, I'm looking at zdaemon to run my python scripts as a daemon but it seems to have few example that guide me how to follow. It would be great if you can give me a simple example of how to use. I'm newbie here :) Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Does shuffle() produce uniform result ?

2007-08-24 Thread tooru honda
Hi, First of all, my thanks to all of you who replied. I am writing a gamble simulation to convince my friend that his "winning strategy" doesn't work. I use shuffle method from a random.SystemRandom instance to shuffle 8 decks of cards. As the number of cards is quite small (number of cards i

Re: Does shuffle() produce uniform result ?

2007-08-24 Thread Mark Dickinson
On Aug 24, 9:30 pm, Mark Dickinson <[EMAIL PROTECTED]> wrote: > x = floor((n/2**53)*7) > > will produce 0, 1, 3 and 5 with probability (2**53//7+1)/2**53, and 2, > 4 and 6 with probability (2**53//7)/2*53. Oops---I lied; I forgot to take into account the rounding implicit in the (n/2**53)*7 mult

Re: Does shuffle() produce uniform result ?

2007-08-24 Thread Paul Rubin
tooru honda <[EMAIL PROTECTED]> writes: > The reasoning is as follows: Because the method random() only produces > finitely many possible results, we get modulo bias when the number of > possible results is not divisible by the size of the shuffled list. > > 1. Does shuffle() produce uniform res

Re: Does shuffle() produce uniform result ?

2007-08-24 Thread Mark Dickinson
On Aug 24, 8:54 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > tooru honda <[EMAIL PROTECTED]> writes: > > I have read the source code of the built-in random module, > > random.py. After also reading Wiki article on Knuth Shuffle > > algorithm, I wonder if the shuffle method implemented in random.

Re: py2exe/distutils: how to include a tree of files?

2007-08-24 Thread Grant Edwards
On 2007-08-25, Carl Banks <[EMAIL PROTECTED]> wrote: > On Aug 24, 5:46 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: >> On 2007-08-24, Grant Edwards <[EMAIL PROTECTED]> wrote: >> >> > I'm packaging up a python program and need to include an entire >> > directory tree in the distribution. >> >> I've

Re: Regular expression use

2007-08-24 Thread Bruno Desthuilliers
Nick Maclaren a écrit : > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. Usually, to obfuscate code. Sometimes for good reasons Hu ? Ok, me get out >[] -- http:

Re: Parser Generator?

2007-08-24 Thread Paul McGuire
On Aug 18, 11:37 pm, "Jack" <[EMAIL PROTECTED]> wrote: > Thanks for all the replies! > > SPARK looks promising. Its doc doesn't say if it handles unicode > (CJK in particular) encoding though. > > Yapps also looks powerful:http://theory.stanford.edu/~amitp/yapps/ > > There's also PyGgyhttp://lava.n

Re: py2exe/distutils: how to include a tree of files?

2007-08-24 Thread Carl Banks
On Aug 24, 5:46 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-08-24, Grant Edwards <[EMAIL PROTECTED]> wrote: > > > I'm packaging up a python program and need to include an entire > > directory tree in the distribution. > > I've cobbled together something using package_dir/package_data > a

Converting my script from MS-DOS to Tkinter ran in a problem.

2007-08-24 Thread Lamonte Harris
Ok my script works decent so far, but say in the add news menu, my window dissapears right? but when i click add news on the main menu a new frame gets added, How can I remove the frames inside of my Toplevel? import sys,os,urllib,urllib2,md5,random,string from Tkinter import * main = Tk() main.w

Re: Problem w/ Tkinter

2007-08-24 Thread Matt McCredie
On 8/24/07, Lamonte Harris <[EMAIL PROTECTED]> wrote: > How to fix my code, wth that doesn't help solve anything really.the Tkinter > tutorial doesn't even explain radio buttons correctly, let alone, everything > else. gah. can you give a answer that I can work from. You asked, "what can I do to f

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Evan Klitzke writes: > On 8/23/07, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Some LaTeX users in Aachen thought about a general-use markup >> language this spring. I wrote some code and a rough project >> description, however, we could need some help. > > I have another question

Re: Co-developers wanted: document markup language

2007-08-24 Thread Evan Klitzke
On 8/23/07, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Some LaTeX users in Aachen thought about a general-use markup > language this spring. I wrote some code and a rough project > description, however, we could need some help. Torsten, I have another question about your markup language. Are t

Re: py2exe/distutils: how to include a tree of files?

2007-08-24 Thread Grant Edwards
On 2007-08-24, Grant Edwards <[EMAIL PROTECTED]> wrote: > I'm packaging up a python program and need to include an entire > directory tree in the distribution. I've cobbled together something using package_dir/package_data and os.path.walk(), but it seems like a bit of a kludge... -- Grant Edw

Re: Problem w/ Tkinter

2007-08-24 Thread Matt McCredie
> text="Action?",command=self.V(a,b,c,d)).pack(anchor=W) doesn't even do > anything, what can I do to fix this problem? I see many mistakes. First: `command=self.V(a,b,c,d)' is actually calling self.V. You don't want to call self.V, which will assing `command' to the return value, you want to pas

Re: csv module

2007-08-24 Thread John Machin
On Aug 25, 12:29 am, luca72 <[EMAIL PROTECTED]> wrote: > Hello at all i have a problem with the csv module, really i don't > undestud the writerows: > > if i have to write only one row i do as follow: > def scrivo_csv(self): > import csv > q_righe = self.tableWidget.rowCount() >

Re: py2exe/distutils: how to include a tree of files?

2007-08-24 Thread Grant Edwards
On 2007-08-24, Grant Edwards <[EMAIL PROTECTED]> wrote: > I'm packaging up a python program and need to include an entire > directory tree in the distribution. the data_files=[] option to > setup() is fine for individual files, but what do I do when I > need to include an entire directory tree? [

Re: Regular expression use

2007-08-24 Thread garage
I work in print (book) production and i regularly use regular expressions to parse .eps (encapsulated postscript) files for incorrect specifications (8-bit vs. ASCII, etc), bad fonts and the like. Just to ensure that what's been submitted to me will actually end up on the page. -- http://mail.py

Problem w/ Tkinter

2007-08-24 Thread Lamonte Harris
How do I add a command to a button say for instance class MYCLASNAME: def choices(self): choices = Toplevel() v = IntVar() a = Radiobutton(choices, text="Add News", variable=v,value=1).pack(anchor=W) b = Radiobutton(choices, text="Edit News", variable=v,value=2).

py2exe/distutils: how to include a tree of files?

2007-08-24 Thread Grant Edwards
I'm packaging up a python program and need to include an entire directory tree in the distribution. the data_files=[] option to setup() is fine for individual files, but what do I do when I need to include an entire directory tree? On a more general note, I'm having trouble finding much documentat

Re: Co-developers wanted: document markup language

2007-08-24 Thread James Stroud
Torsten Bronger wrote: > Reading only forums and newsgroups, one may think that this is > impossible but in real life, I've seen more people using LaTeX > exactly once and never again than people who keep using it. This is funny. I developed a pretty good competence in LaTeX to write my thesis (w

Re: Clipboard Monitor (tkinter,windows)

2007-08-24 Thread Gabriel Genellina
En Fri, 24 Aug 2007 06:35:05 -0300, Peter Sutton <[EMAIL PROTECTED]> escribi�: > Hi. I am an A-level student studying computer science. I have taken it > upon myself to learn python. It is now my weapon of choice. I have had a > problem trying to creating a clipboard monitor in Windows(XP,Vi

Re: GUI and distrubution

2007-08-24 Thread Jarek Zgoda
James Stroud napisał(a): >> These are two of the most-often-asked questions on this list (along >> with "What's the best Python IDE?"). Search the list archives via >> Google, or do a general Google search. Some helpful terms to get you >> started include pyinstaller, py2exe, py2app, Tkinter, wxPy

Re: Parser Generator?

2007-08-24 Thread Jack
Thanks Jason. Does Parsing.py support Unicode characters (especially CJK)? I'll take a look. "Jason Evans" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Aug 18, 3:22 pm, "Jack" <[EMAIL PROTECTED]> wrote: >> Hi all, I need to do syntax parsing of simple naturual languages, >> fo

Re: GUI and distrubution

2007-08-24 Thread James Stroud
Kevin Walzer wrote: > anders wrote: > >> So how is the preferably way to distribute software written i Python > >> My next question is witch is the best GUI to use, also consider >> the delivery question above. >> > > These are two of the most-often-asked questions on this list (along with > "W

Re: How to replace a method in an instance.

2007-08-24 Thread James Stroud
[EMAIL PROTECTED] wrote: > I'm not going to help with these class / instance / whatever any more > and leave it to all you professionals. Wrong again. Stick your neck out, look like an ass, and then learn--alot. That's what I do. Your misinformation will be corrected, even if you are chastised i

Re: Co-developers wanted: document markup language

2007-08-24 Thread Robert Kern
Wildemar Wildenburger wrote: > Torsten Bronger wrote: >> Hallöchen! >> > Yes, you're German. Have you ever noticed that (we) Germans are > virtually the only ones that feel the need to rub our nationality into > everyones faces? ;) Howdy! We Americans do the same. ;-) -- Robert Kern "I h

Re: How to replace a method in an instance.

2007-08-24 Thread kyosohma
On Aug 22, 12:48 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > > > On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > > >>In the program below, I want this instance to end up calling repmeth > >>whenever inst.m1 is called. As it is now, I get

Re: Using Regular Expresions to change .htm to .php in files

2007-08-24 Thread Tim Williams
On 24/08/07, J. Cliff Dyer <[EMAIL PROTECTED]> wrote: > Tim Williams wrote: > > On 23/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > >> Hi, > >> > >> I have a bunch of files that have changed from standard htm files to > >> php files but all the links inside the site are now broken becau

Re: how to tar with python

2007-08-24 Thread Gabriel Genellina
En Fri, 24 Aug 2007 10:03:30 -0300, Brian McCann <[EMAIL PROTECTED]> escribi�: > I'm trying to tar the contents of a directory "test" which contains > 3 files foo1.xml ,foo2.xml, foo3.xml > in my current directory /home/pythonbox/tmp I have the directory "test" > if I run the below script it

Re: How to replace a method in an instance.

2007-08-24 Thread J. Cliff Dyer
Steven W. Orr wrote: > On Friday, Aug 24th 2007 at 12:26 -0400, quoth Steven W. Orr: > > =>On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: > => > =>=>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > =>=>> In the program below, I want this instance to end up callin

Re: IDE for Python

2007-08-24 Thread Eric CHAO
I think many python developers don't need such an IDE actually. Just like Ruby guys, they use a powerful editor, for example, Textmate, instead of all-in-one IDE. It's quick and direct. On 8/21/07, Joel Andres Granados <[EMAIL PROTECTED]> wrote: > Hello list: > > I have tried various times to use

Re: How to replace a method in an instance.

2007-08-24 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > >>In the program below, I want this instance to end up calling repmeth >>whenever inst.m1 is called. As it is now, I get this error: >> >>Hello from init >>inst = <__main__.CC instance at 0x402105ec> >

RE: creating a tar file with python

2007-08-24 Thread Carsten Haese
On Fri, 2007-08-24 at 12:18 -0400, Brian McCann wrote: > Ed, Carsten, Steve, > > I don’t care if Steve Holden is the python God himself, > He's a rude, arrogant, vulgar human who shows his true level > of intellect by his use of profanity That is your opinion of Steve, and you are entitled to y

Re: Using Regular Expresions to change .htm to .php in files

2007-08-24 Thread J. Cliff Dyer
I'd actually skip checking where the links are coming from, and just pretend any link could be .htm or .html. Check for both cases, either using a regex or just fix the .html cases first. So do 2 passes. Pass 1: Data.replace('.html', '.php') Pass 2: Data.replace('.htm','.php') I make no cl

Re: ANN: Compyler 0.1

2007-08-24 Thread srepmub
> + Generates C++ so you need an intermediate compiler (probably only > an issue on windows) Shed Skin comes with a stripped down MingW/G++, so compiling and running/importing compiled code is as easy as 'ss blah.py; make run' or 'ss -e blah.py; python; import blah' under both Windows and Linux

Re: How to replace a method in an instance.

2007-08-24 Thread Bruno Desthuilliers
Steven W. Orr a écrit : > In the program below, I want this instance to end up calling repmeth > whenever inst.m1 is called. As it is now, I get this error: > > Hello from init > inst = <__main__.CC instance at 0x402105ec> > Traceback (most recent call last): > File "./foo9.py", line 17, in ?

Fwd: I can't get value of entry box, Tinker

2007-08-24 Thread Lamonte Harris
yes, I already fixed the problem. -- Forwarded message -- From: 7stud <[EMAIL PROTECTED]> Date: Aug 24, 2007 1:28 PM Subject: Re: I can't get value of entry box, Tinker To: python-list@python.org Matt McCredie wrote: > > What/should I, can I do? > > Fix your code? > > > def login(

Re: I can't get value of entry box, Tinker

2007-08-24 Thread 7stud
Matt McCredie wrote: > > What/should I, can I do? > > Fix your code? > > > def login(): > > global e2,e1 > > print e2.get() > > print e1.get() > > That should work. > > Matt Try something like this: import Tkinter as tk root = tk.Tk() entry = tk.Entry(root) button = tk.Button(root, t

question

2007-08-24 Thread JYOUNG79
Still trying to learn Python and was hoping some of you might be able to give me some advice on my code below. It works but I'm wondering if there's more efficient ways of doing this than the way I've done it. The first step is I have to loop thru nested folders and find all files that star

Re: GUI and distrubution

2007-08-24 Thread Kevin Walzer
anders wrote: > So how is the preferably way to distribute software written i Python > My next question is witch is the best GUI to use, also consider > the delivery question above. > These are two of the most-often-asked questions on this list (along with "What's the best Python IDE?"). Search

Re: How to replace a method in an instance.

2007-08-24 Thread James Stroud
Steven W. Orr wrote: > Ok. I have a collection of classes that are produced by a factory. They > all inherit from a baseclass. One (maybe more) of the classes inherits a > method that he shouldn't. All I want is to be able to change that > particular class so that he will have the special method

Re: optparse - required options

2007-08-24 Thread Robert Dailey
Thank you VERY much for mentioning argparse- this is EXACTLY what I needed! Thank you! On 8/23/07, Steven Bethard <[EMAIL PROTECTED]> wrote: > > Omari Norman wrote: > > On Mon, Aug 20, 2007 at 05:31:00PM -0400, Jay Loden wrote: > >> Robert Dailey wrote: > >>> Well, I don't know what is wrong with

Re: online doc bug

2007-08-24 Thread O.R.Senthil Kumaran
> hyperlink "site module documentation" in Section 4.1 on page > http://docs.python.org/inst/search-path.html leads to a nonexistent > page. Thank you. Submitted the report and patch at: http://bugs.python.org/issue1012 -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python

Re: Using Regular Expresions to change .htm to .php in files

2007-08-24 Thread J. Cliff Dyer
Tim Williams wrote: On 23/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I have a bunch of files that have changed from standard htm files to php files but all the links inside the site are now broken because they point to the .htm files while they are now .php files. Does anyone h

Re: Regular expression use

2007-08-24 Thread Wildemar Wildenburger
Simon Brunning wrote: > On 24 Aug 2007 10:58:46 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > >> For reasons that I won't explain, as they are too complicated >> and not terribly relevant, I am interested in discovering what >> people actually use regular expressions for. >> > > http://xk

Re: I can't get value of entry box, Tinker

2007-08-24 Thread Matt McCredie
> What/should I, can I do? Fix your code? > def login(): > global e2,e1 > print e2.get() > print e1.get() That should work. Matt -- http://mail.python.org/mailman/listinfo/python-list

Fwd: How would I compile a Python file to a exe

2007-08-24 Thread Lamonte Harris
I thought I answered this lol.. -- Forwarded message -- From: vasudevram <[EMAIL PROTECTED]> Date: Aug 24, 2007 11:56 AM Subject: Re: How would I compile a Python file to a exe To: python-list@python.org On Aug 24, 2:11 am, Charlie <[EMAIL PROTECTED]> wrote: > Quoting Lamonte Harr

Re: How to replace a method in an instance.

2007-08-24 Thread Steven W. Orr
On Friday, Aug 24th 2007 at 12:26 -0400, quoth Steven W. Orr: =>On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: => =>=>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: =>=>> In the program below, I want this instance to end up calling repmeth =>=>> whenever inst.m1

Re: How would I compile a Python file to a exe

2007-08-24 Thread vasudevram
On Aug 24, 2:11 am, Charlie <[EMAIL PROTECTED]> wrote: > Quoting Lamonte Harris <[EMAIL PROTECTED]>: > > > Been a while and I'm wondering how I would go about doing it. > > py2exe seems to be a fairly good option for this, at least in the > world of Windows. Yes, py2exe looks good. I've tried it o

Re: Regular expression use

2007-08-24 Thread Simon Brunning
On 24 Aug 2007 10:58:46 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. http://xkcd.com/208/ -- Cheers, Simon B. [EMAIL

GUI and distrubution

2007-08-24 Thread anders
I have looked att Python on www.showmedo.com And after this i start testing writing som program i Python. But... So how is the preferably way to distribute software written i Python i am NOT into hiding stuff, more a easy way of giving eg friends a copy of the program without having them installti

Re: How to replace a method in an instance.

2007-08-24 Thread James Stroud
Steven W. Orr wrote: > On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: > > =>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > =>> In the program below, I want this instance to end up calling repmeth > =>> whenever inst.m1 is called. As it is now, I get this error

Re: Regular expression use

2007-08-24 Thread brad
Nick Maclaren wrote: > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. Finding credit card numbers in files...among other things: http://filebox.vt.edu/users/rtilley/publi

Re: How to replace a method in an instance.

2007-08-24 Thread Wildemar Wildenburger
Steven W. Orr wrote: > Sorry. I need repmeth to have self passed to it automatically if it's > called. I didn't mean to obfuscate the problem by not making a reference > to self in repmeth. > > Am I being clear? > > Sort of. Maybe you fare better if you state what you want to achieve, instea

Re: I know almost all basics

2007-08-24 Thread Terry Reedy
"Lamonte Harris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Now I'm moving more into the gaming world. What libs/modules would you | recommend? One of the basics is learning to use search engines. Try 'Python game programming' with Google, for instance. -- http://mail.py

Steve Holden is a moronic, self-indulgent BASTARD [WAS: Re: creating a tar file with python]

2007-08-24 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > I like Steve, but he seems pretty crabby/rude much of the time. > Now what is going on here? I've been on this list for quite some time now and over all of Steves very frequent posts this is the first thread that I recall in which he sort of snapped. All of the othe

Re: How to replace a method in an instance.

2007-08-24 Thread Steven W. Orr
On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: =>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: =>> In the program below, I want this instance to end up calling repmeth =>> whenever inst.m1 is called. As it is now, I get this error: =>> =>> Hello from init =>> i

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread Eduardo O. Padoan
> For example, if I have x=[ [1,2], [3,4] ] > > What I want is a new list of list that has four sub-lists: > > [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] [[a, [f(b) for b in a]] for a in x] -- http://mail.python.org/mailman/listinfo/python-list

RE: creating a tar file with python

2007-08-24 Thread Brian McCann
Ed, Carsten, Steve, I don't care if Steve Holden is the python God himself, He's a rude, arrogant, vulgar human who shows his true level of intellect by his use of profanity And he goes one level lower, stating he respects the python group he spews his profanity to. He chose to respond to my

Re: How to replace a method in an instance.

2007-08-24 Thread kyosohma
On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > In the program below, I want this instance to end up calling repmeth > whenever inst.m1 is called. As it is now, I get this error: > > Hello from init > inst = <__main__.CC instance at 0x402105ec> > Traceback (most recent call last)

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Aahz writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> [...] >> >> reStructuredText, AsciiDoc, and some others focus on source code >> documentation, or on software documentation. In contrast to >> that, our markup should be suitable for PhD theses, papers and >> the like. T

Re: Co-developers wanted: document markup language

2007-08-24 Thread Jeremy Sanders
Torsten Bronger wrote: > Some LaTeX users in Aachen thought about a general-use markup > language this spring. I wrote some code and a rough project > description, however, we could need some help. > > If you are interested, visit the provisional project page at > http://latex-bronger.sourceforg

How to replace a method in an instance.

2007-08-24 Thread Steven W. Orr
In the program below, I want this instance to end up calling repmeth whenever inst.m1 is called. As it is now, I get this error: Hello from init inst = <__main__.CC instance at 0x402105ec> Traceback (most recent call last): File "./foo9.py", line 17, in ? inst.m1() TypeError: repmeth() t

RE: creating a tar file with python

2007-08-24 Thread Brian McCann
I don't care if Steve Holden is the python God himself, He's a rude, arrogant, vulgar human who shows his true level of intellect by his use of profanity And he goes one level lower stating he respects the python group he spews his profanity to He chose to respond to my question, no one dragged

Re: creating a tar file with python

2007-08-24 Thread kyosohma
On Aug 24, 10:33 am, Ed Leafe <[EMAIL PROTECTED]> wrote: > On Aug 24, 2007, at 11:24 AM, Carsten Haese wrote: > > > You clearly have no idea who you're talking to. I suggest you > > Google for > > '"Steve Holden" Python' to get a clue. Good luck finding any more help > > here. > > Even if i

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Grant Edwards
On 2007-08-24, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > "Grant Edwards" wrote: > >> On 2007-08-23, Hendrik van Rooyen wrote: >> >> > While doing a netstring implementation I noticed that if you >> > build a record up using socket's recv(1), then when you close >> > the remote end down, th

Re: Regular expression use

2007-08-24 Thread Larry W. Virden
On Aug 24, 6:58 am, [EMAIL PROTECTED] (Nick Maclaren) wrote: > I am interested in discovering what > people actually use regular expressions for. Hmm - let's see. I tend to use regular expressions when I am writing code that needs to search through output to find certain patterns. I also use them

Re: creating a tar file with python

2007-08-24 Thread Ed Leafe
On Aug 24, 2007, at 11:24 AM, Carsten Haese wrote: > You clearly have no idea who you're talking to. I suggest you > Google for > '"Steve Holden" Python' to get a clue. Good luck finding any more help > here. Even if it were Joe Nobody to whom he was directing those comments, it was *

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread ZeD
Boris Borcic wrote: >>> For example, if I have x=[ [1,2], [3,4] ] >>> What I want is a new list of list that has four sub-lists: >>> [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] >> [[a, map(f,a)] for a in x] > [map(g,a) for a in x for g in [None,f]] > will do it. > > ...a bit too cleverly, but ther

RE: creating a tar file with python

2007-08-24 Thread Carsten Haese
On Thu, 2007-08-23 at 23:27 -0400, Brian McCann wrote: > > > Steve, > > I ran the code as you suggested, didn't work, tried variations of it > didn't work, > If you don't know the answer don't pretend you do! > > Apology not accepted, please don't wake up! > > Future correspondence on any py

I can't get value of entry box, Tinker

2007-08-24 Thread Lamonte Harris
I tried w/ my following code: from Tkinter import * master = Tk() Label(master, text="Username").grid(row=0, sticky=W) Label(master, text="Password").grid(row=1, sticky=W) e1 = Entry(master) e2 = Entry(master,show="*") def login(): global e2,e1 print e2 print e1 e3 = Button(master,tex

Re: python setup.py: how to override a setup.cfg value ?

2007-08-24 Thread Michael Ströder
Chris Shenton wrote: > I'm building python-ldap and need to change values of library and > include paths that are in the setup.cfg file. This is an automated > build (using "buildit") so I'd prefer not to have edit the .cfg by hand, > with sed, or even with buildit's Substitute(). Almost everythi

Re: creating a tar file with python

2007-08-24 Thread Ed Leafe
On Aug 23, 2007, at 11:27 PM, Brian McCann wrote: > I ran the code as you suggested, didn't work, tried variations of > it didn't work, > If you don't know the answer don't pretend you do! > > Apology not accepted, please don't wake up! > > Future correspondence on any python questions from you

Re: Server-side scripting in python

2007-08-24 Thread Bruno Desthuilliers
olive a écrit : >> Yes : have a look at Pylons too. It's actually quite less 'polished' >> than Django, but it's IMHO going in the right direction (as a matter of >> fact, Turbogears 2.0 - another well-known Python MVC framework - will >> be based on Pylons...). Django is clearly more oriented tow

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Hendrik van Rooyen
"Grant Edwards" wrote: > On 2007-08-23, Dan Stromberg - Datallegro wrote: > > > Are you using sock.settimeout()? > > Hey, somebody snuck timeouts into the socket module when I wasn't > looking... > > > I agree with Grant though - posting a minimal snippet of code that > > replicates the prob

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Hendrik van Rooyen
"Dan Stromberg - Datallegro" wrote: > > Are you using sock.settimeout()? Yes. > > I've always done timed-out sockets in python using select; IINM, the > settimeout method is a new addition. > > I agree with Grant though - posting a minimal snippet of code that > replicates the problem would

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Hendrik van Rooyen
"Grant Edwards" wrote: > On 2007-08-23, Hendrik van Rooyen wrote: > > > While doing a netstring implementation I noticed that if you > > build a record up using socket's recv(1), then when you close > > the remote end down, the recv(1) hangs, > > I don't see that behavior running 2.4 on Gentoo

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Grant Edwards
On 2007-08-24, Bryan Olson <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > [...] >> import socket,random >> >> HOST = '' # Symbolic name meaning the local host >> PORT = 8765 # Arbitrary non-privileged port >> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

csv module

2007-08-24 Thread luca72
Hello at all i have a problem with the csv module, really i don't undestud the writerows: if i have to write only one row i do as follow: def scrivo_csv(self): import csv q_righe = self.tableWidget.rowCount() for row in range(q_righe) : e_vuota = self.tableWidge

Re: Regular expression use

2007-08-24 Thread A.T.Hofkamp
On 2007-08-24, Nick Maclaren <[EMAIL PROTECTED]> wrote: > people actually use regular expressions for. Not the subject > domain, but the construction of the regular expressions. This is easy. I use RE for checking whether some input matches a certain pattern, and optionally, to extract some speci

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! David Boddie writes: > On Fri Aug 24 11:04:33 CEST 2007, Torsten Bronger wrote: > >> Paul Rubin writes: >> >>> TeX/LateX have been around forever and are well established >>> standards, as awful as they are. Why do we want ANOTHER markup >>> language? >> >> Well, because they are aw

Re: Unequal Length Maze

2007-08-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > On Aug 24, 4:41 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >>> Hi All, >>> what's the best algorithm to solve such problem ? >>> http://www.stetson.edu/~efriedma/unequal/ >>> I will really appreciate some pieces of code (python).

Re: Unequal Length Maze

2007-08-24 Thread tomtim20
On Aug 24, 4:41 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > Hi All, > > what's the best algorithm to solve such problem ? > >http://www.stetson.edu/~efriedma/unequal/ > > > I will really appreciate some pieces of code (python). > > If you pay me 100$ (really

Re: Co-developers wanted: document markup language

2007-08-24 Thread J. Robertson
olive wrote: >>> [snip] > > But few people are used to Plain Text Markup (excepted in some > scientific area maybe) and it is error prone. > It looks very much like Gummi's authors and target audience actually are part of the few people you are talking about: i.e. console-happy folks that ar

Re: Unequal Length Maze

2007-08-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi All, > what's the best algorithm to solve such problem ? > http://www.stetson.edu/~efriedma/unequal/ > > I will really appreciate some pieces of code (python). If you pay me 100$ (really a bargain), you get a solution in python. Diez -- http://mail.python.org/mai

Re: Regular expression use

2007-08-24 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Mirco Wahab <[EMAIL PROTECTED]> writes: |> |> Using complex regular expressions is like tank destruction |> with contact charges glued on them. Only a few people |> will even survive the first "usage", but survivors will |> then eventually be able to destroy almos

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread beginner
On Aug 24, 5:47 am, Paul Rubin wrote: > Boris Borcic <[EMAIL PROTECTED]> writes: > > >> For example, if I have x=[ [1,2], [3,4] ] > > > >> What I want is a new list of list that has four sub-lists: > > > >> [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] > > > [[a, map(f,a)] f

Re: creating a tar file with python

2007-08-24 Thread J. Cliff Dyer
Brian McCann wrote: Hi, I'm trying to create a tar file of the contents of the current directory right now there is only one file "text.xml" in the current dir, I'm using"." current dir as source but that gives syntax error any help would be greatly appreciated --Brian #!/usr/bin/pyth

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread beginner
On Aug 24, 12:44 am, beginner <[EMAIL PROTECTED]> wrote: > On Aug 24, 12:41 am, Davo <[EMAIL PROTECTED]> wrote: > > > > > > > On Aug 23, 9:24 pm, beginner <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > How do I map a list to two lists with list comprehension? > > > > For example, if I have x=[

Tinker question 1

2007-08-24 Thread Lamonte Harris
What does the pack function do exactly? Just puts everything together? Also I've been reading this manual/tutorial and I'm confused on the Frame, what does it do, I'm pretty confused on that. http://www.pythonware.com/library/tkinter/introduction/hello-again.htm -- http://mail.python.org/mailma

Re: Regular expression use

2007-08-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Nick Maclaren <[EMAIL PROTECTED]> wrote: > >For reasons that I won't explain, as they are too complicated >and not terribly relevant, I am interested in discovering what >people actually use regular expressions for. Not the subject >domain, but the construction of t

Re: Regular expression use

2007-08-24 Thread Mirco Wahab
Nick Maclaren wrote: > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. Not the subject > domain, but the construction of the regular expressions. After I figured out how t

  1   2   >