Re: I am not able to setup pydb2 ! Any help !

2005-09-21 Thread Robert Kern
ands >or: setup.py cmd --help > > error: no commands supplied > > > Please let me know , what should have been the issue. You have to give it a command. You probably want python setup.py install -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the

RE: distutils and decorators

2005-09-21 Thread Robert Brewer
See the "expose" function at: http://www.cherrypy.org/file/trunk/cherrypy/__init__.py?rev=654 Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Making dynamic data available via ODBC with Python

2005-02-07 Thread Robert Brewer
excel" and no frills; both IE and Firefox will use Excel to open it. Works wonderfully. Let me know if you need more details. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: negative integer division

2005-02-07 Thread Robert Kern
ib/typesnumeric.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
ld force the program as a whole to follow the GPL terms. However, I certainly don't have the money to pony up to run a test case. Consequently, I try to follow the wishes of the copyright holder. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
what uninformed about others, he doesn't deserve this vitriol. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
es up. However, I think it's best to follow Robert Heinlein's maxim: "Never attribute to malice what can adequately be explained by stupidity." And I think we can also replace the word "stupidity" with "ignorance" if you like. It seems to me that &qu

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
s/press-release/release_2002_14.html [2] http://www.rosenlaw.com/oslbook.htm -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Believe me, I share your frustration every time this issue comes up. However, I think it's best to follow Robert Heinlein's maxim: "Never attribute to malice what can adequately be explained by stupidity." that's Hanlon, not Hei

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Fair enough. The only time I've seen it in dead-tree print was in Heinlein's _Time Enough For Love_, unattributed to anyone else. if that's true, it would seem that it predates the Hanlon reference by a couple of years: http://www.statu

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Kent Johnson wrote: Fredrik Lundh wrote: Robert Kern wrote: Fair enough. The only time I've seen it in dead-tree print was in Heinlein's _Time Enough For Love_, unattributed to anyone else. Amazon.com "search inside the book" finds no hits for "malice" in this

RE: Python and version control

2005-02-09 Thread Robert Brewer
Peter Hansen wrote: > Carl wrote: > > What is the ultimate version control tool for Python if you > > are working in a Windows environment? > > I never liked coupling the two together like that. Instead > I use tools like TortoiseCVS or (now) TortoiseSVN with a > Subversion repository. These t

Re: Python-libnjb on macosx

2005-02-10 Thread Robert Kern
owing command: ld -dynamic -dylib -L/sw/lib -L/sw/lib/python2.3/config njb_c_wrap.o -o _njb_c.dylib -lpython2.3 -lnjb -lSystem -framework IOKit -ldylib1.o Try to write a distutils setup.py script. It should take care of the correct linker arguments for you. -- Robert Kern [EMAIL PROTECTED] "In the

Re: [N00B] What's %?

2005-02-11 Thread Robert Kern
administrata wrote: sry, i don't know much about maths What is % used for? such as? Among many other things, you can use it to test whether one integer evenly divides another integer. For example, to test if a number is odd: def isodd(x): return bool(x % 2) -- Robert Kern [EMAIL PROT

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
t I haven't seen anything of the sort. http://www.fastio.com/licensePlain.html See their license option for shareware developers. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
Jeremy Bowers wrote: On Fri, 11 Feb 2005 14:45:09 -0800, Robert Kern wrote: Until such matters are unequivocally determined in a court that has jurisdiction over you, do you really want to open yourself to legal risk and certain ill-will from the community? Huh? What are you talking about? I&#

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
community? I'll reiterate my strategy: follow the intentions of the copyright owner unless if I have actual case law on my side. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Hack with os.walk()

2005-02-12 Thread Robert Kern
7;m pretty sure this has been discussed at some point. I completely forget the results of said discussion (except the part where it wasn't going in yet, although you can't really call that "remembering" so much as "deducing from the current state of affairs"). -- Robe

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
not a sense of entitlement. If this does not appeal to you, then perhaps the Python community is not the right one for you. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
Ilias Lazaridis wrote: Robert Kern wrote: [snip] The answer to most of your questions is, "Because no one has yet volunteered their time and effort to get the job done." this answer do not fit in most questions. > please review them again. Against my better judgement, I have. It cer

RE: Help with embedding fully qualified script name

