Re: Want to learn a language - is Python right?

2005-06-20 Thread James Stroud
l, just to name the more famous ones) and python takes the cake as a general purpose programming language. By the way, ignore any posts talking about speed of execution. This is generally a non-issue for new programmers. If you want your code to run faster, buy a faster computer. James On Mond

Re: Tuple Unpacking in raise

2005-06-20 Thread James Stroud
Thank you Steven and Konstantin, that clears things up. Sometimes I forget how incomplete my Python Essential Reference is. James On Monday 20 June 2005 05:40 pm, Steven Bethard wrote: > Well, it's not a bug, because that's what the documentation says it'll do: > > "

Swig wrapping C++ Polymorphism

2005-06-23 Thread James Carroll
Hi, I asked this on the SWIG mailing list, but it's pretty dead over there... I'm trying to get Python to pass a subclass of a C++ object to another C++ object... I have three C++ classes, TiledImageSource ZoomifyReaderWx which ISA TiledImageSource TiffWriter which has a method which takes a

Re: User interfaces in console (dialog like)

2005-06-23 Thread James Carroll
Wow, I was just reminiscing about my old TurboVision days... I second the recommendation. On 6/23/05, Jeremy Sanders <[EMAIL PROTECTED]> wrote: > Negroup wrote: > > > Do you guys know an alternative that fits my needings without moving > > from Python? > > Turbo Vision in dos used to be really

Re: Favorite non-python language trick?

2005-06-24 Thread James Stroud
iss it and it > would be nice to have in Python. class color:# americanized red = 0 blue = 255 green = 0 Less typing than pascal. Also avoids those stupid little colons. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 h

Re: Favorite non-python language trick?

2005-06-25 Thread James Stroud
ons are absolutely unecessary. I thought they were pointless 18 years ago when I learned pascal in highschool and after 20 years, I still think they are still pointless. -- 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: Favorite non-python language trick?

2005-06-25 Thread James Stroud
On Saturday 25 June 2005 06:44 pm, James Stroud wrote: > I thought they were > pointless 18 years ago when I learned pascal in highschool and after 20 > years, I still think they are still pointless. I think that fails "==". -- James Stroud UCLA-DOE Institute for Genomics

[offtopic] Re: Set of Dictionary

2005-06-26 Thread James Dennett
set of all things, and in which Russell's paradox is avoided in other ways (such as by restricting the comprehension axioms). (Sorry for drifting offtopic, I happen to find non-standard set theories interesting and thought that some others here might too.) -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: FlashMX and Py2exe doesn't fly...

2005-06-27 Thread James Carroll
They did it with Gush: (I think) http://2entwine.com/ It's a py program that embeds Flash very nice. -Jim On 27 Jun 2005 15:11:11 -0700, Grops <[EMAIL PROTECTED]> wrote: > Flash and Python could be a VERY powerful pair of tools for building > quick apps, Yet I don't see much on the we

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread James Stroud
s something like "I've got the beast in my sights misses Pennymoney". Haaar! Wow, that's a good one. I think James Bond did it for Americans. He always wore a dinner jacket and played a lot of backarack--which is only cool because you have to bet a lot of money. Anyway

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread James Stroud
Well--to take this as far OT as imaginable, yes I do have strange hearing problems. I have difficulty recognizing speech of any kind with my right ear. Amazing to think that this would be enhanced for British, but it would be consistent with my experience, which seems similar to yours. James

Re: Regular Expression for pattern substitution

2005-07-02 Thread James Stroud
py> line = 'this abcd this efgh that' py> r.sub(r'that\1this',line) 'that abcd this efgh this' Would this be the result you expect? James On Friday 01 July 2005 09:39 am, Vibha Tripathi wrote: > It'd be silly to write the code for it if it alrea

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread James Dennett
gt; > Yes: 5^2 + -2^2 is 29, however you write it. *If* you take -2 as a number, but not if you take the number as 2 and the unary minus as an operator with lower precedence than exponentiation. > >> White space is not significant in math AFAIK ;-) > > > No, but there's a very big difference between unary and binary minus. Not in this respect. However, the question is whether that's a unary -, which binds lower than exponentiation in most systems, or part of the negative number minus 2. -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: math.nroot [was Re: A brief question.]

