Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread James Stroud
James Stroud wrote: > John Pye wrote: >> Hi all >> >> I have a file with a bunch of perl regular expressions like so: >> >> /(^|[\s\(])\*([^ ].*?[^ ])\*([\s\)\.\,\:\;\!\?]|$)/$1'''$2'''$3/ # >> bold >> /(^|[\s\(])\_\

Re: splitting perl-style find/replace regexp using python

2007-03-01 Thread James Stroud
Peter Otten wrote: > James Stroud wrote: > >> James Stroud wrote: >>> John Pye wrote: >>>> Hi all >>>> >>>> I have a file with a bunch of perl regular expressions like so: >>>> >>>> /(^|[\s\

Re: Tkinter menus

2007-03-01 Thread James Stroud
#here > self.master.config(menu=self.menubar) #here > self.fileMenu() > self.editMenu() > self.imageMenu() > > why i need to use self.master? > why i cant just use self? > > thx master is a reference to a Tk() or Toplevel(). Frames do not con

Re: Thread Profiling

2007-11-05 Thread James Matthews
re's not really > any way to know what should be charged to a particular thread. That's > on top of the normal caveats about trying to judge memory usage within > Python > > > > Thanks in advance, > > James Howard > > > > -- > > http://mail.python.

Re: Wanted: Software Engineers in San Jose, CA

2007-11-06 Thread James Matthews
Please use monster.com! or linkedin On Nov 6, 2007 10:49 PM, Peter Hsu <[EMAIL PROTECTED]> wrote: > I hope job posting is appropriate on this mailing list. I couldn't find > anything indicating otherwise. > > > > I'm looking for software engineers of all levels to help create a > next-generatio

Re: >>>> 911 operation by evil JEWS and Mossad <<<

2007-11-08 Thread James Matthews
Thank You! Maybe we can get rid of this guy now... This is a python group... On Nov 8, 2007 12:28 PM, philipp neulist <[EMAIL PROTECTED]> wrote: > On Nov 7, 4:08 pm, [EMAIL PROTECTED] wrote: > > 911 carried out by evil jews and > mossadhttp://www.guba.com/watch/2000991770 > > > > 911 truckload of

Re: [OT] The Jew Spam on this list

2007-11-13 Thread James Matthews
I agree! On Nov 13, 2007 1:26 PM, Martin Marcher <[EMAIL PROTECTED]> wrote: > Hello, > > please do not respond to the "political" spam on this list anymore. > Rather report it as spam to your provider/anti-spam-measures or report > it to the listmasters (if you have the feeling that it helps, I g

Re: Interfaces.

2007-11-15 Thread James Stroud
Status: Rejected Thank you for pointing out the obvious. But *truly* helpful would be insight into "While at some point I expect that Python will have interfaces." Look for that sentence under the "rejected" part. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/python-list

Re: implement random selection in Python

2007-11-15 Thread James Stroud
.randint(0, 99) > currentP = 0 > for (obj, p) in items: >currentP += w >if currentP > index: > return obj > > But how about the general case, for N > 1 and N < len(items)? Is there > some clever algorithm using Python standard "r

Re: Interfaces.

2007-11-17 Thread James Stroud
Chris M wrote: > There's something to be said > about users with signatures longer than their messages... Just be happy I didn't spell out UCLA and DOE. James -- James Stroud UCLA-DOE Institute of Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstr

Re: Mac os x 10.4.11: Error installing Python 2.5.1

2007-11-17 Thread James Stroud
n't log out and log in again as one. If that doesn't do it, what does your /Applications/Utilities/Console say? James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Environment Variables

2007-11-17 Thread James Stroud
Wang, Harry wrote: > Need some suggestions as to how to set environment variable in Windows XP. os.environ['SUX'] = 'windowsxp' > Got XML which has a timestamp in Eastern Standard time, but would like to > strip it out for comparison with expected result. Exampl

Re: Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-17 Thread James Stroud
rk/Versions/2.5/lib/python2.5/lib-dynload' James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Mac os x 10.4.11: Error installing Python 2.5.1

2007-11-17 Thread James Stroud
David wrote: > On Nov 17, 7:27 pm, James Stroud <[EMAIL PROTECTED]> wrote: >> David wrote: >>> Running OS X 10.4.11 PPC. No Intel. >>> I downloaded: >>> http://www.python.org/ftp/python/2.5.1/python-2.5.1-macosx.dmg >>> I started the install, ac

Re: Mac os x 10.4.11: Error installing Python 2.5.1

2007-11-17 Thread James Stroud
David wrote: > On Nov 17, 8:36 pm, James Stroud <[EMAIL PROTECTED]> wrote: >> David wrote: >>> On Nov 17, 7:27 pm, James Stroud <[EMAIL PROTECTED]> wrote: >>>> David wrote: >>>>> Running OS X 10.4.11 PPC. No Intel. >>>>>

Re: A proposal for attribute lookup failures

2007-11-18 Thread James Stroud
last): File "", line 1, in : object of type 'type' has no len() So this proposal would send the interpreter through two cycles of trying to find the proper attribute before it failed. Plus, I probably haven't even raised the best arguments against it, but my fe

Re: Commentary on Python 411 - Web 3.0 and Nanoprogramming

2007-11-18 Thread James Stroud
Institute, and now this! You know, having studied a lot of microbiology in college, I can't fathom the thought of being outdone. So I'm going to start doing femtoruminating, which reduces thought to its most fundamental particle, the mor-on. James -- James Stroud UCLA-DOE Institut

Re: What is python?????

2007-11-19 Thread James Stroud
ss of the group has to do > with discussion related to the batteries-included features and to > the other packages written to run in the Python environment. > > Hope that helps. > You're having a conversation with a spambot. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Web update library in python?

2007-11-20 Thread James Matthews
I think the best one would be to write it on your own! It shouldn't take more then 150 lines of code! Or you can use Egg's On Nov 20, 2007 9:39 AM, Jorgen Bodde <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to provide my users the ability to download a repository from > the web, and after that

Re: Python too complex ?!?!?!

2007-11-20 Thread James Matthews
I think they need to change teachers in this school! On Nov 17, 2007 2:46 PM, Brian <[EMAIL PROTECTED]> wrote: > Had a unsettling conversation with a CS instructor that > teaches at local high schools and the community > college. This person is a long-term Linux/C/Python > programmer, but he clai

Re: Python strings question (vertical stack)

2007-11-20 Thread James Matthews
I would say to split it by the newline! On Nov 20, 2007 10:59 PM, John Machin <[EMAIL PROTECTED]> wrote: > On Nov 21, 7:15 am, Farshid Lashkari <[EMAIL PROTECTED]> wrote: > > J. Clifford Dyer wrote: > > > I think you mean '\n'.join([string1,string2,string3]) > > > > > You actually do want the \ t

Re: Tk 8.5

2007-11-26 Thread James Matthews
I also cannot wait! On Nov 24, 2007 4:12 PM, Ron Provost <[EMAIL PROTECTED]> wrote: > Hello, > > According to the tk wiki, the final release of Tcl/Tk is just weeks away > (see http://wiki.tcl.tk/12753). Does anyone know if the Tk enhancements > will be in Python 2.6? Since I don't use tk but

Rss Feed Creator

2007-11-26 Thread James Matthews
Hi, I am looking for a library that will create Rss/Atom feeds in python. It needs to format the XML in a readable format! Does anyone have any suggestions? Thanks James -- http://search.goldwatches.com/?Search=Movado+Watches http://www.goldwatches.com/coupons http://www.jewelerslounge.com

Re: Rss Feed Creator

2007-11-26 Thread James Matthews
Thank You Shane, However that is using PyRss2Gen which doesn't put newlines in the XML. So it's a little out of the picture! On Nov 27, 2007 1:57 AM, Shane Geiger <[EMAIL PROTECTED]> wrote: > http://www.bigbold.com/snippets/tag/beautifulsoup > > > > James Matth

Re: Rss Feed Creator

2007-11-26 Thread James Matthews
Is there any where you do not have us tidy? On Nov 27, 2007 2:03 AM, Shane Geiger <[EMAIL PROTECTED]> wrote: > I think this is what you need to make the output readable: > > tidy -asxml output.xml > > > > > > James Matthews wrote: > > Thank You Shane,

Re: Rss Feed Creator

2007-11-27 Thread James Matthews
Thank you everyone! On Nov 27, 2007 10:13 AM, Vladimir Rusinov <[EMAIL PROTECTED]> wrote: > > > On 11/27/07, James Matthews <[EMAIL PROTECTED]> wrote: > > > > I am looking for a library that will create Rss/Atom feeds in python. It > > needs to format th

Re: read/write to java socket in python

2007-11-27 Thread James Matthews
It's a socket interface it should be universal! On Nov 27, 2007 4:08 PM, <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a problem with reading from a Java server after I have written > to it - it just hangs. It works fine if I just write to the server and > not try to write. I have read the HOWT

Re: Looking for a Python tutor

2007-11-27 Thread James Matthews
Please post on the job section! On Nov 27, 2007 6:46 PM, hong2221 <[EMAIL PROTECTED]> wrote: > I'm looking for a Python programmar that is willing write simple > functions, prices can be talked over. Contact me asap. > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://searc

Re: Donloadin mail on the background

2007-11-30 Thread James Matthews
Use threads or sub processes On Nov 29, 2007 9:17 PM, Francesco Pietra <[EMAIL PROTECTED]> wrote: > Dennis: > > Why am I using web-based email? As I work on several machines scp linked. > I > find often useful to see the same mail on different machines around, > without > downloading anything, ju

Re: Benchmark...

2007-11-30 Thread James Matthews
Google and wikipedia! On Nov 30, 2007 9:39 AM, ArShAm Shirvani <[EMAIL PROTECTED]> wrote: > Hi > I need a benchmark for speed , comparing with other languages > > Regards > Arsham > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://search.goldwatches.com/?Search=Movado+Wa

Re: Witch editor to use!

2007-11-30 Thread James Matthews
Eric On Nov 30, 2007 12:26 PM, Bruno Desthuilliers < [EMAIL PROTECTED]> wrote: > Carl Banks a écrit : > > On Nov 30, 4:40 am, Ant <[EMAIL PROTECTED]> wrote: > >> On Nov 30, 9:10 am, SMALLp <[EMAIL PROTECTED]> wrote: > > (snip) > > >>> And if editor is bether choice witch one to use! > >> One with

Re: Accessing a URL file Remotely

2007-11-30 Thread James Matthews
Once you use urlopen you can read the website like a file On Nov 30, 2007 10:58 AM, mcl <[EMAIL PROTECTED]> wrote: > On 29 Nov, 22:32, TheSeeker <[EMAIL PROTECTED]> wrote: > > On Nov 29, 3:13 pm, mcl <[EMAIL PROTECTED]> wrote: > > > > > > > > > I have been given a url ofCSVfile (http://hostname/d

Re: How to read strings cantaining escape character from a file and use it as escape sequences?

2007-12-01 Thread James Matthews
Also alot of times in the interactive interpeter it will show you charater codes! On Dec 1, 2007 6:04 PM, slomo <[EMAIL PROTECTED]> wrote: > WOW! Great! Thanks, Duncan. > > > On 12월2일, 오전12시33분, Duncan Booth <[EMAIL PROTECTED]> wrote: > > slomo <[EMAIL PROTECTED]> wrote: > > print line > > >

Re: python not a good name.

2007-12-01 Thread James Matthews
Well in the future we will ask the internet god "Google" to guide us in making the name! On Dec 1, 2007 7:36 AM, Joseph king <[EMAIL PROTECTED]> wrote: > sorry for not responding to the thread the regular way...[cough] > > just to prove everyone i counted what was found while searching python

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread James Matthews
Well in the future we will ask the internet god "Google" to guide us in making the name! On Dec 1, 2007 6:02 PM, Dotan Cohen <[EMAIL PROTECTED]> wrote: > On 01/12/2007, Tóth Csaba <[EMAIL PROTECTED]> wrote: > > man.. :)) the biggest point in this thread :DD > > btw in my country not much, because

Re: C/C++ on UNIX Developer required in Woodmead, Johannesburg

2007-12-01 Thread James Matthews
Please post in the Python Wiki under the jobs On Dec 1, 2007 9:38 AM, arnold <[EMAIL PROTECTED]> wrote: > We seek the following sort of experience / skill for developer > resources (if u do not qualify - we offer a handsome referral fee if > you refer someone that is succesfully placed:-) . > > C

Re: pythonw.exe and python.exe

2007-12-01 Thread James Matthews
Because they use two different API's to execute your code! On Nov 30, 2007 9:09 PM, whatazor <[EMAIL PROTECTED]> wrote: > Hi all, > I made a little application with multithreading in winxp with > python2.5. An event generated from a third part software is the > trigger for the creation of progres

Re: String formatting with %s

2007-12-02 Thread James Matthews
try to import printf using ctypes On Dec 2, 2007 7:49 PM, MRAB <[EMAIL PROTECTED]> wrote: > On Dec 2, 1:35 pm, Donn Ingle <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm sure I one read somewhere that there is a simple way to set the > order > > of replacements withing a string *without* using a dict

Re: [OT] minimalist web server

2007-12-03 Thread James Matthews
Using DSL (Damn Small Linux) try apache! Or you can try litehttpd On Dec 2, 2007 3:35 AM, Daniel Fetchinson <[EMAIL PROTECTED]> wrote: > Hi list, > > This is way off topic but maybe somebody knowledgeable can help. > > I'm looking for the most minimalist web server ever that does nothing > el

Overriding member methods in __init__

2007-12-03 Thread c james
Given a condition at the time a class is instantiated, I want to change how __call__ is used. From the example below, self.no is using self.yes but self.__call__ is not. Can someone please explain why? EXAMPLE: class YesNo(object): def __init__(self, which): self.no = self.yes

Re: Overriding member methods in __init__

2007-12-03 Thread c james
Bruno Desthuilliers wrote: > c james a écrit : >> Given a condition at the time a class is instantiated, I want to change >> how __call__ is used. From the example below, self.no is using self.yes >> but self.__call__ is not. Can someone please explain why? > &g

Re: Overriding member methods in __init__

2007-12-03 Thread c james
Arnaud Delobelle wrote: > Why not simply do: > > class YesNo(object): > def __init__(self, which): > self.yesno = which and self.yes or self.no > def yes(self, val): > print 'Yes', val > def no(self, val): > print 'No', val > def __call__(self, val): >

Re: "Python" is not a good name, should rename to "Athon"

2007-12-06 Thread James Stroud
popular. The jokes translate just fine in my country, but dare I admit that python (or Monty Python, rather) is not funny for me either. I think I've actually heard someone say "that the jokes aren't funny is part of the humor". I guess some of us will never get it. Now Benny

Re: Distinguishing attributes and methods

2007-12-08 Thread James Stroud
e(Thing.amethod) is types.UnboundMethodType True py> t.value = 4 py> type(t.value) not in (types.FunctionType, types.UnboundMethodType, types.MethodType) True James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/python-list

Re: setattr getattr confusion

2007-12-08 Thread James Stroud
s Key(object): def __init__(self): self.x = 'NOT SET YET' self.props = self e.g. py> class Key(object): ... def __init__(self): ... self.x = 'NOT SET YET' ... self.props = self ... py> k = Key() py> k.props.x 'NOT SET YET' py> k.x '

Re: a Python person's experience with Ruby

2007-12-08 Thread James Matthews
I have been waiting for something like this! Thanks! On Dec 8, 2007 6:08 AM, Steve Howell <[EMAIL PROTECTED]> wrote: > Python is my favorite programming language. I've used > it as my primary language for about six years now, > including four years of using it full-time in my day > job. Three m

Nice Python Cartoon!

2007-12-08 Thread James Matthews
http://xkcd.com/353/ -- http://search.goldwatches.com/?Search=Movado+Watches http://www.jewelerslounge.com http://www.goldwatches.com -- http://mail.python.org/mailman/listinfo/python-list

Re: download complete webpage with python

2007-12-08 Thread James Matthews
from urllib import urlopen url = urlopen("http://www.google.com";).read() Enjoy! On 12/8/07, Larry Bates <[EMAIL PROTECTED]> wrote: > > Gabriel Genellina wrote: > > En Fri, 07 Dec 2007 17:58:43 -0300, yi zhang <[EMAIL PROTECTED]> > > escribió: > > > >> The urllib.urlretrieve() can only download t

Re: Job Offer: Python Ninja or Pirate!

2007-12-10 Thread James Matthews
Please post on the job forum! On Dec 10, 2007 9:14 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Etsy is an online marketplace for buying and selling all things > handmade: clothing, music, furniture, > software, jewelry, robots. We launched on June 18, 2005, and ever > since then have been

Re:

2007-12-12 Thread James Matthews
you can also use a for loop =) list = [1,2,3,4,5,6,7] str = ' ' for i in list: str+=i print str On Dec 12, 2007 2:25 PM, Lee Capps <[EMAIL PROTECTED]> wrote: > > On Dec 11, 2007, at 5:14 PM, katie smith wrote: > > > "[16, 16, 2, 16, 2, 16, 8, 16]" > > Regular expressions might be a good way

Re:

2007-12-12 Thread James Matthews
Can you please explain better? On Dec 12, 2007 2:19 AM, katie smith <[EMAIL PROTECTED]> wrote: > > I tried googling and yahooing to find the answer and there was to many > conflicting results so i just decided to ask to simple question here. > > How do i could the number of letters in a string no

Re: newbie

2007-12-12 Thread James Matthews
I really like this book! On Dec 11, 2007 3:11 AM, Joe Riopel <[EMAIL PROTECTED]> wrote: > On Dec 10, 2007 9:03 PM, Whizzer <[EMAIL PROTECTED]> wrote: > > Is OReilly's Learning Python a good place to start learning to program? > > I've been told Python is a good first language. > > I think this is

Re: Best way to protect my new commercial software.

2007-12-12 Thread James Matthews
You can make it hard and annoying etc.. to crack! but you will never stop people from cracking it! On Dec 10, 2007 8:15 AM, farsheed <[EMAIL PROTECTED]> wrote: > I wrote a software and I want to protect it so can not be cracked > easily. I wrote it in python and compile it using py2exe. what is t

Re: After running for four days, Python program stalled

2007-12-12 Thread James Matthews
INT 3 is a debug interrupt:-) On Dec 12, 2007 8:41 PM, Chris Mellon <[EMAIL PROTECTED]> wrote: > On Dec 12, 2007 1:34 PM, John Nagle <[EMAIL PROTECTED]> wrote: > > Had a Python program stall, using no time, after running OK for four > days. > > Python 2.4, Windows. Here's the location in Python