2005-02-14 Thread Robert Brewer
e = os.path.normpath(os.path.dirname(sys.argv[0])) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
y the GNU GPL." If I understand this right, I cannot produce commercial software with the cygwin toolset. Wait, you demand a completely open source toolchain on a proprietary operating system to develop proprietary software? The mind *boggles*. -- Robert Kern [EMAIL PROTECTED] "In the

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Robert Kern
Ilias Lazaridis wrote: Robert Kern wrote: Ilias Lazaridis wrote: Robert Kern wrote: [snip] The answer to most of your questions is, "Because no one has yet volunteered their time and effort to get the job done." this answer do not fit in most questions. please review them again.

Re: image fourier transform

2005-02-14 Thread Robert Kern
=None, axes=(-2,-1)) The 2d fft of a. This is really just fftnd with different default behavior. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Commerical graphing packages?

2005-02-14 Thread Robert Kern
without any tweaking. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: calculate with date

2005-02-15 Thread Robert Kern
ate(year, month, day) date1 = date0 + datetime.timedelta(days=100) newdatestring = '%.2d.%.2d.%.4d' % (date1.day, date1.month, date1.year) return newdatestring You may want to do the details differently, but datetime is the module that you want to use. -- Robert

RE: customizing metaclass constructed classes

2005-02-15 Thread Robert Brewer
] base.create_special_property(C, DateColumn('start_date')) Slightly off-topic: if you really want to make it pretty, add a custom descriptor so you can write: class C(A): id = IntColumn(primaryKey=1,allowNull=0) name = TextColumn(allowNull=0,size=50) description = TextCo

RE: replacing ASP/VBScript with Python

2005-02-15 Thread Robert Brewer
Response) %> The only downside is that ASP expects a physical file for every URL, so you'll either have lots of dumb copies of the stub, or a single dispatcher (and the ugly URL's you wanted to avoid). With a little planning, you can have the stubs auto-generated. Database side: try them all and see which is best with your dataset. ;) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: replacing ASP/VBScript with Python

2005-02-15 Thread Robert Brewer
Peter Maas wrote: > Robert Brewer schrieb: > >>I'm now confident that it is doable and keen on finding > out. The usual > >>question: what is the one and best way to do it? ;) > > > > > > Python ASP (pywin32), but put as little code as possible in

Re: Variables.

2005-02-16 Thread Robert Kern
e-textwrap.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

"Best" way to SIGHUP spamd from web page?

2005-02-17 Thread Robert Brewer
if anyone has recommendations for whose advice to ignore first. ;) Detailed explanations of your choice would be much appreciated, of course. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Calling a function from module question.

2005-02-17 Thread Robert Brewer
JRCondon wrote: > Sean, if you are asking what I think you are asking (I don't > think name hiding is the issue), you can use > > from module_name import * Sshh! We're obviously going to great lengths to not tell him about *. ;) Robert Brewer MIS Amor Ministries [EM

Re: Python, Matlab and AI question

2005-02-18 Thread Robert Kern
elp in translating the code. Anyone have any input on what the best tool for the job would be? I've googled, but I figure it's best to ask experience ;) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&quo

RE: "Best" way to SIGHUP spamd from web page?

2005-02-18 Thread Robert Brewer
int-checking, which isn't available in Python. I ended up writing a daemon (running as root) which simply listens on a local socket; when it receives any message, it HUPs spamd. Ugly but effective. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, Matlab and AI question

2005-02-18 Thread Robert Kern
I've added a link to the Scipy Wiki: http://www.scipy.org/wikis/topical_software/TopicalSoftware -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Robert Kern
ipped some of the email you were replying to. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: [PyGTK] Resizing a HandleBox

2005-02-21 Thread Robert Kern
oblem? I'm afraid I don't, but I'll bet that someone on the PyGTK mailing list does. http://www.daa.com.au/mailman/listinfo/pygtk -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harte

RE: recommended way of generating HTML from Python

2005-02-21 Thread Robert Brewer
cess logic. Now, getting into usability concerns (that framework and library authors tend to obsess over ;) may be too advanced for your class at the moment. But that's why recipes are recipes, not standard library modules: they're often biased toward quick and dirty scripting, not usable, maintainable edifices. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: weird strings question

2005-02-25 Thread Robert Kern
num = {} string2num['t'] = 45 string2num['e'] = 89 etc. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Met Problem with Distutils