2005-07-04 Thread James Dennett
Steven D'Aprano wrote: > James Dennett wrote: > >> > Yes: 5^2 + -2^2 is 29, however you write it. >> >> *If* you take -2 as a number, but not if you take the number >> as 2 and the unary minus as an operator with lower precedence >> than exponentiati

Re: f*cking re module

2005-07-04 Thread James Stroud
that they remember the frustration of being new to programming. Those "wasted" 1.5 hr sessions getting nowhere add up pretty fast and then the explicatives begin to flow. -- 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: multiple checkboxes highlighted when one clicked = not good

2005-07-05 Thread James Stroud
eckbutton(self.frame2, variable = self.InUse[t]).grid(row= i, column = t) should this last line read "self.InUse[i]" ? -- 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: multiple checkboxes highlighted when one clicked = not good

2005-07-05 Thread James Stroud
eckbutton(self.frame2, variable = self.InUse[t]).grid(row= i, column = t) should this last line read "self.InUse[i]" ? What I mean to say is that t is always 0 when you assign variable. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://

Re: What is Expresiveness in a Computer Language?

2005-07-10 Thread James Dennett
7;t > think 'expressiveness' is the way to describe that. You're missing, maybe, the very special nature of one task, namely that of communication between programmers. Computers care not if you use assembly code or Python, but people often find one or the other easier to read

Re: inheritance

2005-07-10 Thread James Dennett
is implemented by your C++ compiler -- but that said, I've used this assumption in the past and found it to be valid for a wide range of compiler/ABIs. -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: cursor positioning

2005-07-11 Thread James Carroll
I haven't tried this myself, but I think the secret to displaying a continuously updating %done on the command line is to print "file 100, 1% done" then send exactly 7 backspaces to the terminal, then print 2% done... so the backspaces will write over the previous text. Backspace is a \x08 (a

Re: Tricky Dictionary Question from newbie

