Re: doubt About import machine

2021-11-21 Thread Joe Pfeiffer
Daniel Eduardo Almeida Correa writes: > Hello, I'm trying to use the machine library in python 3.10 version, but I > can't import it with the pip install machine, could you tell me a way to > solve it or a python version compatible with the library? Thank you a lot > for your answer. The "machi

Re: doubt About import machine

2021-11-21 Thread MRAB
On 2021-11-21 18:36, Daniel Eduardo Almeida Correa wrote: Hello, I'm trying to use the machine library in python 3.10 version, but I can't import it with the pip install machine, could you tell me a way to solve it or a python version compatible with the library? Thank you a lot for your answer.

Re: Doubt in line_profiler documentation

2018-01-27 Thread Alain Ketterlin
Abhiram R writes: [...] > https://github.com/rkern/line_profiler > > The definition for the time column says - > > "Time: The total amount of time spent executing the line in the timer's > units. In the header information before the tables, you will see a line > 'Timer unit:' giving the conversio

Re: Doubt with files

2017-02-14 Thread Peter Pearson
On Tue, 14 Feb 2017 09:13:48 -0800 (PST), José Manuel Suárez Sierra wrote: > hello, > im trying to read a rtf or txt file with this python script: > > with open(dirFichero,'r') as reader: > for line in reader: > print line > > the problem is that shown is : [suppressing blank lines] >

Re: Doubt with files

