Python Error

2017-01-16 Thread Girish Khasnis
Hi, I am unable to install Python on my system. After installing Python I get the below error when I try to open Python. [image: Inline image 1] Regards Girish -- https://mail.python.org/mailman/listinfo/python-list

Pexpect support with Python3.2.3

2012-04-20 Thread Girish bist
Hi - I am using the pexpect version 2.4 with Python-3.2.3. I have written a small script to verify the pexpect support with Python 3.2.3. This script times out during the system call select execution. Can anyone please help us with the issue here. The same script is working fine with Python 2.7.3

COM ERROR

2010-11-12 Thread Girish
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147024882, 'Not enough storage is available to complete this operation.', None, None) Your help would be appreciated. Thanks, Girish. -- http://mail.python.org/mailman/listinfo/python-list

Access lotus notes using Python 2.5.1

2010-08-11 Thread Girish
is appreciated. Thanks, Girish -- http://mail.python.org/mailman/listinfo/python-list

Change Encoding in Py 2.5

2010-07-23 Thread Girish
Hello, Is ter a way to change default encoding in py 2.5 ? Thanks, Girish.. -- http://mail.python.org/mailman/listinfo/python-list

Unzip File un Python 5.5

2010-07-22 Thread Girish
Hello All, I am using Python 2.5. How do I extract all the files and directories in a zip file? Thanks in advance.. -Girish -- http://mail.python.org/mailman/listinfo/python-list

Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64 and ran into some issues. 1) When I ran the script, I got Error: needed directory /usr/lib/python2.4/config not found 2) Then I yum install python-devel which

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
: On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian giris...@gmail.com wrote: Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64 and ran into some issues. 1) When I ran the script, I got Error

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Will try that. Meanwhile I went ahead and used cx_freeze and that seems to work OK. Thanks for your help Rami and Marc-Andre. On Tue, Nov 3, 2009 at 12:31 PM, Rami Chowdhury rami.chowdh...@gmail.com wrote: On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian giris...@gmail.com wrote

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
this? Thanks. On Tue, Nov 3, 2009 at 11:47 AM, M.-A. Lemburg m...@egenix.com wrote: Girish Venkatasubramanian wrote: Hey Marc-Andre, Ummm - I have installed python-devel.x86_64 and checked that the /usr/lib64/python2.4/ is populated - anything else I can/shuld do to check/ensure

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
3, 2009 at 11:21 AM, Rami Chowdhury rami.chowdh...@gmail.com wrote: On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian giris...@gmail.com wrote: Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64

Python IDE

2009-10-26 Thread Girish
Hello, Which is the best software to create GUI other then Boa. Thanks, Girish. -- http://mail.python.org/mailman/listinfo/python-list

Tree Structure

2009-10-09 Thread Girish
Hello, Is there any python class to display the drive and folder structure as a tree(As you see in the windows explorer window)?? Thanks, Girish.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in reg dll

2009-06-23 Thread Girish
Hi, somehow I fixed the issue related to error code 0xc005. Now I am getting a different error code while registering DLL.. it says: DllRegisrerServer in Dspacvce.dll Failed. Reyurn Code was: 0x80040201 On Jun 20, 8:15 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 16 Jun 2009

Error in reg dll

2009-06-15 Thread Girish
], ) ###END When I try to register the dll using the commant: regsve32 dspace.dll, I am getting error saying :DLLRegisterServer in dspace.dll failed. Return code was: 0xc005 Please help me to solve this issue. Thanks, Girish... -- http

Extract CDATA Node

2009-02-24 Thread Girish
instance of XMLDocument doc = XMLDocument() doc.parseString(open(os.curdir + '\\XML\\1.xml', 'r').read()) . Please help me out. Thanks, Girish -- http://mail.python.org/mailman/listinfo/python-list

XML Parsing

2009-02-24 Thread Girish
, Girish... -- http://mail.python.org/mailman/listinfo/python-list

Re: functions

2008-11-28 Thread Girish
On Nov 28, 1:46 pm, Peter Otten [EMAIL PROTECTED] wrote: Girish wrote: Is ter any way to identify the file name and the path in which the function is called. for example: if the function definition is in the file c:\script1.py and if I call this function in a script: c:\script2.py than

