Re: How to use regex (re)

2015-08-07 Thread PK Khatri
On Friday, August 7, 2015 at 9:48:35 AM UTC-7, Peter Pearson wrote: > On Thu, 6 Aug 2015 13:06:36 -0700 (PDT), PK Khatri wrote: > > I have a following script which extracts xyz.tgz and outputs to a > > folder which contains several sub-folders and files. > > > >

How to use regex (re)

2015-08-06 Thread PK Khatri
I have a following script which extracts xyz.tgz and outputs to a folder which contains several sub-folders and files. source_dir = "c:\\TEST" dest_dir = "c:\\TEST" for src_name in glob.glob(os.path.join(source_dir, '*.tgz')): base = os.path.basename(src_name) dest_na

Re: how should i add extension and unzip again?

2015-03-18 Thread PK Khatri
On Wednesday, March 18, 2015 at 4:58:34 PM UTC-7, MRAB wrote: > On 2015-03-18 23:22, PK Khatri wrote: > > This script untars .gz file to file without extension > > > > import gzip > > import glob > > import os.path > > import tarfile > >

how should i add extension and unzip again?

2015-03-18 Thread PK Khatri
This script untars .gz file to file without extension import gzip import glob import os.path import tarfile source_dir = "C:\\TEST" dest_dir = "C:\\TEST" for src_name in glob.glob(os.path.join(source_dir, '*.gz')): base = os.path.basename(src_name) dest_name = os.path.join(dest_di

identify checksum type?

2009-06-29 Thread PK
yother sum type for that matter? is there a nice way to do this in python? ~ PK -- http://mail.python.org/mailman/listinfo/python-list

Re: nested looping

2009-04-08 Thread PK
On Wed, Apr 8, 2009 at 6:12 PM, Luis Alberto Zarrabeitia Gomez wrote: > > Quoting PK : > > > So I'm trying to see whats the cleanest way to do this: > > > > I have a > > > > checklist = [ax, bx, by, cy ..] (a combination of a,b,c with x and y

nested looping

2009-04-08 Thread PK
ility where ax doesn't exist but ay or az does exist. Hope There is a cleaner way to accomplish this. Thanks in advance, PK -- http://mail.python.org/mailman/listinfo/python-list

fcntl.fcntl breaking on 64bit

2009-02-18 Thread PK
6/686. Does anyone have any thoughts? Is this a known issue? any workarounds? Any suggestions appreciated. Thanks, ~ PK -- http://mail.python.org/mailman/listinfo/python-list

getting error...... Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\xlrd\__init__.py", line 370, in open_workbook biff_version = bk.getbof(XL

2008-12-04 Thread pk sahoo
hallo everybody, when i am running the following command >>> import xlrd >>> book=xlrd.open_workbook("C:\\a.xls") i am getting the following error.. *Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\xlrd\__init__.py", line 370, in open_workb ook

Geeting the error Open failed: : Expected BOF record; found 0x3f3c

2008-12-04 Thread pk sahoo
hallo everybody, when i m running the command python runxlrd.py 3rows a.xls i m getting the following error === File: a.xls === *** Open failed: : Expected BOF record; found 0x3f3c what is the reason regards prasanna -- http://mail.python.org/mailman/listinfo/python-list