Re: [Tutor] Const on Python

2008-03-07 Thread Jeff Younker
On Mar 7, 2008, at 7:48 PM, Ricardo Aráoz wrote: > Alan Gauld wrote: > Well, I guess it's about what you think a programmer is. I think if > you > are a "true" programmer you'll be good in ANY language (though you may > have your preferences) and you'll be able to do 80% of your work in > any

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Alan Gauld wrote: > Absolutely. I totally agree that moving an organization to Python > or similar modern language is a sensible move for many applications. > Only where very high performance or scaleability are required would > Python (or similar) be inappropriate and even in the largest > organi

Re: [Tutor] Const on Python

2008-03-07 Thread Andreas Kostyrka
Am Freitag, den 07.03.2008, 21:13 + schrieb Alan Gauld: > Yes but thats not the bit that takes time in my experience its > trying to understand the problem. What exactly am I trying to > do here? Is it a suimulation exercise, a database problem? > A real-time or networking issue? Should my sol

Re: [Tutor] Automating the windows GUI for testing purposes

2008-03-07 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote > I've looked into using pywinauto and also WATSUP. Both are possible > libraries I could use...but they lack the documentation I was hoping > to > hook into. > > Has anyone on this list done this sucessfully before? What > tools/libraries > did you use? I haven't don

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote > That would be true if you assume that your business practices are > established and should remain unchanged. But the essence of business > is > change, if developers all know Java/C++ you could gradually retrain > them > to learn Python. Thats true a

[Tutor] Automating the windows GUI for testing purposes

2008-03-07 Thread lauren
Hello, I will be automating the windows gui for the purposes of writing automated test scripts. I have worked with Ruby before using the watir test library for testing web applications (more or less similar to PAMIE, I believe) - but now I am required to automate some applications running on wind

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Alan Gauld wrote: >> In commercial practice sometimes "political" considerations make for >> crazy decisions, e.g. witnessed by me: > >> 1.) a new web service needs to be developed. >> 2.) the policy of the company is that all developers need to know C > ++/Java. >> snipped... desire to use Python

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Tiago Katcipis wrote: > thanks for the help Andreas, i dont really need that much a const so i > wont do anything like that to have a const like data. I am very used to > java and c++, thats why i always used acess modifier, but i think i can > live without it now i know that it dont exist in py

[Tutor] Creating a Python module to drive a robot

2008-03-07 Thread Shrutarshi Basu
Hi all, I'd like to create a library of functions that would allow writing Python scripts that would control a Hemisson robots via a serial interface. I'll be using the pyserial module heavily, but I'm wondering what would be the best way to approach this . Should I create a "Robot" class and defin

Re: [Tutor] Processing unix style timestamp

2008-03-07 Thread Ravi Kondamuru
Thank you all for your insights. mx.DateTime and feedparser seem to be the easiest to work with. Ravi. On Fri, Mar 7, 2008 at 4:36 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Ravi Kondamuru wrote: > > I looked at datetime, but it seems slightly complex to work with non GMT > > timestamps. > > M

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote in > (Jumping in against my better judgment :-) :-) > Hmm...sure, programming is not about typing, it is about figuring > out > what to type. With Python the conceptual activity takes place at a > higher level because - Python provides easy-to-use, high-

Re: [Tutor] identifying the calling module/function

2008-03-07 Thread Jeff Younker
On Mar 7, 2008, at 6:04 AM, [EMAIL PROTECTED] wrote: > Kent Johnson schrieb: >> >> Why do you need to do this? It sounds like a design change is needed. >> Anyway the answer to your question is yes. This recipe should point >> you >> in the right direction: >> http://aspn.activestate.com/ASPN/Co

Re: [Tutor] identifying the calling module/function

2008-03-07 Thread Andreas Kostyrka
There are basically a number of things you might want: 1.) sys.argv[0] 2.) __main__.__file__ 3.) sys._getframe The first two will tell which script is the main program. The last one will tell you which function has called you. But as Kent has pointed out, this is rarely a good idea. Actually, it

Re: [Tutor] identifying the calling module/function

2008-03-07 Thread tetsuo2k6
Kent Johnson schrieb: > [EMAIL PROTECTED] wrote: >> Hello Tutor! >> >> I am building a couple of scripts to manage a database for our >> company. The projects name is 'dgf'. As a lot of the functionality is >> used in more than one of these scripts, I moved this functionality to >> a module (dgf

Re: [Tutor] identifying the calling module/function

2008-03-07 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hello Tutor! > > I am building a couple of scripts to manage a database for our company. > The projects name is 'dgf'. As a lot of the functionality is used in > more than one of these scripts, I moved this functionality to a module > (dgf.py). It has several function

Re: [Tutor] Const on Python

2008-03-07 Thread Kent Johnson
Alan Gauld wrote: > The problem is as > Fred Brooks stated in his essay "No Silver Bullet" that the > real costs in development are the intengibles - the time > spent thinking about theproblem/solution and dealing with people. > They far outweigh the time actually writing code. The average > projec

[Tutor] identifying the calling module/function

2008-03-07 Thread tetsuo2k6
Hello Tutor! I am building a couple of scripts to manage a database for our company. The projects name is 'dgf'. As a lot of the functionality is used in more than one of these scripts, I moved this functionality to a module (dgf.py). It has several functions now. Question: Is there an easy wa

Re: [Tutor] Processing unix style timestamp

2008-03-07 Thread Kent Johnson
Ravi Kondamuru wrote: > I looked at datetime, but it seems slightly complex to work with non GMT > timestamps. Mark Pilgrim's Universal Feed Parser includes a robust date parser that works with your sample: In [1]: import feedparser as fp In [2]: fp._parse_date('Mon Feb 11 01:34:52 CST 2008') Ou

Re: [Tutor] Processing unix style timestamp

2008-03-07 Thread Alan Gauld
"John Fouhy" <[EMAIL PROTECTED]> wrote > You should be able to parse the former with strptime(). You could > then build a dictionary mapping timezones to offsets which you could > add to the parsed time to produce a time in GMT. Just to point out that to do this accurately is incredibly difficu

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
"Andreas Kostyrka" <[EMAIL PROTECTED]> wrote > Yes, the problem is, that these guys are anyway forced to have > Python/Erlang developers on board, because of external opensource > components they need to maintain. And that one fact completely changes the economics and thereby renders the lead pos

Re: [Tutor] Processing unix style timestamp

2008-03-07 Thread Martin Walsh
Ravi Kondamuru wrote: > Hi, > > I have a log file that prints the date and time in the following format: > Mon Feb 11 01:34:52 CST 2008 > I am expecting multiple timezone entries (eg: PST, PDT and GMT) on the > system running in America/Los Angeles time zone. > I am looking for a way to internally