functions

2008-11-27 Thread Girish
Hello, Is ter any way to identify the file name and the path in which the function is called. for example: if the function definition is in the file c:\script1.py and if I call this function in a script: c:\script2.py than in the function definition part(script1.py) some how I need to know that

EXCEL API

2008-07-24 Thread Girish
Hello, Does any one have a sample piece of code to search for a keyword in Excel sheet? if so plz post it.. Thanks, Girish.. -- http://mail.python.org/mailman/listinfo/python-list

String To List

2008-03-17 Thread Girish
I have a string a = ['xyz', 'abc'].. I would like to convert it to a list with elements 'xyz' and 'abc'. Is there any simple solution for this?? Thanks for the help... -- http://mail.python.org/mailman/listinfo/python-list

Embedding objects( txt, doc) into excel using python

2007-05-31 Thread Girish
and Settings\p\My Documents\desk.txt, Link=False,DisplayAsIcon=True, IconFileName=packager.exe, IconIndex=0, IconLabel=C:\Documents and Settings\p\My Documents\desk.txt).Select Can anyone please whtz the problem with the code and how to overcome the same. Thanks Girish S -- http://mail.python.org/mailman

Generating all ordered substrings of a string

2006-07-11 Thread girish
', 'a'], ['ab', 'cd'], ['cd', 'ab'], ['abc', 'd'], ['d', 'abc'], ['b', 'acd'], ['acd', 'b'], ['bc', 'ad'], ['ad', 'bc'], ['bcd', 'a'], ['a', 'bcd'], ['c', 'abd'], ['abd', 'c'], ['cd', 'ab'], ['ab', 'cd'], ['cd', 'ab'], ['ab', 'cd']] Any ideas?? TIA, girish

Re: Generating all ordered substrings of a string

