reading from a gzip file

2008-06-18 Thread Nader
c_files.py", line 131, in ? input_file = open(gunziped_file,'r') TypeError: coercing to Unicode: need string or buffer, instance found I think that I do some mistake. Would some body tell me what is my mistake? Nader -- http://mail.python.org/mailman/listinfo/python-list

reading from an a gzip file

2008-06-18 Thread Nader
c_files.py", line 131, in ? input_file = open(gunziped_file,'r') TypeError: coercing to Unicode: need string or buffer, instance found I think that I do some mistake. Would some body tell me what is my mistake? Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking list by using of exception

2008-06-13 Thread Nader
On Jun 13, 11:34 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 13 Jun 2008 04:37:44 -0300, Nader <[EMAIL PROTECTED]> escribió: > > > Hello, > > > I read some files name from a directory and then I put these name in a > > list. I will

Checking list by using of exception

2008-06-13 Thread Nader
ig of exception is enough to got it. Would somebody explain me about this? Regards, Nader try and except in a dircMaybe this quetion will be simple enough for you. -- http://mail.python.org/mailman/listinfo/python-list

Re: get keys with the same values

2008-06-12 Thread Nader
On Jun 12, 2:05 pm, Chris <[EMAIL PROTECTED]> wrote: > On Jun 12, 1:48 pm, Nader <[EMAIL PROTECTED]> wrote: > > > > > On Jun 12, 1:35 pm, [EMAIL PROTECTED] wrote: > > > > Nader: > > > > > d = {('a' : 1), ('b

Re: get keys with the same values

2008-06-12 Thread Nader
On Jun 12, 1:41 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote: > On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]> > wrote: > > >Hello, > > >I have a dictionary and will get all keys which have the same values. > > >d = {('a&#

Re: get keys with the same values

2008-06-12 Thread Nader
On Jun 12, 1:35 pm, [EMAIL PROTECTED] wrote: > Nader: > > > d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)} > > I will something as : > > d.keys(where their values are the same) > > Tha

get keys with the same values

2008-06-12 Thread Nader
can get two lists for this example: l1= ['a','e'] l2=['b','d'] Would somebody tell me how I can do it? Regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: str to float (rounded)

2008-06-10 Thread Nader
On Jun 10, 4:30 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Nader wrote: > > Hello, > > > I have a list of tuple with strin elements. These elements are number, > > but they are save as string. Now I will change the string to number > > which

str to float (rounded)

2008-06-10 Thread Nader
#x27;33.640', '-2.423')] And I will have the next list: t = [(35.76, -2.24), (33.33, -2.71), (33.64, -2.42)] The elements of tuple are not more as string. Would somebody tell me how I can do that? Regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: lists to save in a tuple

2008-06-09 Thread Nader
On Jun 9, 3:34 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Nader wrote: > > Hello, > > > I have two lists and would save them in a tuple. > > > a = [1,2,3] > > b = ['a','b','c'] > > > with the next sta

lists to save in a tuple

2008-06-09 Thread Nader
),(2,'b'),(2,'c'), (3,'a'),(3,'b'), (3,'c')] But I want the next list: [(1,'a'),(2,'b'),(3,'c')] Would somebody tell me how I can solve this problem? Regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: installing "pysqlite"

2007-03-01 Thread Nader
On Mar 1, 2:40 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 1 Mar, 12:46, "Nader" <[EMAIL PROTECTED]> wrote: > > > > > ldd returens the next result: > > ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so > >

Re: installing "pysqlite"

