Re: [Tutor] time(duration) formats & basic time math query

2006-07-05 Thread Dustin J. Mitchell
kevin parks wrote: > I have been handed a huge number of documents which have hundreds of > pages of times and durations, all calculated and notated by several > different people over the course of many years. Sadly, no made any > guidelines at all about how this work would proceed and all th

[Tutor] time(duration) formats & basic time math query

2006-07-05 Thread kevin parks
I have been handed a huge number of documents which have hundreds of pages of times and durations, all calculated and notated by several different people over the course of many years. Sadly, no made any guidelines at all about how this work would proceed and all the documenters had their o

Re: [Tutor] what %s=%s means?

2006-07-05 Thread Andre Engels
2006/7/6, 韩宪平 <[EMAIL PROTECTED]>: > I realy new to python.I try on learning it by code examples.The > following one from "Dive into python": > > def buildConnectionString(params): > """Build a connection string from a dictionary of parameters. > > Returns string.""" > return ";".join([

Re: [Tutor] what %s=%s means?

2006-07-05 Thread w chun
On 7/5/06, Ismael Garrido <[EMAIL PROTECTED]> wrote: 韩宪平 wrote: > > Returns string.""" > return ";".join(["%s=%s" % (k, v) for k, v in params.items()]) > > Whant ";"means > %s=%s? > join? > help(items) no matched. > Where can i find stuff helpful? "%s" % (param) is called strin

Re: [Tutor] program-code dilemma

2006-07-05 Thread Senthil_OR
-Original Message- From: Damian Sent: Wednesday, July 05, 2006 12:36 PM To: tutor@python.org Subject: [Tutor] program-code dilemma Although, from what I've found I been able to get this conclusions. Program.- A sequence of instructions that can be executed by the computer. Code.

Re: [Tutor] what %s=%s means?

2006-07-05 Thread Ismael Garrido
韩宪平 wrote: > I realy new to python.I try on learning it by code examples.The > following one from "Dive into python": > > def buildConnectionString(params): > """Build a connection string from a dictionary of parameters. > > Returns string.""" > return ";".join(["%s=%s" % (k, v) for k,

[Tutor] what %s=%s means?

2006-07-05 Thread 韩宪平
I realy new to python.I try on learning it by code examples.The following one from "Dive into python": def buildConnectionString(params): """Build a connection string from a dictionary of parameters. Returns string.""" return ";".join(["%s=%s" % (k, v) for k, v in params.items()]) if

Re: [Tutor] I Give Up. - Follow up post

2006-07-05 Thread Alan Gauld
> Comes from wanting to minimize how much stuff I have loaded into > memory, and my impression is, a dictionary of 2 elements (name:value > pairs) > takes up more space in memory than two single variables (name points > to value in memory), Dangerous assumption since Python ultimately uses dict

[Tutor] ANN: (Intensive) Intro to Python course, Aug 16-18, San Francisco

2006-07-05 Thread w chun
Greetings! Below is the announcement we've just made this morning to CLP about our upcoming Python course. Please forward this msg to anyone whom you think would be interested or would benefit from Python training courses. This includes Plone, Zope, Django, TurboGears, and Mailman groups as well

Re: [Tutor] I Give Up. - Follow up post

2006-07-05 Thread Brian Gustin
> > The other alternative is to provide a tool for editing the file in which > case the format is less important sionce hiumans "never" need to > touch it. > Heh. good analysis.. now I feel a little dumb- I should have thought of this *LONG* ago. yeah I knew about the xml parser , and how to do

Re: [Tutor] modbus communication with python?

2006-07-05 Thread Jason Massey
Googling for modbus python turned up:https://lintouch.org/repos/lintouch/lsp-modbus/trunk/tests/ On 7/5/06, Jeff Peery <[EMAIL PROTECTED]> wrote: Hello, I need to talk read write to a modbus so that I can work with a PLC. I have not a clue how this all works. does python have a modbus module or whe

[Tutor] modbus communication with python?

2006-07-05 Thread Jeff Peery
Hello, I need to talk read write to a modbus so that I can work with a PLC. I have not a clue how this all works. does python have a modbus module or where might I look to find how to do this? thanks.Jeff How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.__

[Tutor] modbus communication with python?

2006-07-05 Thread Jeff Peery
Hello, I need to talk read write to a modbus so that I can work with a PLC. I have not a clue how this all works. does python have a modbus module or where might I look to find how to do this? thanks.Jeff Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta._

Re: [Tutor] More assistance with queues and global variables

2006-07-05 Thread Tino Dai
On 7/5/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Tino Dai wrote:> Hi All,>>  My project is almost working (and without global variables!), and> there is one more hurdle that I want to jump. That is using the> SocketServer module and passing a queue (or for that matter any kind > of variable)

Re: [Tutor] More assistance with queues and global variables

2006-07-05 Thread Kent Johnson
Tino Dai wrote: > Hi All, > > My project is almost working (and without global variables!), and > there is one more hurdle that I want to jump. That is using the > SocketServer module and passing a queue (or for that matter any kind > of variable) to the handle method. I took a look at Sock

[Tutor] More assistance with queues and global variables

2006-07-05 Thread Tino Dai
Hi All, My project is almost working (and without global variables!), and there is one more hurdle that I want to jump. That is using the SocketServer module and passing a queue (or for that matter any kind of variable) to the handle method. I took a look at SocketServer to see what classes I n

Re: [Tutor] Two Newbile Questions: porting drawmap.c, & Python as a lifetime language

2006-07-05 Thread Python
On Tue, 2006-07-04 at 16:37 -0500, [EMAIL PROTECTED] wrote: > I am seeking opinions from seasoned veterans on the following two > questions: > You're getting plenty of replies. Here's a bit more. You're probably aware that ESRI has adopted Python for scripting with their applications. > 1. What

Re: [Tutor] Two Newbile Questions: porting drawmap.c, & Python as a lifetime language

2006-07-05 Thread Alan Gauld
I missed the original post but I'll chip in anyway... > [EMAIL PROTECTED] wrote: >> 2. Seeing Python hailed as a good language for learning >> programming, how do you rate it as a lifetime language? (I can >> imagine that many people have settled into one language for doing >> the remainder of

Re: [Tutor] program-code dilemma

2006-07-05 Thread Alan Gauld
> Lately I've been researching about the general definitions of > program > and code, and I've realized that the difference is not so convincent > (without mentioning simple and precise); that's why I'm sending > this. It is very confusing especially for beginners, partly because both words have

[Tutor] I Give Up. - Follow up post

2006-07-05 Thread János Juhász
Dear Brian, The best parser is python itself :) let's make ports.py with your original content: http = 80 https = 443 http1 = 81 smtp = 25 smtp2 = 587 In this case, you can import ports.py with simple >>> import ports >>> ports.http 80 >>> You don't need to define a new file format, just use

Re: [Tutor] I Give Up. - Follow up post

2006-07-05 Thread Alan Gauld
>> >> ### machine_config.py >> machines = { 'apache': ('http', 80), >> ## fill me in with the config of other machines >> } >> >> >> could be used as your configuration file format. The value portion >> of a >

[Tutor] program-code dilemma

2006-07-05 Thread Damian
Lately I've been researching about the general definitions of program and code, and I've realized that the difference is not so convincent (without mentioning simple and precise); that's why I'm sending this. My frame of reference has been very reliable (several programming books, dictionaries,