Re: looking for gui for python code

2007-12-13 Thread James Matthews
Using any GUI package you should be able to build your application into EXE format! On Dec 13, 2007 6:46 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i have written some python scripts which take command line arguments > and do some job. i would like to make it into a .exe using py2exe

RE: Is there a simple way to parse this string ?

2007-12-19 Thread James Newton
>I need to translate the following string >a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' > >into the following list or tuple >b = [(0, 0, 0, 255), (192, 192, 192, 255), True, 8 ] >Is there a simple way to to this. >Stef Mientki >>> a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8

Why does __builtins__ mean different things...

2007-12-20 Thread James Stroud
ds, what is the good of this? For the purposes of argument, the bad of this is the behavior above. I'm guessing its a bug. James -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does __builtins__ mean different things...

2007-12-20 Thread James Stroud
Jean-Paul Calderone wrote: > On Thu, 20 Dec 2007 14:29:35 -0800, James Stroud <[EMAIL PROTECTED]> > wrote: >> Hello all, >> >> Say I have the following module >> >> # amodule.py >> print __builtins__ >> # end of module >> >>

Re: Why does __builtins__ mean different things...

2007-12-21 Thread James Stroud
Erik Max Francis wrote: > James Stroud wrote: > >> Thank you for your help. I will import the __builtin__ module as you >> have suggested--it is what I need. >> >> Butwhat the heck? You mean if I drop an s I get predictable >> behavior and if I don'