2017-02-14 Thread boB Stepp
On Tue, Feb 14, 2017 at 11:31 AM, Joaquin Alzola wrote: > >>with open(dirFichero,'r') as reader: > > for line in reader: > > print line >> >>the problem is that shown is : >>{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 >>{\fonttbl\f0\fswiss\fcharset0 Helvetica;} >>{\colortbl;\red2

Re: Doubt with files

2017-02-14 Thread boB Stepp
On Tue, Feb 14, 2017 at 11:13 AM, José Manuel Suárez Sierra wrote: > hello, > im trying to read a rtf or txt file with this python script: > > with open(dirFichero,'r') as reader: > for line in reader: > print line > > the problem is that shown is : > > {\rtf1\ansi\ansicpg1252\cocoartf

RE: Doubt with files

2017-02-14 Thread Joaquin Alzola
>with open(dirFichero,'r') as reader: > for line in reader: > print line > >the problem is that shown is : >{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 >{\fonttbl\f0\fswiss\fcharset0 Helvetica;} >{\colortbl;\red255\green255\blue255;} >{\*\expandedcolortbl;;} >\paperw11900\paperh1

Re: doubt loading pages

2017-02-01 Thread Peter Otten
José Manuel Suárez Sierra wrote: > El miércoles, 1 de febrero de 2017, 11:55:11 (UTC+1), José Manuel Suárez > Sierra escribió: >> hello everyone, >> Im trying to make a program that takes an archive from pdb (for instance >> this link http://www.rcsb.org/pdb/files/fasta.txt?structureIdList=5HXY >

Re: doubt loading pages

2017-02-01 Thread José Manuel Suárez Sierra
El miércoles, 1 de febrero de 2017, 11:55:11 (UTC+1), José Manuel Suárez Sierra escribió: > hello everyone, > Im trying to make a program that takes an archive from pdb (for instance this > link http://www.rcsb.org/pdb/files/fasta.txt?structureIdList=5HXY > > after reading it I want it to save

Re: doubt loading pages

2017-02-01 Thread Peter Otten
José Manuel Suárez Sierra wrote: > hello everyone, > Im trying to make a program that takes an archive from pdb (for instance > this link http://www.rcsb.org/pdb/files/fasta.txt?structureIdList=5HXY > > after reading it I want it to save in a list only this part of the > archive: > > MGSSHHS

Re: Doubt with matrix

2017-01-12 Thread Peter Otten
José Manuel Suárez Sierra wrote: > Hello, I want to go over matrix indexs with this code: > def comparador2(a, b): > c3 = ["0"] # variables > x = -1 # contador de letras aniadidas a c3 > i = 0 # contador bucle secuencia a > j = 0 # contador bucle secuencia b > l1 = len(a)

Re: Doubt with matrix

2017-01-12 Thread Bob Gailer
Always Post the entire traceback. That will show us the line of code that raised the error, as well as the sequence of function calls involved. On Jan 12, 2017 11:10 AM, "José Manuel Suárez Sierra" < josemsuarezsie...@gmail.com> wrote: > Hello, I want to go over matrix indexs with this code: > d

Re: Doubt on generators behavior

2013-10-13 Thread Terry Reedy
On 10/13/2013 4:19 AM, Krishnan Shankar wrote: Hi Friends, I am new to Generators and was learning the same by experimenting. I wrote a small code which is as below. >>> def test_gen(var): ... print "The number is", var ... if var % 2 == 0: ... yield var ... else: ...

Re: Doubt on generators behavior

2013-10-13 Thread Steven D'Aprano
On Sun, 13 Oct 2013 13:49:53 +0530, Krishnan Shankar wrote: > Hi Friends, > > I am new to Generators and was learning the same by experimenting. I > wrote a small code which is as below. > def test_gen(var): > ... print "The number is", var > ... if var % 2 == 0: > ... yield

Re: Doubt on generators behavior

2013-10-13 Thread Jussi Piitulainen
Krishnan Shankar writes: > Hi Friends, > > I am new to Generators and was learning the same by experimenting. I > wrote a small code which is as below. > > >>> def test_gen(var): > ... print "The number is", var > ... if var % 2 == 0: > ... yield var > ... else: > ...

Re: Doubt on creating threads

2009-01-03 Thread koranthala
On Jan 4, 4:59 am, Bryan Olson wrote: > koranth...@gmail.com wrote: > > I am creating an application and it creates ~1-2 threads every second > > and kill it within 10 seconds. After reading this I am worried. Is > > creating a thread a very costly operation? > > Compared to a procedure call it's

Re: Doubt on creating threads

2009-01-03 Thread Bryan Olson
koranth...@gmail.com wrote: I am creating an application and it creates ~1-2 threads every second and kill it within 10 seconds. After reading this I am worried. Is creating a thread a very costly operation? Compared to a procedure call it's expensive, but a couple threads per second is insig

Re: Doubt on creating threads

2009-01-03 Thread Simon Forman
On Jan 3, 8:39 am, koranth...@gmail.com wrote: > I was going through Python posts and this post caught my > attentionhttp://groups.google.com/group/comp.lang.python/browse_thread/thread/... > > >  You have missed an important point. A well designed application does >  neither create so many threa

Re: Doubt on creating threads

2009-01-03 Thread Jean-Paul Calderone
On Sat, 3 Jan 2009 08:39:52 -0800 (PST), koranth...@gmail.com wrote: I was going through Python posts and this post caught my attention http://groups.google.com/group/comp.lang.python/browse_thread/thread/f99326a4e5d394e/14cd708956bd1c1a#14cd708956bd1c1a You have missed an important point. A we

Re: Doubt

2008-07-24 Thread Michael Torrie
You wrote: > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > } in Python As other pointed out, iterating through a list or range is often a far more elegant way to do a loop than a C-style loop. But the C-style for loop is just syntactic sugar for a while loop. In some cases, C-style f

Re: Doubt

2008-07-24 Thread Tobiah
>> How to convert the perl notation >> $a = ""; expression in Python ? a = "" >> How to represent the loop >> for ($a = $b; $a<=$c;$a++){ >> >> } in Python for a in range(b, c + 1): do_something() ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/pytho

Re: Doubt

2008-07-24 Thread Diez B. Roggisch
Fredrik Lundh wrote: > ജഗന്നാഥ് wrote: > >> I am a Perl programmer new to Python. I have a small doubt. > > I suspect you mean "question", not "doubt". It's not quite the same > thing. It seems to be an Indian/Asian thing. By now, I tuned myself to read "doubt" as "question/problem"... Diez -

Re: Doubt

2008-07-23 Thread ജഗന്നാഥ്
On Jul 24, 1:13 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > ജഗന്നാഥ് wrote: > > I am a Perl programmer new to Python. I have a small doubt. > > I suspect you mean "question", not "doubt". It's not quite the same thing. > > > How to convert the perl notation > > $a = ""; expression in Python ? >

Re: Doubt

2008-07-23 Thread Fredrik Lundh
ജഗന്നാഥ് wrote: I am a Perl programmer new to Python. I have a small doubt. I suspect you mean "question", not "doubt". It's not quite the same thing. How to convert the perl notation $a = ""; expression in Python ? How to represent the loop for ($a = $b; $a<=$c;$a++){ } in Python Start

Re: Doubt

2008-07-23 Thread Paddy
On Jul 23, 3:51 pm, ജഗന്നാഥ് <[EMAIL PROTECTED]> wrote: > Friends > > I am a Perl programmer new to Python. I have a small doubt. > How to convert the perl notation > $a = ""; expression in Python ? > > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > > } in Python > > Jagan > Linguist Th

Re: Doubt

2008-07-23 Thread Sean DiZazzo
On Jul 23, 7:51 am, ജഗന്നാഥ് <[EMAIL PROTECTED]> wrote: > Friends > > I am a Perl programmer new to Python. I have a small doubt. > How to convert the perl notation > $a = ""; expression in Python ? > > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > > } in Python > > Jagan > Linguist On

Re: Doubt

2008-07-23 Thread Stephen Johnson
You don't need a mailing list, you need to read the tutorial. Those are completely trivial questions. http://docs.python.org/tut/tut.html -Steve Johnson On Jul 23, 2008, at 10:51 AM, ജഗന്നാഥ് wrote: Friends I am a Perl programmer new to Python. I have a small doubt. How to convert the perl

Re: Doubt

2008-07-23 Thread Guilherme Polo
On Wed, Jul 23, 2008 at 11:51 AM, ജഗന്നാഥ് <[EMAIL PROTECTED]> wrote: > Friends > > I am a Perl programmer new to Python. I have a small doubt. > How to convert the perl notation > $a = ""; expression in Python ? a = "" > > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > } in Python >

Re: doubt with importing module, given module name

2007-04-13 Thread Pradnyesh Sawant
> module_name = "module" > mod = __import__(module_name) > class_name = module_name.capitalize() > cls = getattr(mod, class_name) > inst = cls() > Worked like a magic charm :) Also helped me understand the concept of getattr :D Thanks a million! -- warm regards, Pradnyesh Sawant -- Be yourself.

Re: doubt with importing module, given module name

2007-04-09 Thread Carsten Haese
On Mon, 2007-04-09 at 22:52 +0530, Pradnyesh Sawant wrote: > Hello, > I have a string which in reality is the name of a module to be > imported. The name of the class contained in the module also has the > same (although with different capitalization). My requirement is to > import the module, and

Re: doubt in curses module

2006-12-12 Thread Gabriel Genellina
Please keep posting on the list. At Tuesday 12/12/2006 02:02, pradeep kumar wrote: i want to use function keys to continue or pause or quit in my program so i searched how to use function keys then i found curses module I think you may want this portable getch function:

Re: doubt in curses module

2006-12-11 Thread Gabriel Genellina
At Monday 11/12/2006 05:17, pradeep kumar wrote: iam new to python. i want to use function keys in my program, so i went through the curses module, but in that module it shows a different window object and after pressing the our desired function key in it, that will return the ascii value of t

Re: Doubt with wx.CallAfter

2006-05-23 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >Hello together:: > >I have programmed this fuction: > >def OnNewMovie(self, event): >""" Local user receives a new movie event from a user""" > >#self.log.debug( "Got OnNewMovie, " + `event`) >if event.data[0] == self.pubId: >fDep.writ

Re: doubt on csv file

2005-12-15 Thread skip
shiva> am trying to search whtr my string is found in a csv file, if its shiva> not found i have to append it at the last row of a csv file, How shiva> can i do that?? Given that you specified a csv file, I presume you want to maintain the proper semantics. You clearly know how to re

Re: doubt on csv file

2005-12-15 Thread Dan M
On Thu, 15 Dec 2005 16:09:51 -0800, muttu2244 wrote: > hey thanks a lot for that it worked . Excellent! Glad to be of assistance :) -- http://mail.python.org/mailman/listinfo/python-list

Re: doubt on csv file

2005-12-15 Thread muttu2244
hey thanks a lot for that it worked . -- http://mail.python.org/mailman/listinfo/python-list

Re: doubt on csv file

2005-12-15 Thread Dan M
> here is what am trying to do, first am trying to open it in a read > mode, and checking each row by row , if it is not found till my last > row, i want to append it to the last row , so how should i do that. > > file = open ('C:\some.csv','r') > reader = csv.reader(file) > for row in reader: >

Re: Doubt C and Python

2005-08-28 Thread Wouter van Ooijen (www.voti.nl)
>> I use Python when my time is most valuable (in most cases it is), in >> the very few cases the computer's time is more valuable I write in >> C/C++. > >In cases when the computer's time is more valuable, why not use CPython >with C/C++ API? Only most time consuming parts can be replaced to C/C+

Re: Doubt C and Python

2005-08-28 Thread James Kim
Wouter van Ooijen (www.voti.nl) wrote: > I use Python when my time is most valuable (in most cases it is), in > the very few cases the computer's time is more valuable I write in > C/C++. In cases when the computer's time is more valuable, why not use CPython with C/C++ API? Only most time consum

Re: Doubt C and Python

2005-08-28 Thread James Kim
Jeff Schwab wrote: > 5. Scripting is easier in Python than in Java, particularly with > regard to environment variables and process control. > > Of course, these are only my opinions. I am particularly not an expert > on Python or Java. Note that for Java experts, Jython can be used for in

Re: Doubt C and Python

2005-08-25 Thread Grant Edwards
On 2005-08-25, Ben Sizer <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2005-08-23, praba kar <[EMAIL PROTECTED]> wrote: >> > What why it is more efficient. Kindly let me >> > know with some details. >> >> Have you read _any_ of the thread? A number of people have >> already explained in

Re: Doubt C and Python

2005-08-25 Thread Uwe Schmitt
> > On Tue, 23 Aug 2005 06:15:03 +0100, praba kar wrote: > > > Dear All, > >I want to know the link between c and python. > >Some people with C background use Python instead > > of programming in C.why? > > > > > > > > regards > > Prabahar > > > > > > > > >

Re: Doubt C and Python

2005-08-25 Thread michael
On Tue, 23 Aug 2005 06:15:03 +0100, praba kar wrote: > Dear All, >I want to know the link between c and python. >Some people with C background use Python instead > of programming in C.why? > > > > regards > Prabahar > > > > > > Just my $.02 I am a l

Re: Doubt C and Python

2005-08-25 Thread Ben Sizer
Grant Edwards wrote: > On 2005-08-23, praba kar <[EMAIL PROTECTED]> wrote: > > What why it is more efficient. Kindly let me > > know with some details. > > Have you read _any_ of the thread? A number of people have > already explained in detail why programming in Pything is more > efficient. Pl

Re: Doubt C and Python

2005-08-24 Thread Grant Edwards
On 2005-08-23, praba kar <[EMAIL PROTECTED]> wrote: >>> Some people with C background use Python instead of >>> programming in C.why? >> >> Becuase it is much more efficient. >> >> -James > > What why it is more efficient. Kindly let me > know with some details. Have you read _any_ of the thre

Re: Doubt C and Python

2005-08-24 Thread praba kar
--- James <[EMAIL PROTECTED]> wrote: > > Some people with C background use Python instead > > of programming in C.why? > > Becuase it is much more efficient. > > -James What why it is more efficient. Kindly let me know with some details. regards Prabahar

RE: Doubt C and Python

2005-08-23 Thread Delaney, Timothy (Tim)
Terry Hancock wrote: >* The claim that a Human can optimize code better than > the compiler assumes a very smart and talented Human, > and/or a very dumb compiler. Compilers are getting smarter, > and since a lot more people find the need to program, the >

Re: Doubt C and Python

2005-08-23 Thread Terry Hancock
On Tuesday 23 August 2005 06:28 am, Will McGugan wrote: > praba kar wrote: > >I want to know the link between c and python. > >Some people with C background use Python instead > > of programming in C.why? For the same reason that people acquainted with assembly language nevertheless ch

Re: Doubt C and Python

2005-08-23 Thread Wouter van Ooijen (www.voti.nl)
>For me, the choice is typically among C++, Perl, Python, and Java. The >arguments for Python relative to these languages are: > add: I develop on my platform (which happens to be XP, but that is irrelevant), I put the Python source on my website, and I never worry about the platform my users wi

Re: Doubt C and Python

2005-08-23 Thread Wouter van Ooijen (www.voti.nl)
> I want to know the link between c and python. Apart from the fact that the inner part of Python is written in C I know no link? > Some people with C background use Python instead >of programming in C.why? I use Python when my time is most valuable (in most cases it is), in the very few

Re: Doubt C and Python

2005-08-23 Thread Grant Edwards
On 2005-08-23, praba kar <[EMAIL PROTECTED]> wrote: > I want to know the link between c and python. > Some people with C background use Python instead > of programming in C.why? Because C is a dangerous, low-level language unsuitable for general-purposed application programming. I use C fo

Re: Doubt C and Python

2005-08-23 Thread en.karpachov
On 23 Aug 2005 01:22:31 -0700 James wrote: > > Some people with C background use Python instead > > of programming in C.why? > > Becuase it is much more efficient. It's rather because _they_ are much more efficient (that is, with Python). -- jk -- http://mail.python.org/mailman/listinfo/pyt

Re: Doubt C and Python

2005-08-23 Thread Jeff Schwab
praba kar wrote: > Dear All, >I want to know the link between c and python. >Some people with C background use Python instead > of programming in C.why? For me, the choice is typically among C++, Perl, Python, and Java. The arguments for Python relative to these languages are:

Re: Doubt C and Python

2005-08-23 Thread Will McGugan
praba kar wrote: > Dear All, >I want to know the link between c and python. >Some people with C background use Python instead > of programming in C.why? > Because I can create software many times faster. And its more fun. Will McGugan -- http://www.kelpiesoft.com -- http://mail.pyth

Re: Doubt C and Python

2005-08-23 Thread Sybren Stuvel
Will McGugan enlightened us with: > Because I can create software many times faster. And its more fun. Same here. And because it's very easy to write unittests, for instance. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why

Re: Doubt C and Python

2005-08-23 Thread James
> Some people with C background use Python instead > of programming in C.why? Becuase it is much more efficient. -James -- http://mail.python.org/mailman/listinfo/python-list

Re: Doubt regarding python Compilation

2005-05-01 Thread Andrew Dalke
praba kar wrote: > I want to know whether Python is compiler language > or interpreted language. If Python is interpreter > language why compilation is there. That distinction is implementation dependent and not an aspect of the language. How would that knowledge affect your decisions or thought

Re: Doubt regarding python Compilation

2005-04-27 Thread Fredrik Lundh
"praba kar" <[EMAIL PROTECTED]> wrote: > I have doubt regarding python Compilation. you sure have a lot of doubts. > I want to know whether Python is compiler language > or interpreted language. If Python is interpreter > language why compilation is there. the CPython implementation of P

Re: Doubt regarding sorting of a list specific field

2005-04-13 Thread Steven Bethard
Steven Bethard wrote: See my other post in this thread. seq.sort() is not stable; Hmmm... That didn't come out right. list.sort *is* stable. It's just that if you want to sort only by the first element of each tuple in a list, then list.sort won't produce results that are stable under this c

Re: Doubt regarding sorting of a list specific field

2005-04-13 Thread Steven Bethard
F. Petitjean wrote: Le Wed, 13 Apr 2005 01:13:40 -0600, Steven Bethard a écrit : praba kar wrote: list = [[1234,'name1'],[2234,'name2'],[0432,'name3']] I want to sort only numeric value having array field. How I need to do for that. In Python 2.4: py> import operator py> seq = [(1234,'name1'),(223

Re: Doubt regarding sorting of a list specific field

2005-04-13 Thread Steven Bethard
vincent wehren wrote: "praba kar" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | Dear All, | |I have doubt regarding sorting. I have a list | that list have another list (eg) | | list = [[1234,'name1'],[2234,'name2'],[0432,'name3']] -> Be careful, 0432 is octal notation f

Re: Doubt regarding sorting of a list specific field

2005-04-13 Thread F. Petitjean
Le Wed, 13 Apr 2005 01:13:40 -0600, Steven Bethard a écrit : > praba kar wrote: >> list = [[1234,'name1'],[2234,'name2'],[0432,'name3']] >> >> I want to sort only numeric value having array field. >> How I need to do for that. > > In Python 2.4: > > py> import operator > py> seq = [(1234,'name1

Re: Doubt regarding sorting of a list specific field

2005-04-13 Thread Steven Bethard
praba kar wrote: I have doubt regarding sorting. I have a list that list have another list (eg) list = [[1234,'name1'],[2234,'name2'],[0432,'name3']] I want to sort only numeric value having array field. How I need to do for that. In Python 2.4: py> import operator py> seq = [(1234,'name1'),(2

Re: Doubt regarding sorting of a list specific field

2005-04-12 Thread vincent wehren
"praba kar" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | Dear All, | |I have doubt regarding sorting. I have a list | that list have another list (eg) | | list = [[1234,'name1'],[2234,'name2'],[0432,'name3']] -> Be careful, 0432 is octal notation for 282. | | I want to

Re: Doubt regarding sorting functions

2005-04-11 Thread Steven Bethard
[EMAIL PROTECTED] wrote: def funcSort(myList): result = myList[:] result.sort() return result In Python 2.4, funcSort is called sorted: py> sorted([1.2,1.23,4.5,2]) [1.2, 1.23, 2, 4.5] py> sorted(["a","c","b","A","C","B"]) ['A', 'B', 'C', 'a', 'b', 'c'] STeVe -- http://mail.python.org/mailman

Re: Doubt regarding sorting functions

2005-04-10 Thread Brian van den Broek
praba kar said unto the world upon 2005-04-11 00:50: Dear All, I am new to Python. I am in need of some sorting functions (eg) numerical sorting functions and alphapetical sorting functions. I have searched through net But I cannot find any regarding this so If anyone know regarding thi

Re: Doubt regarding sorting functions

2005-04-10 Thread [EMAIL PROTECTED]
Basically you can sort after you put your data in your list: L = [1.2,1.23,4.5,2] L.sort() print L L = ["a","c","b","A","C","B"] L.sort() print L Result: [1.2, 1.23, 2, 4.5] ['A', 'B', 'C', 'a', 'b', 'c'] # remember in character the "A"

Re: Doubt regarding sorting functions

2005-04-10 Thread Bengt Richter
On Mon, 11 Apr 2005 05:50:11 +0100 (BST), praba kar <[EMAIL PROTECTED]> wrote: >Dear All, > > I am new to Python. I am in need of >some sorting functions (eg) numerical sorting >functions and alphapetical sorting functions. >I have searched through net But I cannot >find any regarding t

Re: doubt regarding Conversion of date into timestamp

2005-04-08 Thread Max M
praba kar wrote: Dear All, I am new to Python I want to know how to change a time into timestamp Is there any specific reason for not using datetime instead of time ? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: doubt regarding main function

2005-04-07 Thread Laszlo Zsolt Nagy
if __name__ == '__main__': test() What is the advantage of this way calling a function. For example, you can have a python script that has this function: def search(keywords,engine='www.google.com') At the end of the script, you can have this: if __name__ == '__main__': import sys

Re: Doubt regarding exec function

2005-03-22 Thread Diez B. Roggisch
Mosas wrote: > Dear All, > Php has exec function to run system commands and > this function return last line of system command > result. But in Python I can see only os.system() > function to run system command but it doesn't return > any result like php exec function. > I want to know