Re: Convert to binary and convert back to strings

2007-02-23 Thread Eric Pederson
Harlin Seritt wrote: >Hi... > >I would like to take a string like 'supercalifragilisticexpialidocius' >and write it to a file in binary forms -- this way a user cannot read >the string in case they were try to open in something like ascii text >editor. I'd also like to be able to read the binary f

Re: Why does Python never add itself to the Windows path?

2006-12-30 Thread Eric Pederson
Ben Sizer wrote: >I've installed several different versions of Python across several >different versions of MS Windows, and not a single time was the Python >directory or the Scripts subdirectory added to the PATH environment >variable. Every time, I've had to go through and add this by hand, to >

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread Eric Pederson
rich murphy wrote: >So, I assumed "the current directory" is C:\Python25 which did not >work. Then I placed the fibo.py file in C: director. That did not work >either. What directory does it mean then? > OK, forgive me for using 2.4... Can you import "sys"? Assuming you've got python_script.py

Re: merits of Lisp vs Python

2006-12-09 Thread Eric Pederson
> > "No programmer who learned Lisp ever gave up before he learned Lisp."That > > would be the obvious retort, but my observation was empirical, so I > am afraid you need numbers, not word games. > > You seem awfully hostile, by the way. Won't that make it harder to > conduct an intelligent excha

Re: OT: What encoding is this?

2006-09-09 Thread Eric Pederson
[EMAIL PROTECTED] wrote: >Way off-topic for Python, but can someone tell me what encoding was used in >this web page: > >http://www.loppen.dk/side.php?navn=getin > >I'm guessing ISO-8859-15, but the page doesn't indicate and it's none of the >ones available in Safari. > >Thanks, > >Skip > >

Python -- (just) a successful experiment?

2005-08-07 Thread Eric Pederson
Raise your hand if you think the best technology wins! For those of you with your hands in the air, tell me: if Python is so good, why has PHP achieved such greater adoption and mindshare? Why do web scripters still cling to their Perl, even in corporate environments? Why hasn't Python made

Re: is this pythonic?

2005-07-23 Thread Eric Pederson
"Caleb Hattingh" <[EMAIL PROTECTED]> wrote: >In another > newsgroup, I could have been flamed for letting Simon know he helped > more > than just the OP with his post :) +1 OP asks, thousands are educated (perhaps). The group's generosity is greatly appreciated, even if that appreciation

Re: Just remember that Python is sexy

2005-05-30 Thread Eric Pederson
get) I recommend this be adopted as a naming standard for Python methods: "The method name should have a sexy connotation" Eric Pederson http://www.songzilla.blogspot.com ::: domainNot="@something.com" domainIs=domainNot.replac

Best way to make a list unique?

2005-03-08 Thread Eric Pederson
I have >>> listA=[1,2,3,4,5,4,3,4,3,2,1] and I want a list of only the unique members. This seems inefficient, but works fine over my small sample lists: >>> listA=[a for a in set(listA)] Is there a more efficient approach for cases where listA is large?

Re: Impersonating other broswers...

