Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Steve Willoughby
On 08-Jun-11 23:33, Ashwini Oruganti wrote: On Thu, Jun 9, 2011 at 11:31 AM, Steve Willoughby mailto:st...@alchemy.com>> wrote: The value 5 is an integer-class object. But now what is "Integer-class"? Isn't integer a data type? I mean there is no concept of "classes" in C, and yet in C, we

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Alan Gauld
"Ashwini Oruganti" wrote I'm trying to learn Python, and know C++. I have a slight confusion regarding the meaning of "object" in python. Here's what I've concluded so far: When we say "object" in C++, it means an instance of a class. No, although its a common misconception. An object in O

[Tutor] telnet connection question

2011-06-09 Thread Rayon
HI All, Is there any way that I can use python telnetlib to connect to a telnet session. Send commands and get back data without closing the connection. I need the response to be faster and the login process is taking up too much time. I was thinking I could use a queue to pass in data b

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Walter Prins
On 9 June 2011 09:48, Alan Gauld wrote: > > So does the term *Object * change its meaning when we >> shift the context from C++ to python?? This is a little confusing, >> > > > No object is standard in OOP. It is a concept. It is the instantiated > encapsulation of data and function. How it is cr

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Ashwini Oruganti
On Thu, Jun 9, 2011 at 2:18 PM, Alan Gauld wrote: C++ grew out of C so it has a lot of non OOP features. It is no > surprise to find therefore that its primitive types are related to > memory allocation and raw data rather than objects. > > No object is standard in OOP. It is a concept. It is t

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Izz ad-Din Ruhulessin
Compared to Python, I do not even consider C++ an object oriƫnted language. 2011/6/9 Ashwini Oruganti > On Thu, Jun 9, 2011 at 2:18 PM, Alan Gauld wrote: > > C++ grew out of C so it has a lot of non OOP features. It is no >> surprise to find therefore that its primitive types are related to >> m

Re: [Tutor] lxml.html

2011-06-09 Thread nitin chandra
Sorry, did not realise , on clicking "Reply", I was mailing only to you. Thank you for pointing that out. Duly complied. TypeError: cannot concatenate 'str' and 'NoneType' objects >> I am extracting form field name / value from an html, but then it gives the above error and do

Re: [Tutor] lxml.html

2011-06-09 Thread Walter Prins
Hello Nitin, On 9 June 2011 15:10, nitin chandra wrote: > The following is the html code in index.py > > html = "C Informatics" > html += "Hospital Management & Information > System" > html += '' > html += '' > html += '' > html += '' > htm

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Corey Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/09/2011 07:03 AM, Ashwini Oruganti wrote: > On Thu, Jun 9, 2011 at 3:32 PM, Walter Prins wrote: > >> Object Oriented code in e.g. a procedural language like C, which obviously >> doesn't support the notion of objects explicitly in the language,

[Tutor] Syntax for Simplest Way to Execute One Python Program Over 1000's of Datasets

2011-06-09 Thread B G
I'm trying to analyze thousands of different cancer datasets and run the same python program on them. I use Windows XP, Python 2.7 and the IDLE interpreter. I already have the input files in a directory and I want to learn the syntax for the quickest way to execute the program over all these data

Re: [Tutor] Syntax for Simplest Way to Execute One Python Program Over 1000's of Datasets

2011-06-09 Thread Walter Prins
On 9 June 2011 20:49, B G wrote: > I'm trying to analyze thousands of different cancer datasets and run the > same python program on them. I use Windows XP, Python 2.7 and the IDLE > interpreter. I already have the input files in a directory and I want to > learn the syntax for the quickest way

Re: [Tutor] Syntax for Simplest Way to Execute One Python Program Over 1000's of Datasets

2011-06-09 Thread Corey Richardson
On 06/09/2011 03:49 PM, B G wrote: > I'm trying to analyze thousands of different cancer datasets and run the > same python program on them. I use Windows XP, Python 2.7 and the IDLE > interpreter. I already have the input files in a directory and I want to > learn the syntax for the quickest way

Re: [Tutor] Syntax for Simplest Way to Execute One Python Program Over 1000's of Datasets

2011-06-09 Thread James Reynolds
My advice would be to stay away from generic names, like: for item in items: do stuff with item For a couple of lines its ok, but when programs get large, your program will get confusing even to you as the author. Sometimes, it's best just to do "for all in listx: but I think that's rare. Us

Re: [Tutor] Syntax for Simplest Way to Execute One Python Program Over 1000's of Datasets

2011-06-09 Thread B G
hmm, thanks for the help. So I kinda got it working, although from an efficiency perspective it leaves a lot to be desired. I managed to do the following: 1) Create a script that gives me a list of all the filenames in the folder: path = "...\\Leukemia_Project" i = 0 for (files) in os.walk(path):

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Alan Gauld
"Ashwini Oruganti" wrote Didn't know that! It's interesting that GObject is itself written in C, which is a procedural laguage.. The original implementation of C++ was called cfront which was a preprocessor which converted C++ code into vanilla C ready for compilation. (Actually there was

Re: [Tutor] Syntax for Simplest Way to Execute One Python Program Over1000's of Datasets

2011-06-09 Thread Alan Gauld
"B G" wrote I'm trying to analyze thousands of different cancer datasets and run the same python program on them. I use Windows XP, Python 2.7 and the IDLE interpreter. First thing: Don;t use IODLE as your interpreter. IDLE is a development environment that should not be used for running