[Tutor] OT: just venting

2010-08-23 Thread Justin Ezequiel
when some IS/IT--Management guy asks about " Eval() or compile on fly with object" and you try to talk him out of that bad idea, he replies, "...it's much more easier, but that's not the way i want it" LOL. typical management. ___ Tutor maillist - Tuto

Re: [Tutor] Schema change in ElementTree

2010-08-16 Thread Justin Ezequiel
> Note that it's best to hit "reply" when responding to other people's > postings. That way, mail readers can see the relation between the original > posting and the reply and sort the reply into the right thread. > > Stefan how's this? btw, I am getting daily(?) digests of the posts via E-mail an

Re: [Tutor] Passing parameters in dictionary values?

2009-02-24 Thread Justin Ezequiel
From: nathan virgil > selection = raw_input("Choice: ") > choices = {"0":quit, "1":crit.talk, "2":crit.eat, "3":crit.play} > choice = choices[selection] > choice() > > ...so that I can call methods from a dictionary > the problem I'm running into with this is that > I can't pass any perimeters thr

Re: [Tutor] Find a Word in *.py (Win XP)

2009-01-28 Thread Justin Ezequiel
> How insane that XP doesn't search the text in "non text" files! > > -- > Alan Gauld http://support.microsoft.com/default.aspx?scid=KB;EN-US;q309173 I used Method 2 under Resolution recently when I reinstalled XP on a new harddisk. HTH ___ Tutor maill

Re: [Tutor] Handling post request

2009-01-28 Thread Justin Ezequiel
> From: Tiago Katcipis > > I am trying to make a small HTTP server on python just to handle some POST > and GET requests. I never worked with http before and dont know if i am > doing something completely stupid (probably yes). I read anything possible > already and i just cant find how i access t

Re: [Tutor] Putting the Output of Help to a File

2008-02-19 Thread Justin Ezequiel
> From: Wayne Watson <[EMAIL PROTECTED]> > > See Subject. Is it possible? > python -m pydoc sys > sys.txt more < sys.txt ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Group sequence pairwise

2007-02-26 Thread Justin Ezequiel
>>> a = list('asdfg') >>> map(None, a[::2], a[1::2]) [('a', 's'), ('d', 'f'), ('g', None)] >>> a = list('asdfgh') >>> map(None, a[::2], a[1::2]) [('a', 's'), ('d', 'f'), ('g', 'h')] >>> ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailma

Re: [Tutor] Some questions about my yen-USD.py

2006-09-08 Thread Justin Ezequiel
Dick Moores rcblue.com> writes: > So now that I know better, I'm trying to write the beginnings of a > general setPrecision() function using format strings. However, it > appears that a variable cannot be used instead of the ".2" in > > "%.2f" % 2.234234 > How to do this? http://www.python.org/

[Tutor] content disposition header: email module

2006-09-06 Thread Justin Ezequiel
try something like the following (UNTESTED) code: from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from email.Message import Message def attch_send(self): msg = MIMEMultipart() #msg.add_header("From", sender) #msg.add_header("To", recv)

Re: [Tutor] question about headers and smtplib

2006-07-31 Thread Justin Ezequiel
When I first started with Python, I used MimeWriter to create E-mails. Then some mail servers rejected my E-mails. Some research (google) indicated (to me) that I needed a MIME-Version header. (Can't recall now if I also needed a Content-Type header.) Anyway, more research (Python docs) indicate

[Tutor] Library for rtf to text?

2006-07-12 Thread Justin Ezequiel
Bill Campbell wrote: > I'm looking for a python library to convert rtf to plain text > ... > I have found a C program that will convert rtf2html, and I could > use that if necessary, but would prefer a pure python solution. I know I saw something months ago... Have been meaning to look at it but j

Re: [Tutor] MySQLdb: cant get '... where field in %s' to work

2006-06-25 Thread Justin Ezequiel
I wrote: >> ARTICLES = ('XXX9', 'ABZ2') >> TESTARTICLENAME = """SELECT * FROM tblForTransfer2Prodsite >> WHERE articleName IN %r""" % (ARTICLES,) >> SQLARTICLENAME = """SELECT * FROM tblForTransfer2Prodsite >> WHERE articleName IN %s""" >> >> print cur.execute(TESTARTICLENAME), >>

[Tutor] MySQLdb: cant get '... where field in %s' to work for string sequences

2006-06-22 Thread Justin Ezequiel
how can I get 'select ... from ... where field in %s' to work for sequences of strings? sequences of integers works just fine import MySQLdb DBCRED = {'host': 'localhost', 'user': 'userjustin', 'passwd': 'passwdjustin', 'db': 'dbjustin'} ARTICLES = ('XXX9', 'ABZ2') PIDS = (2937

Re: [Tutor] pyExcelerator for Python 2.3

2006-04-20 Thread Justin Ezequiel
> there is a patch submitted there that you can apply to the current > release to make it compatible with >2.4. Thanks lots Poor Yorick. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] pyExcelerator for Python 2.3

2006-04-20 Thread Justin Ezequiel
Does anyone know where I can get pyExcelerator for Python 2.3? I have not yet updated my development machine to 2.4. Thanks in advance. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python programmer needs to learn Java

2006-04-18 Thread Justin Ezequiel
> If you already know a language "Just Java" (now titled "Just Java 2") by > Peter van der Linden is very good. Thanks Terry. Will surely check this out. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python programmer needs to learn Java

2006-04-18 Thread Justin Ezequiel
> The only online resources I recommend for Java are: > 1) Bruce Eckel's Thinking in Java and > 2) The official Sun tutorial > > The only book I've found that I like is: > O'Reilly Learning Java > > The Java in a Nutshell is a useful reference too. > Thanks Alan. Will check these out ASAP. ___

[Tutor] Python programmer needs to learn Java

2006-04-17 Thread Justin Ezequiel
Greetings. I am seeking book recommendations or preferrably online tutorials to help me learn Java. Company under new management and most likely would be moving to Java and .NET I came from Visual Basic 6 to Python and had little problems which is why I love Python.

Re: [Tutor] regular expressions - backslashes

2006-04-06 Thread Justin Ezequiel
Kent wrote: """The problem is that the re engine itself is interpreting the backslashes in the replacement pattern. With a single slash you get a newline even though the slash is a literal in the replacement string: So if you want a literal \ in your replacement text you have to escape the \, ev

[Tutor] regular expressions - backslashes

2006-04-05 Thread Justin Ezequiel
a colleague demonstrated a problem he had with regular expressions >>> apppath = os.path.abspath(os.curdir) >>> apppath 'C:\\napp_and_author_query\\napp_and_author_query\\a b c d' >>> template = r'\files' >>> template '\\files' >>> re.sub(r'(?i)', apppath, template) 'C:\napp_and_author_query\napp_

[Tutor] threaded multipart FTP download

2005-12-28 Thread Justin Ezequiel
Greetings, Did not think I could post my code here as it's a bit long so I placed it in http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/465531 Can some of you have a look and post comments, suggestions, alternatives? Thanks. BTW, the recipe is sufficient for our needs at the moment but