2005-02-28 Thread Robert Kern
short, use the --install-scripts command-line option, or the setup.cfg/.pydistutils.cfg snippet: [install] install_scripts=... -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Mar 1)

2005-03-01 Thread Robert Kern
Cameron Laird wrote: Also, has anyone indexed Python bloggers (that is, webloggers of things Pythonic)? Certainly. http://mechanicalcat.net/pyblagg.html http://planetpython.org/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allow

Re: Faster way to do this...

2005-03-01 Thread Robert Kern
of 2, 4, 8 etc. as well as other things. Like nums = range(0, 100, 4) ? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Help- Recursion v. Iter Speed comparison

2005-03-01 Thread Robert Kern
ches until they're really called for. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Help- Recursion v. Iter Speed comparison

2005-03-02 Thread Robert Kern
EP 255 isn't helping me. No, the generator call creates a generator object which you iterate over. for value in f2(myfunc, seed, n): print value If you absolutely need a list: list(f2(myfunc, seed, n)) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows hi

Re: Faster way to do this...

2005-03-02 Thread Robert Kern
g C++ code with the equivalent Python code. I find it clearer and more terse than simply commenting in English! If you used literate programming tools, you might be able to get a Python version and a C++ version of your code in one go! -- Robert Kern [EMAIL PROTECTED] "In the fields of hell

Re: Distributing applications

2005-03-02 Thread Robert Kern
Jaime Wyant wrote: Sneaky! I like it. Now if there was only a subversion python module... Google, and you shall find. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.

Re: Help- Recursion v. Iter Speed comparison

2005-03-03 Thread Robert Kern
actuary77 wrote: Robert Kern wrote: actuary77 wrote: # # non-generator # def f1(afunc,aseed,n): values = [afunc(aseed)] for i in range(n-1): values.append(afunc(values[-1])) return

Re: Fast 2d brown/pink noise generation?

2005-03-04 Thread Robert Kern
for i in range(size): data[i] = self.getNextValue() return data def sampleData(self, size=1024): data = self.getManyValues(size) p = power(absolute(fftshift(fft(data))), 2)/size f = fftshift(fftfreq(size)) return data, f, p -- Robert Kern [EMAIL PROTECTE

Re: Dictionaries of Lists

2005-03-07 Thread Robert Kern
works just fine. It is only the key that needs to be hashable. The value can be any object. What is the best workaround? I don't mind making my lists immutable. Is there a way to tupelize them? tuple(mylist) I tried mydict[mykey]=([a for a in list]) but it didn't seem to work. -- Rob

Re: Mysterious "Attribute Errors" when GUI Programming

2005-03-07 Thread Robert Kern
DON'T. No, searching the source code for Tkinter shows no "Toplevel.pack" method (or in any of its base classes). Where is this program coming from? As for your GTK example, you have incorrect indentation. What I want to know is what kind of bugs either in my source code or in Pyt

Re: Mysterious "Attribute Errors" when GUI Programming

2005-03-08 Thread Robert Kern
k2tutorial/ch-GettingStarted.html#sec-HelloWorld -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

RE: Problematic behavior of the import statement when several modulefiles have the same name.

2005-03-09 Thread Robert Brewer
module > (database.py > file) in any PYTHONPATH directory. > > Are my observations correct? Is there something I ignored? Should > this be posted somewhere else? Short answer: don't use relative imports: from some_package import database http://docs.python.org/ref/import.html Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Etiquette on job posts

2005-03-10 Thread Robert Kern
http://www.python.org/Jobs.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

RE: hotshot ??

2005-03-11 Thread Robert Brewer
under OS > 10.3.8, if any > of that makes a difference. Nothing there prevents hotshot > from loading > a file that's been made without the lineevents=1 argument.) Sounds like you're hitting a known bug: http://sourceforge.net/tracker/index.php?func=detail&aid=900092&group_id =5470&atid=105470 Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: About Databases...

2005-03-11 Thread Robert Kern
s possible) reduce the size of the DB? And what about speed in storing/retrieving data? If your data is numeric, you'll probably want to use PyTables. http://pytables.sourceforge.net/html/WelcomePage.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: Licensing Python code under the Python license

2005-03-11 Thread Robert Kern
ase consider the following licenses instead: http://www.opensource.org/licenses/bsd-license.php http://www.opensource.org/licenses/mit-license.php http://www.opensource.org/licenses/afl-2.1.php -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: try / except not worknig correctly

