Re: Python Interview Questions

2012-07-09 Thread rusi
On Jul 10, 4:40 am, Roy Smith wrote: > In article , >  Christian Heimes wrote: > > > Am 09.07.2012 23:22, schrieb Peter: > > > One of my favourite questions when interviewing - and it was 100% reliable > > > :-) - "what are your hobbies?" > > > > If the answer included programming then they were

Re: How can I disable module of tkinter when compiling Python 2.5 on redhat9 ?

2012-07-09 Thread Tim Roberts
cheetah wrote: > >I don't need it. It's not worth worrying about. You're talking about way less than a megabyte of disk space, and there is no performance penalty unless you're using it. In general, the parts of the Python standard library are not individually selectable. -- Tim Roberts, t...@

RE: Python Interview Questions

2012-07-09 Thread Shambhu Rajak
I agree with Christian, a developer should have hobbies other than computer stuffs. Versatile environment give more Ability to think differently. I like playing guitar :-) Be enthu, run foolishly and learn intelligently. -Shambhu -Original Message- From: Christian Heimes [mailto:li...

How to pick content from html using beatifulsoup

2012-07-09 Thread Sheetal Singh
Hi, I am a newbie in python, I need to fetch names of side filters and save in csv [PFA screen shot]. Following is snippet from code: soup = BeautifulStoneSoup(html) #for e in soup.findAll('div'): # for c in e.findAll('h3'): #for d in

Re: How to safely maintain a status file

2012-07-09 Thread alex23
On Jul 10, 6:24 am, John Nagle wrote: > That's because you're using the wrong approach. See how to use > ReplaceFile under Win32: > > http://msdn.microsoft.com/en-us/library/aa365512%28VS.85%29.aspx I'm not convinced ReplaceFile is atomic: "The ReplaceFile function combines several steps within

Re: Python Interview Questions

2012-07-09 Thread Mark Lawrence
On 10/07/2012 00:33, Christian Heimes wrote: Am 09.07.2012 23:22, schrieb Peter: One of my favourite questions when interviewing - and it was 100% reliable :-) - "what are your hobbies?" If the answer included programming then they were hired, if not, then they went to the "B" list. on the

Re: Python Interview Questions

2012-07-09 Thread Tim Chase
On 07/09/12 19:27, Roy Smith wrote: >> prefer folks that know which features to check availability for >> deployment. > > Heh. Tell me, when did strings get methods? :-) IIRC, ~2.0? I'm cognizant of the shift happening from the string module to string methods, but I wouldn't expect deep history

Re: Python Interview Questions

2012-07-09 Thread Roy Smith
In article , Tim Chase wrote: > As mentioned in another branch of this thread, I don't require > python historians, but do prefer folks that know which features to > check availability for deployment. Heh. Tell me, when did strings get methods? :-) -- http://mail.python.org/mailman/listinfo/p

Re: Python Interview Questions

2012-07-09 Thread Tim Chase
On 07/09/12 19:01, dnca...@gmail.com wrote: > The set of questions I'm not sure I understand is the 'What > version did ... appear?' questions. This, to me, doesn't seem to > indicate any programming experience or expertise. A question > asking 'Do you understand different versions?' and 'How wou

Re: Python Interview Questions

2012-07-09 Thread dncarac
Tim, I've read your list and with one exception it all looks very reasonable. (As an hobbiest, I'm amazed at just how much I have picked up.) The set of questions I'm not sure I understand is the 'What version did ... appear?' questions. This, to me, doesn't seem to indicate any programming

Re: Python Interview Questions

2012-07-09 Thread Christian Heimes
Am 10.07.2012 01:40, schrieb Roy Smith: > Do you really want to make hire/no-hire decisions based on somebody's > ability to second-guess what you probably wanted to hear when you asked > a pointless question? I don't want her/him to second-guess at all. I expect a straight and honest answer. Se

Re: Python Interview Questions

2012-07-09 Thread Emile van Sebille
On 7/9/2012 2:22 PM Peter said... One of my favourite questions when interviewing - and it was 100% reliable :-) - "what are your hobbies?" If the answer included programming then they were hired, if not, then they went to the "B" list. In my experience, anybody who is really interested in pr

Re: Python Interview Questions

2012-07-09 Thread Roy Smith
In article , Christian Heimes wrote: > Am 09.07.2012 23:22, schrieb Peter: > > One of my favourite questions when interviewing - and it was 100% reliable > > :-) - "what are your hobbies?" > > > > If the answer included programming then they were hired, if not, then they > > went to the "B" l

Re: Python Interview Questions