2005-07-12 Thread James Carroll
Notice the dictionary is only changed if the key was missing. >>> a = {} >>> a.setdefault("a", "1") '1' >>> a.setdefault("a", "2") '1' >>> a.setdefault("b", "3") '3' >>> a {'a': '1', 'b': '3'} >>> a.setdefault("a", "5") '1' >>> a {'a': '1', 'b': '3'} -Jim On 7/11/05, Peter Hansen <[EMAIL PROTECT

Re: Tricky Dictionary Question from newbie

2005-07-12 Thread James Carroll
en <[EMAIL PROTECTED]> wrote: > (Fixed top-posting) > > James Carroll wrote: > > On 7/11/05, Peter Hansen <[EMAIL PROTECTED]> wrote: > >>(I always have to ignore the name to think about how it works, or it > >>gets in the way of my understanding it. The

Re: How can I import a py script by its absolute path name?

2005-07-15 Thread James Dennett
necessary to escape backslashes in path names. On Windows, however, backslash is a valid path separator, and must be escaped. So, on Unix, for a path separator, you type "/". On Windows you can either do the same, or type "\\". (Or (ab)use raw strings.) -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run python script in background after i logout

2005-07-24 Thread James David
"Harlin Seritt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a remote linux server where I can only access it via ssh. I have > a script that I need to have run all the time. I run like so: > > python script.py & > > It runs fine. When I log off ssh I notice that the script

Re: any thing to do???

2005-07-27 Thread James Stroud
ce. If you are interested, let me know. Maybe we can find a way to harness your time and enthusiasm. If you are good at organization, maybe you could help to turn this into a true open source project that interfaces with biopython. (Does anybody recognize the plea-for-help aspect of my message?)

Re: A replacement for lambda

2005-07-29 Thread James Richards
On 2005-07-30, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Christopher Subich wrote: >> g = >> g(1) == 1 >> >> Basically, I'd rewrite the Python grammar such that: >> lambda_form ::= "<" expression "with" parameter_list ">" >> >> Biggest change is that parameter_list is no longer optional,

Re: To thread or not to thread

2005-07-29 Thread James Richards
On 2005-07-28, Sidd <[EMAIL PROTECTED]> wrote: > Hello, > I was recently reading an article on threading in python and I > came across Global Interpreter Lock,now as a novince in python I was > cusrious about > > 1.Is writing a threaded code in python going to perform well than a > normal pyt

Aiksaurus interface?

2005-07-29 Thread James Richards
last few years, and I haven't been following. Is there a Python wrapper? Would anyone be interested in a Python wrapper if there's not one now? Regards, James -- Liberty means responsibility. That is why most men dread it. - George Bernard Shaw -- http://mail.python.org/mailman/listinfo/python-list

Re: Dabo in 30 seconds?

2005-07-30 Thread James Stroud
er is just pain. I think this is a developer trick, to keep you at war with yourself. The more you have internal conflict the more you will be looking for an App framework to solve your inner problems, and that keeps these guys in business--the business of wrecking souls. Go with yourself. James

Re: how to write a line in a text file

2005-07-31 Thread James Dennett
#x27;t need to distinguish so much between them and filesystems, but we're not there yet. Managing raw files, carefully, still has a place. -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: Dabo in 30 seconds?

2005-07-31 Thread James Stroud
ere, frankly I haven't even looked at the output except that I notice that it is a stack trace, so don't bother telling me how simple it is to fix and that I should know this or that. You might be right, but I simply don't care at this point. Sorry dabo guys. You are only one of

Re: Dabo in 30 seconds?

2005-07-31 Thread James Stroud
On Sunday 31 July 2005 05:14 pm, Robert Kern wrote: > You can't blame Dabo for this one. Your wxPython install is broken. Yes, but my Tkinter install works just fine. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesst

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
equisites in the INSTALL.txt file. James -- http://mail.python.org/mailman/listinfo/python-list

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
s in mind, and we kind of keep that mentality when evaluating modules our code uses. Do your end-users really want to figure out that the need to and how to install stylized text controls, whatever that is? -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Ange

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
es of the www documentation. It is probably there, hidden in a very obvious place that someone would be expected to read if they wanted to use it enough to dig for something they don't know there looking for. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 L

Class design for parser object

2005-08-02 Thread James Saker
I've been working on a Python class object for APRS (Automatic Position Reporting System - a digital mode used by amateur radio operators) and have been going through David Mertz's Text Processing in Python book to help in the construction of the parser component of the class. I was curious if

using httplib for authentication

2005-08-02 Thread James Stroud
point me in the right direction? I have discovered httplib and read the documentation and looked at the examples, but they don't seem helpful for this. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ --

Re: using httplib for authentication

2005-08-03 Thread James Stroud
Thank you Fuzzy, I will look into these things. Maybe the site is setting a cookie, as you have suggested. I have never delved into the ways of http except to configure apache and write some very bare-bones web pages, so I have to say that some very obvious things do not occur to me. James On

Re: COM makepy problem

2005-08-04 Thread James Kew
y > again. :-( > > SyntaxError: invalid syntax I've had the same problems; this pywin32 bug describes it: http://sourceforge.net/tracker/index.php?func=detail&aid=1166627&group_id=78018&atid=551954 I've found no way to avoid it except by downgrading to Python 2.4. James -- http://mail.python.org/mailman/listinfo/python-list

Re: Idiots guide to fonts with tKinter

2005-08-04 Thread James Stroud
page). You'll waste far more money's worth of time than just $55 trying to figure out how to do things that are already clearly described in Programming Python. James On Thursday 04 August 2005 02:02 am, import newbie wrote: > Hi all, > > I'm a programming dabbler trying

Re: How to determine that if a folder is empty?

2005-08-08 Thread James Dennett
lso note that modifying a filesystem can be significantly slower than reading from it (it varies widely across platforms). -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: World's largest Python caught!:)

2005-08-08 Thread James Stroud
http://www.afghania.com/News-article-sid-4792-mode-thread.html 3rd hit in google with "world's largest python". The first two hits were your email below to the newsgroups. James On Sunday 07 August 2005 09:15 pm, Ashok Rajasingh wrote: > Hi > > > > Can I pleas

Re: how to write a line in a text file

2005-08-10 Thread James Dennett
Calvin Spealman wrote: > On 7/31/05, James Dennett <[EMAIL PROTECTED]> wrote: > >>Peter Hansen wrote: >> >> >>>Steven D'Aprano wrote: >>> >>>Given that ZODB and PySQLite are simply Python extension modules, which >>>get bu

SSL postgresql & pgdb

2005-08-11 Thread James Saker
Just curious if anyone's aware of a good recipe for setting up SSL access to postgresql for pgdb (or another appropriate db-sig 2 compliant module). Or any good recommendations/considerations e.g. m2crypto with pgdb. jamie -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-08-11 Thread James Stroud
Xah Lee is a known troll. You are retarded to reply to his drivel. -- 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: list to tuple

2005-08-11 Thread James Stroud
thon > application such as >a1 = [1,5,3,2,5,...], the len(a1) varies. Same to b1, c1, > >With python, I would like to reorganize them into a tuple like > >t1 = ((a1[0],b1[0],c1[0],...),(a1[1],b1[1],c1[1],...),...) > > Anybody knows how to do that. Tha

Re: Euclid's Algorithm in Python?

2005-08-14 Thread James Dennett
ac=b, i.e., b is divisible by a. These definitions generalize to rings other than the integers, without requiring a meaningful < comparison on the ring.) All of that said, it would be reasonable when working in the integers to always report the positive value as the gcd, to make gcd a simpler function. For some applications, it won't matter if you choose positive or negative, so going positive does no harm, and others might be simplified by assuming gcd>0. -- James -- http://mail.python.org/mailman/listinfo/python-list

Re: robust html parser

2005-08-15 Thread James Stroud
http://www.crummy.com/software/BeautifulSoup/ On Monday 15 August 2005 03:33 pm, BRA_MIK wrote: > I'm looking for a good and robust html parser that could parse complex > html/xhtml document without crashing (possibly free) > > Could you help me please ? > > TIA > MB

Re: Well, another try Re: while c = f.read(1)

2005-08-20 Thread James Kim
ords distinguished from the conventional languages like c/c++, pascal, etc. -James -- http://mail.python.org/mailman/listinfo/python-list

Re: Doubt C and Python

2005-08-28 Thread James Kim
can be used for interpreting works. Jython has the same grammer to Python, or CPython, and is also able to call Java codes very simply. See, for example: http://www.jython.org/docs/usejava.html -James (^o^) -- http://mail.python.org/mailman/listinfo/python-list

Re: Doubt C and Python

2005-08-28 Thread James Kim
API? Only most time consuming parts can be replaced to C/C++ codes so as to increase the speed up to native C/C++ programs). -James (^o^) -- http://mail.python.org/mailman/listinfo/python-list

