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
, line 78, in _GetGoodDispatch 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
sSession') Any help is appreciated. Thanks, Girish -- http://mail.python.org/mailman/listinfo/python-list

Change Encoding in Py 2.5

2010-07-22 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-21 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

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
3, 2009 at 11:21 AM, Rami Chowdhury wrote: > On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian > 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

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 wrote: > On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian > wrote: > >> I checked an

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
n Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian >> 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.

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
this? Thanks. On Tue, Nov 3, 2009 at 11:47 AM, M.-A. Lemburg 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 >> che

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

Registering DLL

2009-07-23 Thread Girish
rver = [interp], ) I am trying to generate a DLL from Python COM server module. I am able to register the module by running the python code, but when I generate a DLL and then try to register it using Regsvr32 command, I am getting above mentioned error Please help me resolve this issue. -Girish -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in reg dll

2009-06-23 Thread Girish
Jun 2009 02:09:57 -0300,Girish escribió: > > > I am not able to registerDLLgenerated from py2exe > > When I try to register thedllusing the commant: regsve32 dspace.dll, > > I am getting error saying :"DLLRegisterServer in dspace.dllfailed. > > Return code was: 0xc000

Error in reg dll

2009-06-15 Thread Girish
ing 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://mail.python.org/mailman/listinfo/python-list

XML Parsing

2009-02-24 Thread Girish
the data "![CDATA[Parameter Identifiers Supported - $01 to $20]]" Thanks, Girish... -- http://mail.python.org/mailman/listinfo/python-list

Extract CDATA Node

2009-02-24 Thread Girish
reate 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

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

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 i

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-16 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
ls") worksheet = workbook.Activesheet #worksheet.OLEObjects.Add(Filename="C:\Documents 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").Sel

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 > >

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', 'b

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', 'b

Generating all ordered substrings of a string

2006-07-11 Thread girish
['bd','ac']] I've tried the following but i cant prevent duplicates and i'm missing some substrings: >>> colocn = 'abcd' >>> k = 4 >>> for i in range(k-1): for j in range(1,k):

Generating multiple lists from one list

2006-07-05 Thread Girish Sahani
x27;b.4','c.2','c.6','d.3']. Then output should be [['a.1','b.3','c.2','d.3'],['a.1','b.3','c.6','d.3'], ['a.1','b.4','c.2','d.3'],[['a.1','b.4','c.6','d.3'] 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
x27;b.4','c.2','c.6','d.3']. Then output should be [['a.1','b.3','c.2','d.3'],['a.1','b.3','c.6','d.3'], ['a.1','b.4','c.2','d.3'],[['a.1','b.4','c.6','d.3'] Can anyone suggest me a time-efficient method for doing this?? TIA, girish -- http://mail.python.org/mailman/listinfo/python-list

Re: How to measure execution time of a program

2006-06-28 Thread Girish Sahani
ogram's main function) ?? > > Thanks, > girish > -- > http://mail.python.org/mailman/listinfo/python-list > -- 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

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) re

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)): >>

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 eleme

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] l.ap

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. -- http://mail.python.org

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 s

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 ind

Getting "TypeError:list indices must be integers"

2006-06-12 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 == indexList1.

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

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

2006-06-12 Thread Girish Sahani
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 fo

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 modi

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 hav

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 sinc

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 a

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 ho

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 = &

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 V

Error in Chain of Function calls

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

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?",

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

2006-06-07 Thread Girish Sahani
continue But this one is quite bad in the time aspect :(. 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
> 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

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

2006-06-05 Thread Girish Sahani
error i get 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

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. > -- > http://mail.python.org/mailm

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', 3:'a',

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

2006-06-05 Thread Girish Sahani
a' or 'bac' is the same. I wrote the following code but it doesnt 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

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

2006-06-05 Thread Girish Sahani
gs. Out of the k-1 letters in each length k-1 string,k-2 will be common. Another e.g is: Given 'abcd' and list ['abc,'abd','bcd'],i must extract 1)abc 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

Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Girish Sahani
for j in range(0,length,1): for k in range(1,length+1,1): if j+k <= length: key = tiList[i][j] + tiList[i][j+k] 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

query regarding expect

2005-07-22 Thread Girish
on the ok button,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 - Pexpect

2005-07-22 Thread Girish
ick on the ok button,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

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