2006-07-11 Thread girish
Quoting Bruno Desthuilliers [EMAIL PROTECTED]: [EMAIL PROTECTED] a écrit : Hi, I want to generate all non-empty substrings of a string of length =2. Also, each substring is to be paired with 'string - substring' part and vice versa. Thus, ['abc'] gives me [['a', 'bc'], ['bc',

Re: How to generate all substrings of a string

2006-07-11 Thread girish
Quoting Bruno Desthuilliers [EMAIL PROTECTED]: [EMAIL PROTECTED] a écrit : Hi, I want to generate all non-empty substrings of a string of length =2. Also, each substring is to be paired with 'string - substring' part and vice versa. Thus, ['abc'] gives me [['a', 'bc'], ['bc',

Re: How to generate all substrings of a string

2006-07-11 Thread girish
Quoting [EMAIL PROTECTED]: Quoting Bruno Desthuilliers [EMAIL PROTECTED]: [EMAIL PROTECTED] a écrit : Hi, I want to generate all non-empty substrings of a string of length =2. Also, each substring is to be paired with 'string - substring' part and vice versa. Thus,

Generating multiple lists from one list

2006-07-05 Thread Girish Sahani
'] Can anyone suggest me a time-efficient method for doing this?? TIA, girish -- http://mail.python.org/mailman/listinfo/python-list

Generating multiple lists from one list

2006-07-05 Thread Girish Sahani
'] Can anyone suggest me a time-efficient method for doing this?? TIA, girish -- http://mail.python.org/mailman/listinfo/python-list

How to measure execution time of a program

2006-06-28 Thread Girish Sahani
Hi all, Can anyone tell me the simplest way to do it (some code snippet that could be included in the program's main function) ?? Thanks, girish -- http://mail.python.org/mailman/listinfo/python-list

Re: How to measure execution time of a program

2006-06-28 Thread Girish Sahani
function) ?? Thanks, girish -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list

Function to prune dictionary keys not working

2006-06-27 Thread Girish Sahani
hi ppl, Here is a simple function to remove those keys of a dictionary whose values are less than some specified value. But it isnt working. Please help. def prune(d,cp): l = [] for rule,value in d.iteritems(): #print value if value = cp: l.append(rule)

How to generate all permutations of a string?

2006-06-22 Thread Girish Sahani
Hi guys, I want to generate all permutations of a string. I've managed to generate all cyclic permutations. Please help :) def permute(string): l= [] l.append(string) string1 = '' for i in range(0,len(string)-1,1): string1 = string[1:len(string)] + string[:1]

Re: How to generate all permutations of a string?

2006-06-22 Thread Girish Sahani
In article [EMAIL PROTECTED], Girish Sahani [EMAIL PROTECTED] wrote: I want to generate all permutations of a string. def permute(Seq) : generator which yields successive permutations of the elements of Seq. if len(Seq) == 0 : yield () else : for i

Re: How to generate all permutations of a string?

2006-06-22 Thread Girish Sahani
thanks lawrence...however this func doesnt return the permuted strings, so i added some code as follows to generate a list of all the permutations: def permute(seq): l = [] if len(seq) == 0: yield [] else: for i in range(0,len(seq)): for rest in

How to truncate/round-off decimal numbers?

2006-06-20 Thread Girish Sahani
Hi, I want to truncate every number to 2 digits after the decimal point. I tried the following but it doesnt work. a = 2 b = 3 round(a*1.0 / b,2) 0.67004 Inspite of specifying 2 in 2nd attribute of round, it outputs all the digits after decimal. --

Getting TypeError:list indices must be integers

2006-06-13 Thread Girish Sahani
Hi, Please check out the following loop,here indexList1 and indexList2 are a list of numbers. for index1 in indexList1: for index2 in indexList2: if ti1[index1] == ti2[index2] and not index1 != indexList1.pop(): index1+=1 index2+=1 continue elif index1 ==

Getting TypeError:list indices must be integers: apology

2006-06-13 Thread Girish Sahani
Hi ppl, I'm really sorry for the previous post. I write mails very quickly and end up making errors in it. This time i ended up giving a code portion from an old copy of my program. Here's the code portion that is giving a TypeError:list indices must be integers for index1 in indexList1: for

Re: Getting TypeError:list indices must be integers

2006-06-13 Thread Girish Sahani
On 13/06/2006 4:11 PM, Girish Sahani wrote: [snip] instance = ti2(k) tiNew = ti1.append(instance) ti2 is quacking function but ti1 is quacking list. Possibilities: (1) You meant to type ti2[k] ... and this section of code has not yet been executed, and would have featured

Function to remove elements from a list not working

2006-06-12 Thread Girish Sahani
Hi, I am trying to convert a list of pairs (l4) to list l5 by removing those pairs from l4 which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please help! Its possible i have made

Function to remove elements from a list not working (corrected)

2006-06-12 Thread Girish Sahani
Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does not give the correct output. Please help! Its possible i have made a trivial mistke

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Girish Sahani
= []. How can i do that? Le Lundi 12 Juin 2006 10:25, Girish Sahani a écrit : Hi, I am trying to modify a list of pairs (l4) by removing those pairs which are not present in a third list called pairList. The following is a simplified part of the routine i have written. However it does

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Girish Sahani
Thank you Markthis works too... Btw going slightly off-topic, when i try to run a code like below with around 50 elements (pairs) in l4,python just hangs. Any ideas why this is happening...the data is not that large :(( Girish Sahani wrote: Hi, I am trying to modify a list of pairs (l4

Re: Function to remove elements from a list working, but python hangs :((

2006-06-12 Thread Girish Sahani
not that big a data, this shouldnt happen Should it?? Girish Sahani wrote: Hi, I am trying to convert a list of pairs (l4) to list l5 by removing those pairs from l4 which are not present in a third list called pairList. The following is a simplified part of the routine i have written

Re: Function to remove elements from a list working, but Python Hangs :((

2006-06-12 Thread Girish Sahani
I guess it's already the case with lst = [ e for e in lst if e in pairs ] In [1]: lst = (1,2,3,4) In [2]: pairs=(5,) In [3]: lst=[e for e in lst if e in pairs] In [4]: lst Out[4]: [] Yes its working. I realized that i was giving an input which didnt satisfy the condition. Now if you

Error in Chain of Function calls

2006-06-09 Thread Girish Sahani
?? Thanks a lot, girish -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in Chain of Function calls

2006-06-09 Thread Girish Sahani
Girish Sahani wrote: However i am getting an error at the line marked with ***. what error ? ...line 266, in colocationMiner prunedNew = genColocations(prunedK) genColocations is a function defined before which returns prunedNew. Also,i am getting a ValueError in the code below

Re: Error in Chain of Function calls (Code Attached)

2006-06-09 Thread Girish Sahani
Girish Sahani wrote: Hi, There is a code in my main function which is something like: while prunedFinal != []: prunedNew = genColocations(prunedK) *** tableInstancesNew = genTableInstances(prunedNew,tableInstancesK) tiCountDict = tiCount

Re: Error in Chain of Function calls (Code Attached)

2006-06-09 Thread Girish Sahani
Thanks for the help borisi'll try using sets instead of lists But i dont understand the point below...full traceback means what :-? Girish Sahani wrote: However i am getting an error at the line marked with ***. Which error ? How do you hope us to be of any help here if you don't

Re: How to generate k+1 length strings from a list of k lengthstrings?

2006-06-08 Thread Girish Sahani
Yes it is the former of course.Common elements could be in any order in both strings. Thanks Marc :)...though we need to add an if for checking the length of the string (k+1). Jon Clements wrote: Are you asking the question, Which pairs of strings have one character different in each?, or

Re: Reading from a file and converting it into a list of lines

2006-06-07 Thread Girish Sahani
On 6/06/2006 4:15 PM, Girish Sahani wrote: Really sorry for that indentation thing :) I tried out the code you have given, and also the one sreeram had written. In all of these,i get the same error of this type: Error i get in Sreeram's code is: n1,_,n2,_ = line.split(',') ValueError: need

How to generate k+1 length strings from a list of k length strings?

2006-06-07 Thread Girish Sahani
:(. Thanks in advance, girish -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading from a file and converting it into a list of lines

2006-06-06 Thread Girish Sahani
in your code is: for n1, a1, n2, a2 in reader: ValueError: need more than 0 values to unpack Any ideas why this is happening? Thanks a lot, girish -- http://mail.python.org/mailman/listinfo/python-list

Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Girish Sahani
] value = [tiList[i+1][j],tiList[i+1][j+k]] tiDict2[key] = value continue continue continue return tiDict2 [/code] Thanks in advance, girish -- http://mail.python.org/mailman/listinfo/python-list

How to search for substrings of a string in a list?

2006-06-05 Thread Girish Sahani
and abd OR ('ab' common) 2)abc and bcd OR 3)abd and bcd OR Here 2 letters are common in all the solutions. I havent been able to figure out a method. Pleeez help!! Thanks in advance, girish -- http://mail.python.org/mailman/listinfo/python-list

How to generate all k-1 level substrings of a string?

2006-06-05 Thread Girish Sahani
give the full output: subsetList = [] for element in prunedNew: for i in range(0,2): subsetList.append(element[i:i+len(element)-1]) continue continue return prunedNew Thanks in Advance, girish -- http://mail.python.org/mailman/listinfo/python-list

Reading from a file and converting it into a list of lines: code not working

2006-06-05 Thread Girish Sahani
I have a text file in the following format: 1,'a',2,'b' 3,'a',5,'c' 3,'a',6,'c' 3,'a',7,'b' 8,'a',7,'b' . . . Now i need to generate 2 things by reading the file: 1) A dictionary with the numbers as keys and the letters as values. e.g the above would give me a dictionary like {1:'a', 2:'b',

Re: the most efficient method of adding elements to the list

2006-06-05 Thread Girish Sahani
Hi, Would it be .append()? Does it reallocate te list with each apend? Yes it does. If order of the new element being added doesnt matter you can use append. If it does, you can use insert(). l=[] for i in xrange(n): l.append(i) Thx, A. --

Query - Pexpect

2005-07-22 Thread Girish
,to run the apllication.The application is developed using wxpython.ur suggestions will be of gr8 help.plz do reply. Regards Girish -- http://mail.python.org/mailman/listinfo/python-list

query regarding expect

2005-07-22 Thread Girish
the apllication.The application is developed using wxpython.ur suggestions will be of gr8 help.plz do reply. Regards Girish -- http://mail.python.org/mailman/listinfo/python-list

Query

2005-07-08 Thread Girish
Hi, Can we control keyboard and mouse actions using python scripts in Linux environment? plz do reply. Regards Girish -- http://mail.python.org/mailman/listinfo/python-list