2012-07-09 Thread Tim Chase
On 07/09/12 18:12, Cameron Simpson wrote: > On 09Jul2012 18:53, Devin Jeanpierre wrote: > | On Mon, Jul 9, 2012 at 5:22 PM, Peter wrote: > | > One of my favourite questions when interviewing - and it was 100% > reliable :-) - "what are your hobbies?" > | > If the answer included programming then

Re: How to safely maintain a status file

2012-07-09 Thread Christian Heimes
Am 09.07.2012 22:24, schrieb John Nagle: > Rename on some file system types (particularly NFS) may not be atomic. The actual operation is always atomic but the NFS server may not notify you about success or failure atomically. See http://linux.die.net/man/2/rename, section BUGS. > That's b

Re: Python Interview Questions

2012-07-09 Thread Tim Chase
On 07/09/12 17:53, Devin Jeanpierre wrote: >> One of my favourite questions when interviewing - and it was >> 100% reliable :-) - "what are your hobbies?" If the answer >> included programming then they were hired, if not, then they >> went to the "B" list. > > Woe is the poor college grad, who wa

Re: Python Interview Questions

2012-07-09 Thread Christian Heimes
Am 09.07.2012 23:22, schrieb Peter: > One of my favourite questions when interviewing - and it was 100% reliable > :-) - "what are your hobbies?" > > If the answer included programming then they were hired, if not, then they > went to the "B" list. on the contrary! When a potential candidate ha

Re: Python Interview Questions

2012-07-09 Thread Cameron Simpson
On 09Jul2012 18:53, Devin Jeanpierre wrote: | On Mon, Jul 9, 2012 at 5:22 PM, Peter wrote: | > One of my favourite questions when interviewing - and it was 100% reliable :-) - "what are your hobbies?" | > If the answer included programming then they were hired, if not, then they went to the "B"

Re: Python Interview Questions

2012-07-09 Thread Roy Smith
In article , Peter wrote: > One of my favourite questions when interviewing - and it was 100% reliable > :-) - "what are your hobbies?" "My hobby happens to be gardening, for which I don't expect to be paid." -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-07-09 Thread Cameron Simpson
On 09Jul2012 11:44, Rick Johnson wrote: | On Jul 9, 12:40 pm, Tim Chase wrote: | > The second[or higher]-order | > ignorance of not knowing what pdb is (or, if you need more powerful | > debugging, how to do it) is sign the person hasn't been programming | > in Python much. | | So guru knowledge

Re: Python Interview Questions

2012-07-09 Thread Devin Jeanpierre
On Mon, Jul 9, 2012 at 5:22 PM, Peter wrote: > One of my favourite questions when interviewing - and it was 100% reliable > :-) - "what are your hobbies?" > If the answer included programming then they were hired, if not, then they > went to the "B" list. Woe is the poor college grad, who wants

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Chris Angelico
On Tue, Jul 10, 2012 at 3:49 AM, Rick Johnson wrote: > ALL event handlers should marked as *event > handlers* using a prefix. I like to use the prefix "evt". Some people > prefer other prefixes. In any case, just remember to be consistent. > Also, event handler names should reflect WHAT event they

Re: How to safely maintain a status file

2012-07-09 Thread Dan Stromberg
On Mon, Jul 9, 2012 at 8:24 PM, John Nagle wrote: > On 7/8/2012 2:52 PM, Christian Heimes wrote: > >> You are contradicting yourself. Either the OS is providing a fully >> atomic rename or it doesn't. All POSIX compatible OS provide an atomic >> rename functionality that renames the file atomical

Re: Python Interview Questions