Re: pain

2005-09-01 Thread James Stroud
ere's a throw away project that could be > a test for the new language or framework. If you want to try a > new/different language, you need to show the benefit other than "it's > cool/new". A manager insisting on java is probably only thinking about na

wxImage can't read tif file? (WxPython)

2005-09-05 Thread James Hu
? Another thing: how can I call the static methods like wxImage::FindHandler, it always complains no matter what I use "image.FindHandler() or wxImage.FindHandler()" Any help will be apprecaited greatly!!! James the codes: #image=wx.Image('output.png',wxBITMAP_TYPE_PNG) #Can

Function returns a function

2005-09-06 Thread James Stroud
of deprecation (really not trying to start a lambda pro/con thread here). Any ideas on how to do this with a regular function, or is the way I've done it the pythonic choice? James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http:/

Re: Function returns a function

2005-09-06 Thread James Stroud
Thank you Paul, this makes much more sense. James On Tuesday 06 September 2005 02:16 pm, Paul Rubin wrote: >     def FunctionMaker(avar, func, label): >        def callback(): >           avar.set(label) >           func() >        return callback -- James Stroud UCLA-DO

Re: Ode to python

2005-09-07 Thread James Stroud
ps we see a spark of inspiration: > Abolish all globals, and all mutinous variables. > Embed precious methods in organized crucibles. -- 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: encryption with python