Re: Why does __builtins__ mean different things...

2007-12-21 Thread James Stroud
Fredrik Lundh wrote: > James Stroud wrote: >> Erik Max Francis wrote: >>> randomly dropping letters in >>> names is going to result in bad behavior, so be more careful about it. Implying I've randomly dropped a letter? Where did I randomly drop a letter? >

Re: Why does __builtins__ mean different things...

2007-12-22 Thread James Stroud
Dustan wrote: > On Dec 21, 8:11 pm, James Stroud <[EMAIL PROTECTED]> wrote: >> I swear there is another thread going on here of which I am not aware. > > You just keep on telling yourself that. Is there a cricket here? -- James Stroud UCLA-DOE Institute for Genomics and

Re: Happy Christmas Pythoneers

2007-12-24 Thread James Matthews
Happy Holidays Y'all! On Dec 24, 2007 5:50 PM, Nabeel Ali Memon <[EMAIL PROTECTED]> wrote: > :-) sure if we had machines addressing above hexa... > > > On Dec 24, 2007 9:30 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: > > > On Dec 24, 1Ha2:17�am, Paddy < [EMAIL PROTECTED]> wrote: > > > After

Re: Python for web...

2007-12-26 Thread James Matthews
Ha read an RFC for web dev! hehehhe Thats a new one! On Dec 26, 2007 9:43 AM, Bruno Desthuilliers < [EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > Hi everyone, > > > > I have to develop a web based enterprise application > > "enterprise" ??? > > > for my final year > > project. Since

Re: very newbie question about exception handling

2007-12-26 Thread James Matthews
In short input runs an eval on the text before it passes it! So input like ord('a') will work fine because it will run that code! On Dec 26, 2007 5:26 AM, <[EMAIL PROTECTED]> wrote: > Thanks guys! It worked. > > Merry Christmas! > -- > http://mail.python.org/mailman/listinfo/python-list > --

Re: Game Development

2007-12-26 Thread James Matthews
SO use pygame! but please don't spam this list! -- http://search.goldwatches.com/?Search=Movado+Watches http://www.jewelerslounge.com http://www.goldwatches.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python DLL in Windows Folder

2007-12-26 Thread James Matthews
You have read access just not write! Because you need the DLLS in there! On Dec 25, 2007 7:53 PM, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Stef Mientki (Tue, 25 Dec 2007 11:39:47 +0100) > > Another reason "not to put the DLL in win/wys32": > > on a lot of computers writing to win/sys32 or ev

Re: Slicing matrix

2006-04-17 Thread James Stroud
Anthony Liu wrote: > I figure it out, too. NumArray is so flexible, it's > like cutting the cheese. Some idioms do not translate so well. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail

Re: multiline comments

2006-04-18 Thread James Stroud
ts? I'd like to understand the > reasoning behind keeping them out. I think the absence of multiline comments is like the requirement for indentation. It enforces good habits. Better is to make your multiple lines a function and comment out the function call. James -- James Stro

Re: how to append to a list twice?

2006-04-21 Thread James Stroud
t: py> import operator py> [100] + reduce(operator.add, [[i,i] for i in xrange(99,90,-1)]) [100, 99, 99, 98, 98, 97, 97, 96, 96, 95, 95, 94, 94, 93, 93, 92, 92, 91, 91] -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Hooking things up in GUI application

2006-04-24 Thread James Stroud
;m not sure any python gui has anything similar, but I hear cocoa users raving about something called KVO. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi subprocess, cannot get output

2006-04-25 Thread James Stroud
> results['xmlfile'] = result > results['sentence'] = input > > content['output'] = (output % results) > print template % content > > > Best regards, What kind of script is tinki? I had a bitch of a problem like this with

Re: Plotting package?

2006-04-26 Thread James Graham
Andrew Koenig wrote: > This may be a foolish question, but what's the most straightforward way to > plot a bunch of data in Python? > > That is, I want to write a program that does some number crunching, and then > I want to change some parameters and watch how the changes affect the > results.

Re: [Reported] (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-26 Thread James Stroud
Ken Tilton wrote: > What might stop? Nauseating misuse of English. Annoying cross-posts. Newsgroup clutter. Shusher-Shusher-Shushers like me. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.

Re: inheriting type or object?

2006-04-27 Thread James Stroud
iate objects inheret from object. I think this might clear up the issue: http://www.python.org/download/releases/2.2/descrintro/ James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: convert a int to a list

2006-04-28 Thread James Stroud
ll, first off, you've got a strange indexing going on there: a[i] > requires that the index be an integer. You likely *mean* > > for thing in a: > print len(thing) > > If so, you can just wrap it in a check: > > for thing in a: > if "__len_

Re: GUI slider control

2006-04-28 Thread James Stroud
.mainloop() I'm not sure about outside the hood. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread James Stroud
feel the need to post it for some attention starved reason. You might enjoy it when I put it up on your favorite newsgroup (and several other groups to boot). James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-29 Thread James Stroud
oes not group your post with the thread. I'm guessing other news readers won't either. Also, there is no doubt that you will soon be chastised for "top posting": http://en.wikipedia.org/wiki/Top-posting James -- James Stroud UCLA-DOE Institute for Genomics and Proteom

Re: resume picking items from a previous list

2006-04-29 Thread James Stroud
rint > one = playall_reload(1.00, 20.00, kevins) > print > two = playall_reload(one, 180, jessicas) > print > three = playall_reload(two, 40.00, kevins) > > if __name__ == '__main__': > test() > I didn't read your code, but a class might make it simpler: class Playah(object): def __init__(self, playlist): self.playlist = playlist self.reset() def reset(self): self._order = randrange(len(self.playlist)) self._i = 0 def next(): song = self.playlist(self._i) self._i += 1 if self._i > len(self.playlist): self.reset() return song You could probably make it an iterable if you tried. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: resume picking items from a previous list

2006-04-29 Thread James Stroud
James Stroud wrote: > kpp9c wrote: > >> I have a several list of songs that i pick from, lets, say that there >> are 10 songs in each list and there are 2 lists. >> >> For a time i pick from my songs, but i only play a few of the songs in >> that list... now my

Re: python and xulrunner

2006-05-01 Thread James Graham
[EMAIL PROTECTED] wrote: > I've been trying to get xulrunner compiled with python (in windows) but > have been unsuccessful. I've been following this: > . I haven't tried it, but do the instructions at developer.mozilla.or

Re: set partitioning

2006-05-01 Thread James Waldby
"[EMAIL PROTECTED]" wrote: > Can someone tell me of a good algorithm to partition a set of n > elements into m non-empty, disjoint subsets, where each subset has > size k? and later wrote in a separate post > Also, if I do not care about the number of subsets, what is a good > algorithm to partiti

Python & SSL

2006-05-02 Thread James Stroud
o make a certificate and key that python understands. Has anyone been successful at this? Did you use openssl? I want to make sure I am doing this part correctly. Thanks in advance for any help. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90

Re: Python & SSL

2006-05-02 Thread James Stroud
Benji York wrote: > James Stroud wrote: > >> I have been trying to make an https client with python > > > You probably don't want to use the standard library for HTTPS; here's a > quote from the socket module docs about SSL: > > Warning: This

Re: py2app, pythoncard build problems

2006-05-02 Thread James Stroud
'Crypto', 'SecureRandom', 'ResettableTimer'], 'iconfile': '%s.icns' % appname, 'argv_emulation' : True}} Jaems -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & SSL