2012-07-09 Thread Peter
One of my favourite questions when interviewing - and it was 100% reliable :-) - "what are your hobbies?" If the answer included programming then they were hired, if not, then they went to the "B" list. In my experience, anybody who is really interested in programming will have it as a hobby (

Re: How to safely maintain a status file

2012-07-09 Thread Michael Hrivnak
Please consider batching this data and doing larger writes. Thrashing the hard drive is not a good plan for performance or hardware longevity. For example, crawl an entire FQDN and then write out the results in one operation. If your job fails in the middle and you have to start that FQDN over,

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Frederic Rentsch
On Mon, 2012-07-09 at 10:49 -0700, Rick Johnson wrote: > On Jul 9, 12:58 am, Terry Reedy wrote: > > When posting problem code, you should post a minimal, self-contained > > example that people can try on other systems and versions. Can you > > create the problem with one record, which you could gi

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Frederic Rentsch
On Mon, 2012-07-09 at 01:58 -0400, Terry Reedy wrote: > On 7/8/2012 5:19 PM, Frederic Rentsch wrote: > > Hi widget wizards, > > > > The manual describes the "event" attribute "widget" as "The widget > > which generated this event. This is a valid Tkinter widget instance, not > > a name. This at

Re: How to safely maintain a status file

2012-07-09 Thread John Nagle
On 7/8/2012 2:52 PM, Christian Heimes wrote: You are contradicting yourself. Either the OS is providing a fully atomic rename or it doesn't. All POSIX compatible OS provide an atomic rename functionality that renames the file atomically or fails without loosing the target side. On POSIX OS it doe

Re: Python Interview Questions

2012-07-09 Thread Demian Brecht
On Monday, 9 July 2012 10:40:59 UTC-7, Tim Chase wrote: > On 07/09/12 08:25, Roy Smith wrote: > >> On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote: > > > >>> - more detailed questions about the std. libraries (such as > >>>datetime/email/csv/zipfile/networking/optparse/unittest)

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Terry Reedy
On 7/9/2012 1:49 PM, Rick Johnson wrote: On Jul 9, 12:58 am, Terry Reedy wrote: When posting problem code, you should post a minimal, self-contained example that people can try on other systems and versions. Can you create the problem with one record, which you could give, and one binding? Do y

Re: Python Interview Questions

2012-07-09 Thread Rick Johnson
On Jul 9, 12:40 pm, Tim Chase wrote: > The second[or higher]-order > ignorance of not knowing what pdb is (or, if you need more powerful > debugging, how to do it) is sign the person hasn't been programming > in Python much. So guru knowledge of pdb is prerequisite to being accepted as a Pythonis

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Rick Johnson
On Jul 9, 12:58 am, Terry Reedy wrote: > When posting problem code, you should post a minimal, self-contained > example that people can try on other systems and versions. Can you > create the problem with one record, which you could give, and one > binding? Do you need 4 fields, or would 1 'work'?

Re: Python Interview Questions

2012-07-09 Thread Tim Chase
On 07/09/12 08:25, Roy Smith wrote: >> On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote: > >>> - more detailed questions about the std. libraries (such as >>>datetime/email/csv/zipfile/networking/optparse/unittest) > > You need to be careful when you ask questions like this. I wo

Re: tiffany 0.6.1 released

2012-07-09 Thread Christian Tismer
On 30.06.12 18:25, Paul Rubin wrote: Christian Tismer writes: Tiffany stands for any tiff. The tiny module solves a large set of problems, has no dependencies and just works wherever Python works. Tiffany was developed in the course of the *DiDoCa* project and will always appear on PyPi. This

Re: Discussion on some Code Issues

2012-07-09 Thread Chris Angelico
On Mon, Jul 9, 2012 at 10:24 PM, Steven D'Aprano wrote: > But it does depend on context. Sometimes you need more detail than just > "Python looks". You need to know precisely *how* Python looks, and how it > decides whether it has found or not. Agreed. So, looking back at the original context: A

Re: How to safely maintain a status file

2012-07-09 Thread Duncan Booth
Richard Baron Penman wrote: > Is there a better way? Or do I need to use a database? Using a database would seem to meet a lot of your needs. Don't forget that Python comes with a sqlite database engine included, so it shouldn't take you more than a few lines of code to open the database once

Re: Deditor 0.4.0

2012-07-09 Thread Kruptein
Op maandag 9 juli 2012 14:54:03 UTC+2 schreef Jean-Michel Pichavant het volgende: > Kruptein wrote: > > Op maandag 9 juli 2012 13:05:58 UTC+2 schreef Jean-Michel Pichavant het > > volgende: > > > >> Kruptein wrote: > >> > >>> Hey I released a new version of my python-focused text-editor.

Re: Python Interview Questions

2012-07-09 Thread Roy Smith
In article <3e0ef383-9615-4b4d-89c1-e55199711...@googlegroups.com>, yeryomin.i...@gmail.com wrote: > On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote: > > - more detailed questions about the std. libraries (such as > >datetime/email/csv/zipfile/networking/optparse/unittest) You

Re: Deditor 0.4.0

2012-07-09 Thread Jean-Michel Pichavant
Kruptein wrote: Op maandag 9 juli 2012 13:05:58 UTC+2 schreef Jean-Michel Pichavant het volgende: Kruptein wrote: Hey I released a new version of my python-focused text-editor. you can download it at http://launchpad.net/deditor What is it? Deditor is aimed to be a text-editor which c

how to write configure

2012-07-09 Thread contro opinion
PyGObject uses the standard autotools for the build infrastructure. To build, it should be as simple as running: $ ./configure --prefix= my python2.7 is in /usr/lib/python2.7 will i write : ./configure --prefix=/usr/lib/python2.7 or ./configure --prefix=/usr/lib -- http://mail.python

Re: Discussion on some Code Issues

2012-07-09 Thread Steven D'Aprano
On Mon, 09 Jul 2012 18:41:28 +1000, Chris Angelico wrote: > Does it really hurt to anthropomorphize Don't anthropomorphise computers. They don't like it when you do. > and say that "Python looks for > modules in the directories in sys.path" instead of "Module lookup > consists of iterating bla

recompiling standard modules

2012-07-09 Thread Rita
I noticed that active state python Tk inter isnt compiled with --enable-threads therefore I would like to recompile the module with a new version of TCL/TK which is compiled with threads. How can I do this? -- --- Get your facts first, then you can distort them as you please.-- -- http://mail.

Re: Deditor 0.4.0

2012-07-09 Thread Kruptein
Op maandag 9 juli 2012 13:05:58 UTC+2 schreef Jean-Michel Pichavant het volgende: > Kruptein wrote: > > Hey I released a new version of my python-focused text-editor. > > you can download it at http://launchpad.net/deditor > > > > What is it? > > Deditor is aimed to be a text-editor which can be u

Re: Deditor 0.4.0

2012-07-09 Thread Jean-Michel Pichavant
Kruptein wrote: Hey I released a new version of my python-focused text-editor. you can download it at http://launchpad.net/deditor What is it? Deditor is aimed to be a text-editor which can be used as a basic text-editor as gedit or with the right plugins become a full-feature ide. I focus on m

Re: Python Interview Questions

2012-07-09 Thread Tim Chase
On 07/09/12 01:39, yeryomin.i...@gmail.com wrote: > On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote: yes, yes I did, almost 5 years ago. :-) You didn't include any questions/comments on my email, so it's a bit hard to respond. >> While I haven't interviewed precisely for Python, I'v