2005-09-07 Thread James Stroud
numbers? James On Wednesday 07 September 2005 07:00 am, [EMAIL PROTECTED] wrote: > Hi! > > I was wondering if someone can recommend a good encryption algorithm > written in python. My goal is to combine two different numbers and > encrypt them to create a new number that cann'

Re: encryption with python

2005-09-07 Thread James Stroud
et a really big class. If your class might grow to several million, consider taking more bits of the hash. Also, as long as you remember the function, you can get back the student ID from the birthday and SS, in case they drop out and re-enroll next year. James -- James Stroud UCLA-DOE Insti

Re: encryption with python

2005-09-07 Thread James Stroud
n birthday-SS#-ID triplet. If you lied, they repeat until they verify your algorithm. This has historically been a very successful attack. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.or

Re: Question about consistency in python language

2005-09-08 Thread James Stroud
This is the difference between mutable and immutable types. In this sense it is consistent. If you want to do the former in one shot: h = dict(l) Also, you shouldn't use "1", I mean "l", as a variable name. It gets confusing because "l", I mean "1&qu

Re: OOP Newb

2005-09-09 Thread James Stroud
Work through the appropriate chapters of this free book: http://www.ibiblio.org/obp/thinkCSpy/ "How to Think Like a Computer Scientist" James On Friday 09 September 2005 18:47, MilkmanDan wrote: > I've been learning python for a while. It's awesome. My problem is >

Re: encryption with python

2005-09-10 Thread James Stroud
y perfect security. I hereby place this algorithm in the public domain. Use it freely. 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: encryption with python

2005-09-10 Thread James Stroud
considerations of the OP's original query: import sha def encrypt(x,y, password): def _dosha(v): return sha.new(str(v)+str(password)).hexdigest() return int(_dosha(_dosha(x)+_dosha(y))[5:13],16) So now what is the criticism? That its still a "secret algorithm" bec

Re: encryption with python

2005-09-10 Thread James Stroud
is a little beyond me. 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

p2exe using wine/cxoffice

2005-09-13 Thread James Stroud
quot;C:\Python23\lib\site-packages\py2exe\build_exe.py", line 768, in find_dependend_dlls alldlls, warnings = bin_depends(loadpath, images, dll_excludes) File "C:\Python23\lib\site-packages\py2exe\build_exe.py", line 1086, in bin_depends for result in py2exe_util.depends(im

Re: p2exe using wine/cxoffice

2005-09-15 Thread James Stroud
to make my software available to windoze users--despite their unfortunate ignorance, they are people too. That's what I always say. On Thursday 15 September 2005 00:59, Tim Roberts wrote: > James Stroud <[EMAIL PROTECTED]> wrote: > >My department has switched from vmware to wine/cxof

Re: My First Python Script

2005-09-15 Thread James Stroud
Try the % operator with strings. For instance: "%03.d" % 5 py> "%03.d" % 5 '005' This operator, from what I have experienced, has the same properties as the unix printf. In python, I think its called "string formatting". James On Thursday 15 Septe

Question About Logic In Python

2005-09-18 Thread James H.
here anything I should be aware of given Python's different approach? Namely any pitfalls or neat tricks that make the Python approach cool or save my butt. Thank you! James -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Encryption for Python Client/Server

2005-09-19 Thread James Stroud
ate > network/connection between several scripts on different machines, to > communicate instructions/data/files etc. to each other over the net. Is SSL > the best method? Any recommendations of something to get started with? > Thanks in advance. -- James Stroud UCLA-DOE Institute for Genomics

Re: p2exe using wine/cxoffice

2005-09-19 Thread James Stroud
On Saturday 17 September 2005 10:29, Tim Roberts wrote: > James Stroud <[EMAIL PROTECTED]> wrote: > >I think the motivation is to ween people off of M$ products altogether, > > Well, CrossOver Office doesn't really do that. You're still running > Microsoft Offi

Re: Getting tired with py2exe