2006-05-03 Thread James Stroud
John J. Lee wrote: > James Stroud <[EMAIL PROTECTED]> writes: > > >>I have been trying to make an https client with python, but it seems > > > What exactly do you mean by "make an https client"? Something that can communicate with an https ser

Re: Any useful benefit to a tiny OS written in Python?

2006-05-03 Thread James Stroud
[EMAIL PROTECTED] wrote: > I was curious if there was any benefit to having an OS written > in Python. > > The only benefit I can think of is that maybe Python is easier > to audit for security bugs than C is. > > > Any other benefits? > > Chris > http://unun

Re: Enumerating Regular Expressions

2006-05-08 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi all, > > Does anybody know of a module that allows you to enumerate all the > strings a particular regular expression describes? > > Cheers, > -Blair > You mean like re.compile(r'.*') ? -- James Stroud UCLA-DOE Institute for

Re: Enumerating Regular Expressions

2006-05-08 Thread James Stroud
[EMAIL PROTECTED] wrote: > James Stroud wrote: > >>You mean like re.compile(r'.*') ? > > > No. I mean like: > >>>>regex = re.compile(r'a|b') >>>>regex.enumerate() > > a > b > > You see the difficulty don

Re: Dictionaries -- ahh the fun.. (newbie help)

2006-05-09 Thread James Stroud
print cell > for run in cells[cell]['run']: > print cell, run, "should", > cells[cell]['results'].index(run) > > > I would expect the following > > OR3X1 > OR3X1 lvs should pass > NOR3X1 > NOR3X1 lvs shou

