[issue37847] The IDLE does not show previous code suggestions if I tap on the up arrow

2019-08-13 Thread Edwin Pratt
New submission from Edwin Pratt : If I am typing some Python code in the IDLE, for example a function: def sayHi(name): print('Hello ', name) and I execute the function: sayHi('Ed') I can not edit the function or execute a previous line of code again if I tap the up arrow on my

[issue8880] ConfigParser.set does not convert non-string values

2010-06-03 Thread Edwin Pozharski
Edwin Pozharski pozhar...@gmail.com added the comment: Thanks - gotta rtfm :) On Wed, Jun 2, 2010 at 5:33 PM, R. David Murray rep...@bugs.python.orgwrote: R. David Murray rdmur...@bitdance.com added the comment: Use SafeConfigParser instead, then you can't make the mistake of passing non

[issue8880] ConfigParser.set does not convert non-string values

2010-06-02 Thread Edwin Pozharski
New submission from Edwin Pozharski pozhar...@gmail.com: set() method of ConfigParser accepts boolean True/False as values at runtime without converting them to strings internally. As a result, getboolean() method reports the following error File /usr/lib/python2.6/ConfigParser.py, line

Re: Programming exercises/challenges

2008-12-08 Thread Edwin
On Nov 22, 2:15 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: I'm only a very occasional user of vi, so I don't really know how vim integrates with MacOS X but have you tried aquamacs (http://aquamacs.org/)? -- Arnaud I've tried it but I ended up using original (I'm sure there's a better

Re: Programming exercises/challenges

2008-11-21 Thread Edwin
On Nov 20, 10:32 pm, [EMAIL PROTECTED] wrote:     I am constantly amazed at work that people open a separate emacs for     each file they want to edit.  Most of them seem not to even know that     find-file exists.     Edwin Come on mate... it's already a bit hard to post in a non-native

Re: Programming exercises/challenges

2008-11-20 Thread Edwin
On Nov 20, 12:39 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: Edwin [EMAIL PROTECTED] writes: [...] a diary manager compatible with my Emacs diary file (sometimes I don't want to open Emacs for a quick note) You mean that you sometimes don't have emacs open? -- Arnaud heh... I

Re: Programming exercises/challenges

2008-11-20 Thread Edwin
On Nov 20, 6:28 am, [EMAIL PROTECTED] wrote:     a diary manager compatible with my Emacs diary file (sometimes I     don't want to open Emacs for a quick note)     Arnaud You mean that you sometimes don't have emacs open? I am constantly amazed at work that people open a separate emacs

Re: Programming exercises/challenges

2008-11-19 Thread Edwin
On Nov 18, 6:39 pm, [EMAIL PROTECTED] wrote: Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing challenges/programs to reinforce the material and improve my

Re: Snippets management

2008-11-11 Thread Edwin
On Nov 10, 3:14 pm, Stef Mientki [EMAIL PROTECTED] wrote: expora wrote: On Nov 6, 12:38 pm, Stef Mientki [EMAIL PROTECTED] wrote: Edwin wrote: Hi there, I've been looking for a snippet manager and found PySnippet but it requires PyGTK. Do you know any other option that doesn't need

Re: Snippets management

2008-11-07 Thread Edwin
On Nov 7, 6:36 pm, Ricardo Aráoz [EMAIL PROTECTED] wrote: Since you are in Linux you should definitely check Basket. Go to it's website and you'll be hooked, just what you need. Actually I use Mac OS and Free BSD but I'll check it out mate. Thanks for the tip!! --

Re: Snippets management

2008-11-07 Thread Edwin
On Nov 7, 5:38 pm, Stef Mientki [EMAIL PROTECTED] wrote: I've to extract the right libs from the larger program, as I'm in an import crisis right now, it may take a couple of days. If it's not here by the end of next week, mail be directly, because I forget a lot :-) cheers, Stef

Re: Snippets management

2008-11-06 Thread Edwin
Robert Lehmann [EMAIL PROTECTED] writes: On Wed, 05 Nov 2008 19:55:51 -0600, Edwin wrote: Hi there, I've been looking for a snippet manager and found PySnippet but it requires PyGTK. Do you know any other option that doesn't need much? [snip] If you're looking for a snippet manager

Re: Snippets management

2008-11-06 Thread Edwin B.
Robert Lehmann [EMAIL PROTECTED] writes: I don't think there is a one-size-fits-all solution. I definetly agree. Setting up a 'snippets' repository sounds good if you just want to be able to look back at what you've done and/or have a place to stash away quick tests. I have set up a

Snippets management

2008-11-05 Thread Edwin
Hi there, I've been looking for a snippet manager and found PySnippet but it requires PyGTK. Do you know any other option that doesn't need much? I'm sort of new to python and user interfaces seem a bit far for me right now, that's why I thought having to install PyGTK was unnecessary. Would

Re: Snippets management

2008-11-05 Thread Edwin B.
r [EMAIL PROTECTED] writes: On Nov 5, 7:55 pm, [EMAIL PROTECTED] (Edwin) wrote: Hi there, I've been looking for a snippet manager and found PySnippet but it requires PyGTK. Do you know any other option that doesn't need much? I'm sort of new to python and user interfaces seem a bit far

Re: cx_oracle and commands

2008-09-05 Thread Edwin . Madari
then spawn commands to process them... Thanks, There is no mode parameter to connect. use try-catch around db = connect(mode=SYSDBA) line to see what's going on. Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject

Re: urllib fails to connect

2008-08-20 Thread Edwin . Madari
= urllib2.Request(url, form, headers) fd = urllib2.urlopen(req) print fd.code, fd.info(), fd.read() regards Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure

Re: who to call a list of method inside the class itself

2008-08-19 Thread Edwin . Madari
() #execute method now regards. Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient

Re: who to call a list of method inside the class itself

2008-08-19 Thread Edwin . Madari
(): method = gettattr(self,method_name) method() #execute method now why? ensure instance's method invocation with all state information to that point, rather than relying on implemenation. regards. Edwin The information contained in this message and any

Re: Python does not get environment variable when using cron.

2008-08-18 Thread Edwin . Madari
source in or execute .profile (or .bash_profile which ever is applicable to you) as a first thing in the cron to get environment variables. hope that helps. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wertman Sent: Sunday, August 17, 2008

Re: Vmware api

2008-08-18 Thread Edwin . Madari
do the ESX server provide any api's or an interactive session may ? thx. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wertman Sent: Sunday, August 17, 2008 2:43 PM To: python-list@python.org Subject: Re: Vmware api I would also

Re: How to delete a line with re?

2008-08-18 Thread Edwin . Madari
running this snippet, is blanking out ^abdc$.. what is the issue ? abcd efg hijk lmn $ efg hijk lmn regards Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peng Yu Sent: Sunday, August 17, 2008 11:47 PM To: python-list@python.org Subject: How

Re: Newbie problem inserting into MySQL

2008-08-18 Thread Edwin . Madari
-list statement prepared first and executed many times with exectemany - db API http://www.python.org/dev/peps/pep-0249/ inline statemets can be exeucuted only. hope that helps Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged

Re: Newbie problem inserting into MySQL

2008-08-18 Thread Edwin . Madari
-Original Message- From: Madari, Edwin Sent: Monday, August 18, 2008 3:03 PM To: 'len'; python-list@python.org Subject: Re: Newbie problem inserting into MySQL -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ython.org

any success in compiling mod_python3.3 on cygwin for apache2.2

2008-08-16 Thread Edwin . Madari
has any one out there succeeded in compiling/installing mod_python for apache2 and python 2.5. I am using python 2.5 on cygwin. thanks in advance Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work

RE: Formatting input text file

2008-08-14 Thread Edwin . Madari
) for i in data: print ' '.join(i) = good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 14, 2008 7:07 AM To: python-list@python.org Subject: Formatting input text file

RE: Fixed-length text file to database script

2008-08-14 Thread Edwin . Madari
='tst') cursor = con.cursor() sql = 'select * from YOUR_TABLE' cursor.execute(sql) results = cursor.fetch() con.close() = hope that helps. good luck Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Diez

RE: a question about mysqldb

2008-08-14 Thread Edwin . Madari
replace the name of table before calling *.execute. s.dbptr.execute(str % (e[0])) good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evan Sent: Thursday, August 14, 2008 11:27 AM To: python-list@python.org Subject: a question about mysqldb

RE: a question about mysqldb

2008-08-14 Thread Edwin . Madari
where tID=:1' # note the comma in argument tuple to execute (1,) thanks Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wertman Sent: Thursday, August 14, 2008 2:13 PM To: python-list@python.org Subject: Re: a question about mysqldb I also

RE: Fixed-length text file to database script

2008-08-14 Thread Edwin . Madari
: ('1234567890123456', '7890', '12345678', '90123456', '78901234') hope it helps. thanks Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wertman Sent: Thursday, August 14, 2008 1:59 PM To: python-list@python.org Subject: Re: Fixed-length text file to database

RE: threading

2008-08-14 Thread Edwin . Madari
is fine and go back to napping. if something is fishy - go catch it. hope that helps. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rhamphoryncus Sent: Thursday, August 14, 2008 2:52 PM To: python-list@python.org Subject: Re: threading On Aug

RE: urldecode function?

2008-08-14 Thread Edwin . Madari
for those keys given more than once as with 'start' key {'start': ['1827', '1234'], 'anotherCat': ['me=ow~'], 'by': ['down'], 'Cat': ['1']} hope that helps.. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Thursday, August

RE: SOAPpy and ArrayOfString

2008-08-14 Thread Edwin . Madari
may be accepting only up to a certain number of elements in the array. And check the data type for elements in the array. of course I had to tweak a couple of SOAPpy modules to accept long data type, and work from behind a firewall. hope that helps... thanks Edwin -Original Message

RE: updating dictionaries from/to dictionaries

2008-08-14 Thread Edwin . Madari
. thanks Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brandon Sent: Thursday, August 14, 2008 8:35 PM To: python-list@python.org Subject: Re: updating dictionaries from/to dictionaries (1) iterating over foo: for key in foo: foo[key] += bar.get

RE: updating dictionaries from/to dictionaries

2008-08-14 Thread Edwin . Madari
by the way, iterating over bar will throw KeyError if that key does not exist in foo. to see that in action, simply set another key in bar after copy.deepcopy stmt in this example.. bar['xtra'] = 0 and re-run fun learning with python... Edwin -Original Message- From: Madari, Edwin

RE: Random Problems

2008-08-13 Thread Edwin . Madari
use songs.extend( asongs ) #append is for single item - where ever it might be. l1 = range(5) l2 = range(5,10) l1 [0, 1, 2, 3, 4] l2 [5, 6, 7, 8, 9] l1.extend(l2) l1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto

Re: Checking a file's time stamp.

2008-08-12 Thread Edwin . Madari
os.paht.gmtime(path) returns the last modification of path. check out http://docs.python.org/lib/module-os.path.html regards Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of William Purcell Sent: Tuesday, August 12, 2008 1:47 PM To: Python List Subject

Re: SSH utility

2008-08-11 Thread Edwin . Madari
, c.after ('exit\r\nexit\r\n', class 'pexpect.EOF') exit() [EMAIL PROTECTED]:~ $ --- hope that helps. regards. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Brady Sent: Monday, August

Re: for x,y in word1, word2 ?

2008-08-11 Thread Edwin . Madari
sounds like *soundex* is what you are looking for. google soundex regards Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc 'BlackJack' Rintsch Sent: Monday, August 11, 2008 3:09 AM To: python-list@python.org Subject: Re: for x,y in word1

RE: regular expression extracting groups

2008-08-10 Thread Edwin . Madari
=another val=['42'] with another dictionary of keys to be processed with a function to process values for that key, its a matter of iterating over keys.. hope that simplifies and helps.. thx Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL

RE: Extract string from log file

2008-08-09 Thread Edwin . Madari
Windows XP+insecure;Microsoft Windows XP Professional+f;26027;26447;26003;22452;} r=0.9496 good luck Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Saturday, August 09, 2008 10:48 AM To: python-list@python.org Subject: Extract