2005-03-05 Thread Eric Pederson
la/5.0 (Songzilla MP3 Blog, http://songzilla.blogspot.com) Gecko/20041107 Firefox/1.0" And you'll get to decide whether to shut them out or not, but at least it won't seem like the black hats are attacking. Eric Pederson http://www.songzilla.blogspot.com :::

Re: exercise: partition a list by equivalence

2005-02-20 Thread Eric Pederson
> From: "Xah Lee" <[EMAIL PROTECTED]> > > The GOTO statement from Perl has been messed up. hey, I didn't do it! > > This block: > Âfor group in interm: what do the funny little "Â"s stand for?

Re: variable declaration

2005-02-08 Thread Eric Pederson
what's one more compromise to get popular?! (I shudder thinking where that slippery slope leads) [Nothing above is meant to imply I haven't done stupid things; rather perhaps that I've already done more than enough to know better; and, by the way, I'm still not "popular&

Re: variable declaration

2005-02-01 Thread Eric Pederson
om. """ http://groups-beta.google.com/group/comp.lang.python/messages/178fef06830cc779?thread_id=a75da70b0845b6fe&mode=thread&noheader=1#doc_178fef06830cc779 [Go PyPy!] Eric Pederson http://www.songzilla.blogspot.com ::: domainNot="

Re: The next Xah-lee post contest

2005-01-30 Thread Eric Pederson
> From: Arthur <[EMAIL PROTECTED]> > Not sure how Xah got himself into all this. One can easily see that Java programmers are geeks who secretly wanted to make the football team and are now trying to conform, ignoring their language's critical lack of Prolog syntax. Python coders, similarly

Re: File objects? - under the hood question

2005-01-20 Thread Eric Pederson
;)[:-128]) >>> song453.tags=IDV2.read() >>> len(song453.tags) 128 But it's not a Python problem. :-( Thanks for the responses and indulgence. I'm OK now - the repair man fixed the coffee pot. Eric Pederson http://www.songzilla.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

File objects? - under the hood question

2005-01-18 Thread Eric Pederson
ests of the OS... My brain-teaser: What I'd like to do is read the last ~2K of a large number of large files on arbitrary servers across the net, without having to read each file from the beginning (which would be slow and resource inefficient)... Eric Pederson http://www.songzi

Re: OT: MoinMoin and Mediawiki?

2005-01-10 Thread Eric Pederson
ou're going to migrate between the two, won't Python come in handy! ;-) Eric Pederson http://www.songzilla.blogspot.com ::: domainNot="@something.com" domainIs=domainNot.replace("s","z") ePrefix="".join([chr(ord(

Re: The Industry choice

2005-01-04 Thread Eric Pederson
gain shared advantage as part of a massive object, or (1) choose an alternate "location" far enough away not to be much affected by the force of the massive objects, and try to build "mass" there. I suspect Python is a (1) in that regard, but I may be wrong. Gravity as

Re: The Industry choice

2005-01-02 Thread Eric Pederson
the use of (for example) Python would seem very in tune with those goals. It might be nice if it was widely understood (in IT) that Python was a language any competent programmer could pick up in an afternoon, such that Java, C, and Perl shops would not be concerned about the need for their staff

Re: lies about OOP

2005-01-01 Thread Eric Pederson
evil of "top down > programming" was on the land. But by '86, the Joy of OOP was widely > known. > Flowers bloomed and birds chirped. Pant legs narrowed. You had to go there. You had to put down my brother, the bell bottom. Next thing one knows you'll be maligning

Re: PHP vs. Python

2004-12-22 Thread Eric Pederson
en someone points out the folly of the code or table set-up. Not sure if the OP is considering Python v.s. PHP on the server or on the desktop (PHP isn't web only, except by common use); they are very different use cases. Eric Pederson http://www.songzilla.blogspot.com :::

Re: NO REALLY

2004-12-15 Thread Eric Pederson
> "Jive" <[EMAIL PROTECTED]> taunted: > > > Subject: NO REALLY > > > > Isn't there a comp.lang.flame or something? > Oh, my, don't you have BIG CAPS! Someone should wash them, thoroughly! Why don't you come up to my room, big boy. -DIRK [is that flaming enough?] -- http://mail.python.or

Re: Python mascot proposal

2004-12-13 Thread Eric Pederson
ts a level or two easier mental association than MP. Logo? Maybe a Norweigian Blue on is back, one fut in e air, wit a snake ead off to is ide, grinningly wit a char-grin? es not dead! Eric Pederson ::: domainNot="@something.com" domainIs=domainNot

Re: PajamaScript

2004-12-05 Thread Eric Pederson
of processing might make it a little slow. Ought to be other uses too... I _do_ think the tags and the title "PajamaScript" is brilliant marketing. Highest kudos! ["PajamaScript" beats "PyTxtParse2ModuleExecEnviron.py" !] Any functioning examples of its u

Re: How did you learn Python?

2004-12-03 Thread Eric Pederson
me of the materials on the Python.org site, by Guido et. al. Introductions: http://python.org/doc/Intros.html Topic specific: http://python.org/topics/ FAQs: http://python.org/doc/faq/general.html Have fun! Eric Pederson ::: domainNot="@something.com" doma