2005-09-20 Thread James Stroud
ler That's one short "indefinitely": Not Found The requested URL /pyinstaller was not found on this server. Apache/2.0.53 (Fedora) Server at pyinstaller.hpcf.upr.edu Port 80 James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http:/

Re: Object default value

2005-09-20 Thread James Stroud
e same object False But I don't think assignment overloading is allowed in python: py> athing = Thing() py> print athing # having overloaded __str__() 5 py> bob = athing py> type(bob) # will not be an int ==> python language constraint James On Tuesday 20 September

Re: Object default value

2005-09-20 Thread James Stroud
d to call vary=myobj.y. Something like that exists for > com objects/VB, for instance an excel range object uses value as the > default attribute, so that you can write > > set rng=range(...); > x=rng > y=rng.value > 'x==y > z=rng.attributeXYZ -- James Stroud UCLA-DOE Ins

Re: Object default value

2005-09-21 Thread James Stroud
elif (anattr == 'old'): try: return self[-2] except IndexError: raise NameError, "No old value yet" else: list.__getattr__(self, anattr) def __iter__(self): return list.__iter__(self[::-1]) def __int__(self): ret

Access function defaults

2005-02-15 Thread James Stroud
ant to do that?" responses. I am just curious about python functions here. Thanks in advance for any insight. James -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternative to standard C "for"

2005-02-17 Thread James Stroud
ved with a generator function - xrange(). It is completely equal to > range() except that it returns a generator instead of a list. It seems I need constructs like this all of the time i = 0 while i < len(somelist): if oughta_pop_it(somelist[i]): somelist.pop(i) else:

Re: intersection of 2 list of pairs

2005-02-20 Thread James Stroud
Set() > for e in E1: > S1.add((e[0],e[1])) > S1.add((e[1],e[0])) > for e in E2: > S2.add((e[0],e[1])) > S2.add((e[1],e[0])) > S= S1 & S2 > SS=Set() > done=Set() > > for

Re: NOOB coding help....

2005-02-21 Thread James Stroud
) > print 'The Mean average is:', mean > print 'The Median is:', meadian > print 'The Mode is:', mode > > I am attempting to make it so that I can save the mean, meadian, and mode > and then if the user wants the data to give it to him. Thank you for any > assistance you can provide! > > Wade -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

Re: Shift Confusion

2005-02-24 Thread James Kew
vely arrive at this conclusion: one 7-bit char takes 0...127, which when you put it into an 8-bit byte leaves 128...255 unused for a second char James -- http://mail.python.org/mailman/listinfo/python-list

Re: TKinter

2005-02-27 Thread James Stroud
I thought the T was silent. On Sunday 27 February 2005 08:34 am, anthonyberet wrote: > So, is it pronounced 'Tee-Kinter', or 'Tee-Kay-Inter'? > I don't want to appear as a dork down the pub. -- http://mail.python.org/mailman/listinfo/python-list

Scoping issue with import

2005-02-28 Thread James Stroud
NameError: global name 'myfun' is not defined How to rectify this with minimal code change? How to let imported modules know about the namespace they are getting imported into? I do not want to restructure my code right now. Thanks in advance for help. James -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expressions: large amount of or's

2005-03-01 Thread James Stroud
the words, you may just want to use the string count method: myoccurrences = [some_string.count(aword) for aword in mywordlist] This may make more sense if you are not using true regexes. James On Tuesday 01 March 2005 11:46 am, André Søreng wrote: > Hi! > > Given a string,

Re: How would you program this?

2005-03-02 Thread James Stroud
like there will be more than one solution (if I remember my 8th grade algebra--its beginning to get very foggy). Given a proper set of linear equations, I think numarray and scientific python have very convenient tools for this. An introductory linear algebra book can provide everything you need t

Re: Need direction to kill a virus

2005-03-02 Thread James Stroud
system. Sorry for the brutally honest and yet ultimately helpful answer. If it angers you as it does some, well, then you may actually deserve what you get. James (Living M$ free for 7 years and never been happier.) On Tuesday 01 March 2005 12:16 am, Anthra Norell wrote: > Hi

Re: py2exe