Re: do "some action" once a minute

2006-05-09 Thread James Stroud
ime.localtime()[4:6] > if sec==0 and minutes!=min: # first occur of sec==0 only!! polling > 10x a second > minutes=min > print "Eureca" > time.sleep(0.1) > > Regards > > Petr Jakes > This may be what you want: http://aspn.act

Re: List of lists of lists of lists...

2006-05-09 Thread James Stroud
ing, but you have to familiarize yourself with its indexing conventions: py> import numarray py> numarray.ones((3,2)) array([[1, 1], [1, 1], [1, 1]]) py> numarray.ones((1,2,3)) array([[[1, 1, 1], [1, 1, 1]]]) James -- James Stroud UCLA-DOE Institute for Ge

Re: interactive shell -- reload definitions?

2006-05-09 Thread James Stroud
ction in an external file. > > Thanks. > Quoting my python interpreter: """ Help on built-in function reload: reload(...) reload(module) -> module Reload the module. The module must have been successfully imported before. """ James -- Ja

Re: Reg Ex help

2006-05-11 Thread James Thiele
don wrote: > I have a string from a clearcase cleartool ls command. > > /main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4 > > I want to write a regex that gives me the branch the file was > checkedout on ,in this case - 'dbg_fo

Re: which windows python to use?