2005-03-12 Thread Robert Kern
# .if myInput == 'G':break # .if myInput == 'H':break # .if myInput == 'I':break # .if myInput == 'J':break # .if myInput == 'K':break # .if myInput == 'L':break # .

Re: Turning String into Numerical Equation

2005-03-12 Thread Robert Kern
Artie Gold wrote: [BTW -- cultural question: Do we top-post here?] Please don't. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloading the "and" operator

2005-03-12 Thread Robert Kern
Fredrik Bertilsson wrote: I am trying to overload the "and" operatior, but my __and__ method is never called. __and__ overloads the "&" operator. The "and" keyword cannot be overloaded. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the gra

Re: Why is lower() deprecated and how should I replace it?

2005-03-13 Thread Robert Kern
CaSE.' In [2]: s.lower() Out[2]: 'i am a happy little string that wants to be lower case.' -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

RE: Itertools wishlists

2005-03-14 Thread Robert Brewer
se ;): def is_string(item): return isinstance(item, basestring) def flatten(seq, atomic_test = is_string): ... Perhaps atomic_test could allow a tuple or list of tests and combine them...? Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: OS X and Tkinter

2005-03-14 Thread Robert Kern
http://www.pythonmac.org/packages/MacPythonPantherAddons-2-py2.3-macosx10.3.zip It will install the _tkinter extension module. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.

Re: OS X and Tkinter

2005-03-14 Thread Robert Kern
Robert Kern wrote: Mike Tuller wrote: I recently purchased a book to learn python, and am at a part where I want to start working with GUIs. I have an OS X system, and am using the default python installed on the system. I have installed Tcl/Tk Aqua from http://tcltkaqua.sourceforge.net

Re: code for Computer Language Shootout

2005-03-15 Thread Robert Kern
sage using top(1) is a quick and dirty way. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: code for Computer Language Shootout

2005-03-15 Thread Robert Kern
for line in sys.stdin: if line.startswith('>') or line.startswith(';'): if seqlines: revcomp(seqlines) sys.stdout.write(line) seqlines = [] else: seqlines.append(line.strip()) revcomp(seqlines) i

Re: Why tuple with one item is no tuple

2005-03-16 Thread Robert Kern
ink about the zen of: , Is that a tuple or grit on my monitor? :-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

RE: How to create datetime object from DbiDate (win32.odbc)?

2005-03-17 Thread Robert Brewer
st prize would be to have a datetime constructor that takes a > DbiDate object as input, in the same way that mx does, but this does > not seem to exist. Try: datetime.datetime.utcfromtimestamp(int(value)) I gave up on dbiDates completely, however, (since their range is so limited) and use

Re: Text-to-speech

2005-03-19 Thread Robert Kern
to handle this on both platforms, but I guess I'm asking too much -- it's too hardware dependent, I suppose. Any hints? Googling around a bit, I get http://www.freebsoft.org/speechd http://www.festvox.org/festival/ http://www.speech.cs.cmu.edu/flite/ Some of them might be useful as a s

Re: Parallel Python on PowerMac?

2004-11-29 Thread Robert Kern
Alan Kennedy wrote: Although, iff your prospective machine supports System V IPC, you might want to check out PoSH. http://poshmodule.sourceforge.net It uses inline assembly, so that's a no-go on the PPC unless someone ports the assembly code. -- Robert Kern [EMAIL PROTECTED] "In the

Re: Numeric: 'where' function conditions

2004-11-29 Thread Robert Kern
; data <= 7),1,0) but, this won't work. Right. "3 < data" creates an array of 0s and 1s where the condition is false and true, respectively. You don't need where() at all. Try mask = logical_and(3 < data, data <= 7) -- Robert Kern [EMAIL PROTECTED] "In the fiel

Re: Random number generation from functions

2004-11-30 Thread Robert Kern
. Generating random numbers from an arbitrary pdf is possible, but tricky. I encourage you to search the literature for "monte carlo sampling." [1] http://www.scipy.org -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed t

RE: A way to wait Python event

2004-11-30 Thread Robert Brewer
"after forever"? > ... > Apart from that, there might be some hidden "keep this damn > window open > after the executed progam terminated"-checkbox. Happy hunting. http://www.google.com/search?q=windows+console+remain+open Use the /k switch to cmd.exe Rob