2005-03-03 Thread James Stroud
; page: <http://www.catb.org/~esr/faqs/smart-questions.html> Then post. Welcome to the python community. We look forward to interacting with you. James On Thursday 03 March 2005 09:59 am, [EMAIL PROTECTED] wrote: > I'm a newbie at programmin. I've downloaded

Re: Multiline regex help

2005-03-03 Thread James Stroud
Have a look at "martel", part of biopython. The world of bioinformatics is filled with files with structure like this. http://www.biopython.org/docs/api/public/Martel-module.html James On Thursday 03 March 2005 12:03 pm, Yatima wrote: > On Thu, 03 Mar 2005 09:54:02 -0700, S

Re: Multiline regex help

2005-03-03 Thread James Stroud
I found the original paper for Martel: http://www.dalkescientific.com/Martel/ipc9/ On Thursday 03 March 2005 12:26 pm, James Stroud wrote: > Have a look at "martel", part of biopython. The world of bioinformatics is > filled with files with structure like this. > > http://

Re: Suspicious header

2005-03-04 Thread James Stroud
the proper email client you can have identities and such that have "from" and "return addresses" that are completely unrelated to the mail server you are using, if you would rather the mail list did not know about your most favored address. James On Friday 04 March 2005

Re: using python to parse md5sum list

2005-03-05 Thread James Stroud
lines(): md5sums.append(aline[:-1].split(" ",1)) myfile.close() The md5 sum will be in the 0 element of each tuple in the md5sums list, and the path to the file will be in the 1 element. James On Saturday 05 March 2005 07:54 pm, Ben Rf wrote: > Hi > > I'm new to progra

Re: running a C program with python script

2005-03-08 Thread James Stroud
script > > thanks > m.smadi -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

Re: running programs from within python

2005-03-09 Thread James Stroud
;> > >> NameError: global name 'os' is not defined > >> > >> however i dont get the same error when running from the python CLI. > >> (and yes i am importing the os module) > > > > Can you give the full exception message (i.e. copy-paste i

Re: An Odd Little Script

2005-03-09 Thread James Stroud
TECTED] > NovaSys Health > Little Rock, Arkansas > > "We are the music makers, and we are the dreamers of dreams." W.W. -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

Re: FW: list reduction

2005-03-10 Thread James Stroud
think I need to use filter and lambda but > > i've looked in the documentation > > and I haven't been able to figure out > > how to use it. > > > > Apologies if this is a bad question. > > > > Thanks -- Jame

Iterate using tuple as index

2005-03-10 Thread James Stroud
like this: for list1_item, list2_item in (some_kind_of_expression): do_something(list1_item, list2_item) Practically, I'm not so sure B is better than A, but the second would be a little more aesthetic, to me, at least. Any thoughts on what "some_kind_of_expression" would be? J

Re: Iterate using tuple as index

2005-03-10 Thread James Stroud
Thank you everyone for pointing me to "zip". Very Handy! James -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

Re: looking up dictionaries by values

2005-03-10 Thread James Stroud
gt; 201, I need to say the key is really susan. > > Is there a way to do this that does not traverse the entire dictionary > multiple times? > > Thanks. -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

Re: Help Installing Python 2.3.5

2005-03-11 Thread James Stroud
about enthought. I don't use windows except when I have to, so there may be something wrong with my suggestion. James On Friday 11 March 2005 11:17 am, Greg Lindstrom wrote: > I've been running python for years and have never had trouble installing > until today. I am trying t

Re: novice question

2005-03-11 Thread James Stroud
oop through > > the grp dictionary and reduce the lists > > so that each only contains unique elements ? > > > > thanks -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python becoming less Lisp-like

2005-03-15 Thread James Graves
d up with a language just as big as CL, but without the most fundamental building blocks. Ah well, to each his own. My Road to Lisp was long and twisty. For a while it covered some Python territory. But I started look into where exactly the interesting bits of Python came from. And here I am. Though I've still got a lot to learn. James Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-15 Thread James Stroud
bit ugly, but we learn to > overlook the occasional cosmetic blemishes of those we love :-) The answer is obvious, the naked comma should be an empty tuple. -- James Stroud, Ph.D. UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 -- http://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8   9   10   11   12   >