Re: migrating from python 2.4 to python 2.6

2012-07-09 Thread Mark Lawrence
On 09/07/2012 10:37, Mark Devine wrote: Hi I have a large code base that was written in python 2.4. I want to migrate to python 2.6. Are there any tools that will aid me in this migration? Thanks A Check the what's new for python 2.6. If, and I doubt that there are, any compatabilty issu

Re: How can I disable module of tkinter when compiling Python 2.5 on redhat9 ?

2012-07-09 Thread Putilov Roman
09.07.12 13:21, cheetah ?: I don't need it. thanks In python's setup.py replace: self.detect_tkinter(inc_dirs, lib_dirs) of def detect_modules(self): This will ignore the compilation of _tkinter.c and tkappinit.c of the python distribution. -- http://mail.python.org/mailman/list

migrating from python 2.4 to python 2.6

2012-07-09 Thread Mark Devine
Hi I have a large code base that was written in python 2.4. I want to migrate to python 2.6. Are there any tools that will aid me in this migration? Thanks A -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-09 Thread Nobody
On Sun, 08 Jul 2012 22:57:56 +0200, Laszlo Nagy wrote: > Yes, this is much better. Almost perfect. Don't forget to consult your > system documentation, and check if the rename operation is atomic or not. > (Most probably it will only be atomic if the original and the renamed file > are on the same

Re: Discussion on some Code Issues

2012-07-09 Thread Chris Angelico
On Mon, Jul 9, 2012 at 10:57 AM, Steven D'Aprano wrote: > On Mon, 09 Jul 2012 07:54:47 +1000, Chris Angelico wrote: > >> It's like >> the difference between reminder text on a Magic: The Gathering card and >> the actual entries in the Comprehensive Rules. Perfect example is the >> "Madness" abilit

Re: How to safely maintain a status file

2012-07-09 Thread Christian Heimes
Am 09.07.2012 07:50, schrieb Plumo: >> Windows doesn't suppport atomic renames if the right side exists. I >> suggest that you implement two code paths: > > Problem is if the process is stopped between unlink and rename there > would no status file. Yeah, you have to suffer all of Windows' design

How can I disable module of tkinter when compiling Python 2.5 on redhat9 ?

2012-07-09 Thread cheetah
I don't need it. thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-07-09 Thread yeryomin . igor
On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote: > > I have used Python for a couple of projects last year and > > I found it extremely useful. I could write two middle size > > projects in 2-3 months (part time). Right now I am a bit > > rusty and trying to catch up again with Pyth