Re: Create Logging module

2019-08-01 Thread Sinardy Xing
Sorry for spamming this is suppose send to tutor-ow...@python.org On Thu, Aug 1, 2019 at 5:08 PM Sinardy Xing wrote: > Hi, > > I am learning to create python logging. > > My goal is to create a logging module where I can use as decorator in my > main app > > follo

Create Logging module

2019-08-01 Thread Sinardy Xing
Hi, I am learning to create python logging. My goal is to create a logging module where I can use as decorator in my main app following is the logging code start here--- import logging #DEBUG: Detailed information, typically of interest only when diagnosing problems. #INFO : Conf

Re: PIP message: Fatal error in launcher: Unable to create process using '"'

2018-01-11 Thread Harriett Xing
Thanks for the info. I found two copies of pip.exe. One of them was left from a previous installation. Removed the extra copy. Now pip is working. Thank you very much for your help. On Thu, Jan 11, 2018 at 10:46 AM, Harriett Xing wrote: > Thanks for the info. > > "python

Re: PIP message: Fatal error in launcher: Unable to create process using '"'

2018-01-11 Thread Harriett Xing
ich give the error. Also, please confirm that you > get the same errors if you're in a different (empty) directory - > sometimes what's in the current directory can mess things up. > > Paul > > > On 11 January 2018 at 14:39, Harriett Xing > wrote: > > I am

PIP message: Fatal error in launcher: Unable to create process using '"'

2018-01-11 Thread Harriett Xing
I am getting the message: Fatal error in launcher: Unable to create process using '"' for all pip commands. I tried uninstalling and installing different versions of python, but the pip is still not work, getting the same error message. Has anyone encountered this? Any ideas? Thanks. -- htt

PIP message: Fatal error in launcher: Unable to create process using '"'

2018-01-11 Thread Harriett Xing
I am getting the message: Fatal error in launcher: Unable to create process using '"' for all pip commands. I tried uninstalling and installing different versions of python, but the pip is still not work, getting the same error message. Has anyone encountered this? Any ideas? Thanks. -- htt

Puzzled in the coding of Chinese

2007-09-18 Thread Xing
Dear list members, I am a newcomer in the world of Python. But I am attracted by Python's power in handling text! Now I apply it to handle Chinese but the Chinese character cann't be displayed on the screen. What displayed on the screen is the 16bits codes. I am so puzzled! I believe thi

MySQLdb installation error

2006-08-16 Thread Yi Xing
background * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Yi Xing wrote: > Hi, > > I met the following error when I tried to install MySQLdb. I had no > problem installing numarray, Numeric, Rpy, etc. Does anyone know > what's the problem? Thanks!

MySQLdb installation error

2006-08-15 Thread Yi Xing
Hi, I met the following error when I tried to install MySQLdb. I had no problem installing numarray, Numeric, Rpy, etc. Does anyone know what's the problem? Thanks! running install running build running build_py creating build creating build/lib.darwin-7.9.0-Power_Macintosh-2.4 copying _mysql_

Re: Memory problem

2006-08-15 Thread Yi Xing
I used the array module and loaded all the data into an array. Everything works fine now. On Aug 14, 2006, at 4:01 PM, John Machin wrote: > Yi Xing wrote: >> Thanks! I just found that that I have no problem with >> x=[[10.0]*2560*2560]*500, but x=range(1*2560*2560*30) doesn'

Re: Memory problem

2006-08-14 Thread Yi Xing
Is there a way that I can define a two-dimensional array in array.array()? Thanks. On Aug 14, 2006, at 2:28 PM, John Machin wrote: > Yi Xing wrote: >> I tried the following code: >> >>>>> i=0 >>>>> n=2600*2600*30 >>>>> a=array.array

Re: Memory problem

2006-08-14 Thread Yi Xing
Thanks! I just found that that I have no problem with x=[[10.0]*2560*2560]*500, but x=range(1*2560*2560*30) doesn't work. -Yi On Aug 14, 2006, at 3:08 PM, Larry Bates wrote: > Yi Xing wrote: >> On a related question: how do I initialize a list or an array with a >> pre

Re: Memory problem

2006-08-14 Thread Yi Xing
On a related question: how do I initialize a list or an array with a pre-specified number of elements, something like int p[100] in C? I can do append() for 100 times but this looks silly... Thanks. Yi Xing -- http://mail.python.org/mailman/listinfo/python-list

Memory problem

2006-08-14 Thread Yi Xing
I tried the following code: >>> i=0 >>> n=2600*2600*30 >>> a=array.array("f") >>> while (i<=n): .. i=i+1 .. a.append(float(i)) .. Traceback (most recent call last): File "", line 3, in ? MemoryError to see the size of the array at the time of memory error: >>>len(a) 8539248. I use Wind

Memory problem

2006-08-14 Thread Yi Xing
Hi, I need to read a large amount of data into a list. So I am trying to see if I'll have any memory problem. When I do x=range(2700*2700*3) I got the following message: Traceback (most recent call last): File "", line 1, in ? MemoryError Any way to get around this problem? I have a mac

building an index for large text files for fast access

2006-07-24 Thread Yi Xing
Hi, I need to read specific lines of huge text files. Each time, I know exactly which line(s) I want to read. readlines() or readline() in a loop is just too slow. Since different lines have different size, I cannot use seek(). So I am thinking of building an index for the file for fast access

reading specific lines of a file

2006-07-15 Thread Yi Xing
Hi All, I want to read specific lines of a huge txt file (I know the line #). Each line might have different sizes. Is there a convenient and fast way of doing this in Python? Thanks. Yi Xing -- http://mail.python.org/mailman/listinfo/python-list