RE: shelve save object

2008-08-09 Thread Edwin . Madari
and retrieval from many os-es good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hypermonkey2 Sent: Saturday, August 09, 2008 3:33 PM To: python-list@python.org Subject: shelve save object Hi there! I am using the shelve module in a script

RE: How to round a floating point to nearest 10?

2008-08-09 Thread Edwin . Madari
digits (default 0 digits). This always returns a floating point number. Precision may be negative. good luck.. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Machin Sent: Saturday, August 09, 2008 5:54 PM To: python-list@python.org Subject: Re

RE: sending to an xterm

2008-08-08 Thread Edwin . Madari
is the action that matched 3. if prompt matched, the 'before' has the results 4. even the command 'ls' with '\r\n' will be in the results. actual session-- [EMAIL PROTECTED]:/c/Edwin/Projects/expect $ python Python 2.5.1 (r251:54863, May 18 2007, 16:56:43) [GCC 3.4.4

RE: Testing for the first few letters of a string

2008-08-07 Thread Edwin . Madari
use re module import re template = '^My name is alex' astring = 'My name is alex, and I like pie' if re.match(template, astring): print 'Found it' else: print '%s does not begin with %s' % (astring, template) good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto

RE: very newbie question

2008-08-07 Thread Edwin . Madari
delete the extra 'tries += 1' after else: print Higher... tries += 1 #delete this while at it, and add this line as the first line in function ask_number() global the_number, tries good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto

soap call through firewall

2008-08-06 Thread Edwin . Madari
hi, any hints/pointers appreciated if you have succeeded in making a soap call through a firewall. other than this http://www.ibm.com/developerworks/xml/library/x-tipfire.html cannot find much. thanks in advance Edwin The information contained in this message and any attachment may

SOAPpy how to

2008-08-06 Thread Edwin . Madari
') a = server.aTestMethod( arg1, arg2, ) print a any suggestions or hints any one.. thanks in advance Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from

python equivalent for this perl soap client

2008-08-06 Thread Edwin . Madari
SOAPpy import WSDL server = WSDL.Proxy('./local_file_copy_of_wsdl.wsdl') res = server.soapMethod(method, args, as, required) tried every which way but cannot get it to work. any hints, suggestions appreciated. thanks in advance Edwin The information contained in this message and any attachment

Re: Using an DTD not specified in XML file for validation

2008-08-06 Thread Edwin . Madari
can you edit the xml and add the dtd/scheama ? .Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Finney Sent: Wednesday, August 06, 2008 7:07 PM To: python-list@python.org Subject: Re: Using an DTD not specified in XML file for validation

RE: A question about string and float number

2008-08-06 Thread Edwin . Madari
type(s) == type(float()) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Wei Guo Sent: Wednesday, August 06, 2008 9:23 PM To: python-list@python.org Subject: A question about string and float number Hi all, I am new of python. Could anyone help me a

RE: A question about string and float number

2008-08-06 Thread Edwin . Madari
#this is a better way of testing a string for float def isFloat(s): try: s = float(s) except: return False return True -Original Message- From: Madari, Edwin Sent: Wednesday, August 06, 2008 10:22 PM To: 'Wei Guo'; python-list@python.org Subject: RE

Re: xlrd

2008-08-04 Thread Edwin . Madari
here is working code that will read display contents of all rows columns in all the sheets, you need xlrd 0.6.1 import xlrd, os, sys book = xlrd.open_workbook(sys.argv[1]) print The number of worksheets is, book.nsheets for shx in range(book.nsheets): sh = book.sheet_by_index(shx)

Re: UnicodeDecodeError, how to elegantly deal with this?

2008-08-04 Thread Edwin . Madari
if you can print out values of 'filemask', and 'thefile' variables, when it crashes, I can help. thx. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorgen Bodde Sent: Monday, August 04, 2008 2:24 PM To: python-list@python.org Subject

RE: Decimals not equalling themselves (e.g. 0.2 = 0.2000000001)

2008-08-03 Thread Edwin . Madari
. for example a = .2 b = .4 b = b/2 a == b True a, b (0.20001, 0.20001) '%.2f' % a, '%.2f' % b ('0.20', '0.20') thx. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of CNiall Sent: Sunday, August 03, 2008 10:03 AM To: python-list

RE: Continually check object status

2008-08-02 Thread Edwin . Madari
updated creature running in its own thread will get you started. try it for yourself, change sleep times per your need. import os, sys, threading, time class Creature: def __init__(self, status): self.status = status self.state = 'run' def start(self): self.athread =

building python from source on HP

2007-05-07 Thread Edwin . Madari
. not sure if output from configure and make would make a difference. If so I can send them. thanks in advance Edwin The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure

Calling a thread asynchronously with a callback

2006-11-27 Thread Edwin Gomez
I'm a C# developer and I'm new to Python. I would like to know if the concept of Asynchronous call-backs exists in Python. Basically what I mean is that I dispatch a thread and when the thread completes it invokes a method from the calling thread. Sort event driven concept with threads.

Re: Python-list Digest, Vol 38, Issue 390

2006-11-27 Thread Edwin Gomez
Regarding Topic number 3: 3. Calling a thread asynchronously with a callback (Edwin Gomez): Thanks Bjorn for you quick answer and by the way, that works. Diez, in answer to your question regarding async callbacks in C#; C# runs in a multi threaded apartments. Many times we'll setup listener

pexpect problem, spawn says I/O on closed file

2005-04-15 Thread edwin
Hi, I'm using pexpect in a plugin script within bartbot (an python based irc bot). When I execute the plugin, python comes back with: ERROR exceptions.ValueError file: /home/edwin/devel/bartbot/myplugins/rttest.py linenr: 17 msg: I/O \ operation on closed file rttest.py being the plugin script