2007-03-01 Thread Nader
On Mar 1, 11:46 am, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 1 Mar, 10:34, "Nader" <[EMAIL PROTECTED]> wrote: > > > > > I have expanded the LD_LIBRARY_PATH to my home lib (export > > LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/

Re: installing "pysqlite"

2007-03-01 Thread Nader
On Feb 28, 12:51 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 28 Feb, 12:07, Nader Emami <[EMAIL PROTECTED]> wrote: > > > > > I am back with another problem. I suppose that I can tell it! > > I have installed both, 'sqlite' and 'py

Re: installing "pysqlite"

2007-02-28 Thread Nader
On Feb 28, 12:51 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 28 Feb, 12:07, Nader Emami <[EMAIL PROTECTED]> wrote: > > > > > I am back with another problem. I suppose that I can tell it! > > I have installed both, 'sqlite' and 'py

Re: installing "pysqlite"

2007-02-28 Thread Nader Emami
Paul Boddie wrote: > On 27 Feb, 10:31, Nader Emami <[EMAIL PROTECTED]> wrote: >> I have installed "TurboGears" and I would install 'pysqlite' also. I am >> a user on a Linux machine. If I try to install the 'pysqlite' with >> 'easy_in

Re: installing "pysqlite"

2007-02-27 Thread Nader Emami
Paul Boddie wrote: > On 27 Feb, 13:35, "Nader" <[EMAIL PROTECTED]> wrote: >> Thank for your reaction. I don't know also how the interaction sith >> 'easy_install' is. I think that I have to install 'pysqlite' from >> source code als

Re: installing "pysqlite"

2007-02-27 Thread Nader
On Feb 27, 12:44 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 27 Feb, 10:31, Nader Emami <[EMAIL PROTECTED]> wrote: > > > I have installed "TurboGears" and I would install 'pysqlite' also. I am > > a user on a Linux machine. If I

installing "pysqlite"

2007-02-27 Thread Nader Emami
rectory In file included from src/module.c:24: src/connection.h:38: error: parse error before "sqlite3" Could somebody tell me what I have to do to install 'pysqlite'? With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: ez_setup.py

2007-02-26 Thread Nader Emami
Tim Golden wrote: > Nader Emami wrote: >> L.S., >> >> I have installed locally Python-2.4.4 without any problem. Then I >> would install the "ez_setup.py" to be able using of "easy_install" >> tool, but I get the next error: >>

ez_setup.py

2007-02-26 Thread Nader Emami
import cookielib File "/usr/people/emami/lib/python2.4/cookielib.py", line 35, in ? from calendar import timegm File "/usr/people/emami/calendar.py", line 23, in ? import pygtk ImportError: No module named pygtk I don't understand what is the pro

compile python with sqlite3

2007-02-23 Thread Nader Emami
o do if I want to compile 'Python' with 'sqlite3'? I would appreciate if somebody tells me to solve this problem. With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

which one?

2006-05-16 Thread Nader Emami
do not which of them I can choose for my application. I will appreciate you if you would give me some advice in this case. With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

a question

2006-05-16 Thread Nader Emami
lot of alternative but I do not which of them I can choose for my application. I will appreciate everyone if he/she would give me some advice in this case. With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: binary file

2005-06-20 Thread Nader Emami
Kent Johnson wrote: > Nader Emami wrote: > >> L.S., >> >> I have used the profile module to measure some thing as the next command: >> >> profile.run('command', 'file') >> >> But this make a binary file! How can I write th

binary file

2005-06-20 Thread Nader Emami
L.S., I have used the profile module to measure some thing as the next command: profile.run('command', 'file') But this make a binary file! How can I write the result of 'profile' in a ascii file? Others how can I read (or convert) the binary file to am ascii

test

2005-06-08 Thread Nader Emami
artTime = time.time() AttributeError: 'module' object has no attribute 'time' I can't understand it! Would somebody tell me how I can solve this problem. Thanks, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: datetime

2005-05-19 Thread Nader
I have the next on my machine: Python 2.3.3 (#1, Apr 6 2004, 01:47:39) [GCC 3.3.3 (SuSE Linux)] on linux2 Maybe this is a problem! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

datetime

2005-05-19 Thread Nader Emami
L.S., It is very simple question: Why doesn't work the next statments? import datetime today = datetime.date.today() and I get the next error: today = datetime.date.today() Traceback (most recent call last): File "", line 1, in ? AttributeError: time I can't understand it! -- http://mail.

a question

2005-01-19 Thread Nader Emami
. Could somebody tell me about this? With regards, Nader (this -- http://mail.python.org/mailman/listinfo/python-list

here document

2005-01-11 Thread Nader Emami
i don't know how can I do this! with regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

date/time

2005-01-05 Thread Nader Emami
L.S., Could somebody help me how I can get the next format of date from the time module? example: I have to have this time 20050105. It is the next attributes of format %Y%m%d. with regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

csh to Python

2005-01-04 Thread Nader Emami
Hello, I am new in Python world, and would like to begin with translate a csh file to a python script. Could somebody give me an advise (documentation or web-site) where I can do that. with regards, Nader -- http://mail.python.org/mailman/listinfo/python-list