RE: RotatingFileHandler

2004-12-02 Thread Robert Brewer
ike you need to have a Formatter object added to your Handler: filename = '/var/log/user/movies2.log' logFile = logging.handlers.RotatingFileHandler(filename,'a',2000,4) formatter = logging.Formatter() logFile.setFormatter(formatter) ...then you can call emit. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PySQLLite Speed

2004-12-02 Thread Robert Kern
commend that you look at PyTables if all of your data is numerical, as it seems to be. http://pytables.sourceforge.net -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

RE: question on regular expressions

2004-12-03 Thread Robert Brewer
>>> a 'file://C:\\folder1\\folder2\\mydoc1.pdf,file://C\\folderx\\foldery\\myd oc2.pdf' Then you can use something like: >>> re.findall(r"([^\\]*\.[^,]*)(?:,|$)", a) ['mydoc1.pdf', 'mydoc2.pdf'] ...or Sean Ross' suggestion about urllib. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: type cmp add

2004-12-03 Thread Robert Brewer
or b. When I define the __add__ method, I have access to self and > other, whose properties I can change at will, but how do I get a fresh > instance of the class that I am writing? self.__class__() Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: [Python-Help] (fwd)

2004-12-04 Thread Robert Brewer
count -1 > print ' The average is:', sum/count Looks good to me (well, I'd write the loop differently, but...). What is happening that you dislike? >>> count = sum = 0 >>> number = 1 >>> while number != 0: ... number = input('Enter a nu

RE: Mean, median, and mode

2004-12-05 Thread Robert Brewer
nt ' The average is:', sum/count For the mode, you might build a dictionary: freq = {} while number != 0: number = input ('Enter a number: ') count = count + 1 sum = sum + number try: freq[number] += 1 except KeyError: freq[number] = 1 ...th

RE: Linguistic challenge: name this program

2004-12-05 Thread Robert Brewer
Andre Roberge wrote: > In 1981, Richard Pattis wrote a delightful little book titled "Karel > the Robot, a Gentle Introduction to the Art of Programming." Pattis's > "Karel the Robot" was named after the author Karel Capek, who > popularized the word "robot" in his play "Rossum's Universal Robots".

RE: Mean, median, and mode

2004-12-06 Thread Robert Brewer
Josiah Carlson wrote: > [EMAIL PROTECTED] (Sean McIlroy) wrote: > > > > >>> median = lambda x: (max(x)-min(x))/2 > > That is /not/ the median in the general case. > > median = lambda x: x.sort() or x[len(x)//2] That...is a really sneaky use of null return va

RE: better regular expression?

2004-12-06 Thread Robert Brewer
(os paths) and call os.path.normpath before comparing them. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: regex for url paramter

2004-12-07 Thread Robert Brewer
7;www.example.com', '/example.html', '', 'url=http://www.example.org/example.html', '') >>> query = urlparse.urlparse(url)[4] >>> params = [p.split("=", 1) for p in query.split("&")] >>> params [['url', 'http://www.example.org/example.html']] >>> urlparse.urlparse(params[0][1]) ('http', 'www.example.org', '/example.html', '', '', '') Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Help with generators outside of loops.

2004-12-07 Thread Robert Brewer
that single row from the generator > without having to use it in a for loop? I want to do > something like this: > > row = obj.ExecSQLQuery(sql, args)[0] > > But I'm guessing that you can't index into a generator as if > it is a list. row = obj.ExecSQLQuery(sql,

Re: 3D plotting library / OpenGL

2004-12-07 Thread Robert Kern
hat I could render as I wish. Any pointers, ideas, or suggestions? OpenGLContext might be your cup of tea. Or Zoe. I don't have much experience with them, though. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die."

Re: 3D plotting library / OpenGL

2004-12-08 Thread Robert Kern
Andrew Dalke wrote: Robert Kern: Here are the instructions that I posted to the PythonMac mailing list a while ago: Thanks. I am able to build and install VTK as per your instructions, except that I don't see an option for Toggle VTK_USE_GL2PS on (useful for printing). Oops. Sorry. Pre

RE: Possible to insert variables into regular expressions?

2004-12-09 Thread Robert Brewer
expr % r'oo').findall(s) > ['Wood', 'Looking'] > >>> re.compile(expr % r'ou').findall(s) > ['You', 'Yourself', 'Through', 'You', 'Your'] Just make sure you use re.escape, in case your interpolated string has regex-sensitive chars. re.compile(expr % re.escape(r'oo')).findall(s) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: collaborative editing

2004-12-10 Thread Robert Kern
via the Web? Why doesn't LaTeX/DocBook with a central CVS/Subversion repository work for what you want to do? Personally, I loathe writing at any length inside a Web browser and prefer to use a real editor at all times. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the g

Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
minus.org/rbre/tibia/tibia.tba Subversion: svn://casadeamor.com/tibia/trunk Help: http://www.aminus.org/rbre/tibia/tibia.html Demo: http://www.aminus.org/rbre/tibia/demo/tibia.tba Log in as an admin with iwethey/yammer. Log in as a guest with guest/guest. Please don't break my little home web

Re: style query: function attributes for return codes?

2004-12-10 Thread Robert Kern
strange return value. Another disadvantage is that one must compare the return value by value and not by name. That is, I cannot do something like this: code = get_connection() if code == NO_SERVER: ... -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Ar

RE: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
Gabriel Cooper wrote: > Robert Brewer wrote: > > >[...] > >Tibia is an in-browser editor for web pages. It allows you to quickly > >and easily modify the content of your web pages. > >[...] > > > I couldn't get it to work using Firefox on Red Hat Fe

RE: tibia error in apache2

2004-12-10 Thread Robert Brewer
AuthUserFile D:\htdocs\tibia\passwords Require valid-user ...and then use htpasswd to create the passwords file. I will look into ways to use Tibia without auth, for intranets, perhaps. Thanks! Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Blank ASP pages

2004-12-10 Thread Robert Brewer
. Not sure what > server they are using this is not in my company. I've run into this a couple of times. Often, setting the default ASP language to Python is the trick. Internet Services Manager->Site->Folder->Properties->Configuration->App Options->Default ASP Language. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: CGI zombies with Apache 1.3 on Linux

2004-12-10 Thread Robert Brewer
Erik Max Francis wrote: > Robert Brewer wrote: > > > I've Googled extensively, but can't figure out what might > be causing my > > Python CGI app to zombie (yes, Tibia, the one I just > announced ;). The > > cgi bit looks like this: > > Zombies are

RE: CGI zombies with Apache 1.3 on Linux

2004-12-10 Thread Robert Brewer
ich meant access & error events weren't being logged, which I *think* caused the children's parents to wait forever if there was an unhandled exception. I'll be back if it happens again. ;) Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Tibia 0.1 DOM-based website editor

2004-12-11 Thread Robert Brewer
though. You might want to make that more clear in the help file...maybe a one-liner like "Kupu does X, Y, and Z, and Jalopy adds A, B, and C". I'm looking forward to your release (with uploads! ;). Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Upgrade woes: Numeric, gnuplot, and Python 2.4

2004-12-11 Thread Robert Kern
it's not easy for him to do it himself. He's in a similar boat as you (except that he himself doesn't need a Windows binary. Natch.). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard H

RE: Tibia 0.1 DOM-based website editor

2004-12-13 Thread Robert Brewer
Richie Hindle wrote: > [Robert] > > Tibia is an in-browser editor for web pages. It allows you > to quickly > > and easily modify the content of your web pages. It allows you to > > directly view, edit, and save files on your webserver. > > Very impressive! I ran

RE: Suggestion for "syntax error": ++i, --i

2004-12-13 Thread Robert Brewer
Terry Reedy wrote: > "Petr Prikryl" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >Summary: In my opinion, the C-like prefix > >increment and decrement operators (++i and --i) > > You could propose to the author of Pychecker that he include, > if possible, an option to check

RE: Iteration within re.sub()?

2004-12-13 Thread Robert Brewer
v.1200 32 bit (Intel)] on win32. >>> import re >>> s = "abbababbabbaaa" >>> i[0] = -1 >>> def sub(match): ... i[0] += 1 ... return str(i[0]) ... >>> re.sub("b", sub, s) 'a01a2a34a56aaa' Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python mascot proposal

2004-12-13 Thread Andrew Robert
What about a dead camel? -- http://mail.python.org/mailman/listinfo/python-list

<    8   9   10   11   12   13   14   15   16   17   >