2006-05-11 Thread James Stroud
Any other recommendations? > > > thanks, > > Brian Blais > > Enthought does not play well with cygwin, I've noticed. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: which windows python to use?

2006-05-11 Thread James Stroud
Robert Kern wrote: > James Stroud wrote: > > >>Enthought does not play well with cygwin, I've noticed. > > > In what way? Does the mingw gcc that we distribute interfere with Cygwin's > gcc? > One can not run the enthought python interactive interpr

Re: altering an object as you iterate over it?

2006-05-19 Thread James Stroud
thon 2.3.4 (#4, Oct 25 2004, 21:40:10) [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2 Type "help", "copyright", "credits" or "license" for more information. py> open is file True James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics

Re: Question about Python on Mac

2006-05-20 Thread James Stroud
ould expect any meltdowns later on) > > I would appreciate any suggestions. > > Thanks. > I think fink is not detecting the gmp (GNU multiple precision arithmetic library) dependency. Try: % fink install gmp Then try building gmpy with /sw/bin/python. James -- James Stroud

escapes in regular expressions

2006-05-21 Thread James Thiele
I was helping a guy at work with regular expressions and found something I didn't expect: >>> re.match('\d', '7').group() '7' >>> re.match('\\d', '7').group() '7' >>> It's not clear to me why these are the same. Could someone please explain? -- http://mail.python.org/mailman/listinfo/python-lis

Re: Guide to using python for bash-style scripting

2006-05-23 Thread James Stroud
ell scripting. Chapters 3-5 will get you pretty close to master level at shell/system scripting. Note: This is not an intro to python. You should already be able to do simple programming in python for Lutz's book to be useful. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomi

<    15   16   17   18   19   20   21   22   23   24   >