Re: [Tutor] Left Alignment -- Tkinter

2009-03-28 Thread Wayne Watson
layout. It took me awhile to see why he needed so many rows and columns for those 9 (actually 10) thumbnails. It's all about what goes on in the lower right corner. Unfortunately, he had no need to align the text to the left uniformly in a column.           WTW W W wrote: On Fri, Mar 27,

Re: [Tutor] Left Alignment -- Tkinter

2009-03-29 Thread Wayne Watson
Title: Signature.html W W wrote: On Sat, Mar 28, 2009 at 9:47 AM, Wayne Watson <sierra_mtnv...@sbcglobal.net> wrote: Hi, that's an interesting way to look at it. Actually, I was about to probe the color idea myself, but needed to better understand how to achieve it

Re: [Tutor] Left Alignment -- Tkinter

2009-03-30 Thread Wayne Watson
ith the new Tkinter. This does not look like rocket science. Just missing parts of the story. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) “Life is one damn thing after another."

[Tutor] Default Structure of a 640x480 PIL BMP File?

2009-03-31 Thread Wayne Watson
Title: Signature.html See Subject. Does it have a header, DIB,  palette, and data section? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the

Re: [Tutor] Left Alignment -- Tkinter

2009-04-01 Thread Wayne Watson
removed quirte a lot of the redundant code that was cluttering things up and moved the frames to beside the widgets that are contained within them. HTH, Alan G. Back from vacation... _______ Tutor maillist  -  Tutor@python.org http://mail

Re: [Tutor] Left Alignment -- Tkinter

2009-04-02 Thread Wayne Watson
Title: Signature.html Yes, thanks, Something for another time and application. W W wrote: On Wed, Apr 1, 2009 at 11:20 PM, Wayne Watson <sierra_mtnv...@sbcglobal.net> wrote: Alan, the game changed in the thread you branched away from to other considerations. As stated there

[Tutor] PIL Handbook in pdf Format?

2009-04-02 Thread Wayne Watson
nothing. BTW, in my search on the web, I stumbled onto free computer e-books. One section was devoted to Python. I found the Subject "book" but it took me right to the web site where it is displayed. No pdf. I guess that's the new definition of a book. -- Wayne Watson (Wa

Re: [Tutor] PIL Handbook in pdf Format?

2009-04-02 Thread Wayne Watson
rding to IDLE. I see something called class browser. Not bad. Looks useful. Ah, I see from the program pdf manual, 1.1.6. Off to the tar ball. Alan Gauld wrote: "Wayne Watson" wrote I plainly had a copy of the Subject pdf in the past. ... .. A search of my PC shows nothing.

Re: [Tutor] PIL Handbook in pdf Format?

2009-04-02 Thread Wayne Watson
hat I previously reported) in the image-SIG mail list.  I seem to have subscribed properly, but the moderator is holding up my posts. It looks like after 1.1.3 there have been casual improvements and bug fixes through 1.1.6. -- Signature.html Wayne Watson (Watson Adventures, Prop.,

[Tutor] Learn as You Go. Tkinter, PIL, Pmw, etc. and Toolkits--Choices

2009-04-04 Thread Wayne Watson
d up doing a lot of needless experimenting that is available some other way. Comments? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the produ

Re: [Tutor] Learn as You Go. Tkinter, PIL, Pmw, etc. and Toolkits--Choices

2009-04-05 Thread Wayne Watson
Title: Signature.html Thanks, very much. Alan Gauld wrote: "Wayne Watson" wrote  I get the feeling, particularly with Tkinter and PIL, that I'm dealing with antiquated  tools, and documentation. They are both quite old and therefore quite stable. The

Re: [Tutor] Learn as You Go. Tkinter, PIL, Pmw, etc. and Toolkits--Choices

2009-04-05 Thread Wayne Watson
Title: Signature.html Alan Gauld wrote: "Wayne Watson" wrote >  The grid is a perfectly good layout manager but like all such >  tools it works in a particular way and has lots of options. Some To me grid looks like simple arithmetic, +, -, * an

Re: [Tutor] Please use plain text.

2009-04-06 Thread Wayne Watson
is large! -- Bob Gailer Chapel Hill NC 919-636-4239 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Wayne Watson (

Re: [Tutor] Please use plain text.

2009-04-06 Thread Wayne Watson
ind it odd, and it seems to happen randomly. bob gailer wrote: Wayne Watson wrote: I'm curious about this request. What mail reader are you using that causes the problem? I use Thunderbird. It is not the cause of the problem. It renders emails exactly as formatted by the sender.

Re: [Tutor] [AstroPy] numarray pdf 1.5 is broken. Using numdisplay, Python, PIL, and Tkinter

2009-04-07 Thread Wayne Watson
s Universität Tübingen Sand 1   -  D-72076 Tübingen schw...@astro.uni-tuebingen.de stefan.schwarzb...@googlemail.com Tel.: 07071/29-78605 --- _______ AstroPy mailing list astr...@scipy.org http://mail.scipy.org/mailman/listinfo/astropy -- Wa

Re: [Tutor] Please use plain text.

2009-04-07 Thread Wayne Watson
ally on top of this non-structured flow, precisely because it is not pre-structured. I nearly never visit forums. Denis -- la vita e estrany ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Wayne

Re: [Tutor] Please use plain text.

2009-04-07 Thread Wayne Watson
Title: Signature.html Anyhow, this discussion has gone way off topic and I suggest all to drop it as it will only lead to flame wars. Greets Sander Maybe President Obama would step in. :-) -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01

[Tutor] Python Lists--A Suggestion

2009-04-07 Thread Wayne Watson
spicious. Now you are stuck in wait mode for approval. I don't really recall if the message gets approved and posted.  What does work is posting as text.  I could be wrong about this, but someone who posts to various Python lists might  know. There are other anomalies, but I'll stop

Re: [Tutor] Python Lists--A Suggestion

2009-04-07 Thread Wayne Watson
Title: Signature.html Perhaps the Pyton organization could produce their mail lists, if they have any control over them. Maybe that's the source of the inconsistency? That is, some are not sponsored by them. Alan Gauld wrote: "Wayne Watson" wrote  I offered in that

Re: [Tutor] Python Lists--A Suggestion

2009-04-07 Thread Wayne Watson
blems. Make a postable web site called something like www.python-tutor-pix-post.net, where one could easily put something there for 30 days. At the end of 30 days, it goes away.   Kent Johnson wrote: On Tue, Apr 7, 2009 at 9:13 PM, Wayne Watson wrote: Perhaps the Pyton organization

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Wayne Watson
Title: Signature.html Sounds fine to me. Is that actually a real link though? If so, who posts there. If not, I'd suggest, www.pytutor-sendspace.com. Kent Johnson wrote: On Tue, Apr 7, 2009 at 11:55 PM, Wayne Watson wrote: My suggestion is aimed at those who want to use gr

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Wayne Watson
Title: Signature.html In my case, it certainly does. In fact, my posts are refused for other python related NGs. :-) From what I can tell via googling, it's not just me. Emile van Sebille wrote: Wayne Watson wrote: Perhaps the Pyton organization could produce their mail lists, if

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Wayne Watson
Title: Signature.html Tried it. No doubt there are many. Kent Johnson wrote: On Wed, Apr 8, 2009 at 4:27 PM, Wayne Watson wrote: Sounds fine to me. Is that actually a real link though? If so, who posts there. If not, I'd suggest, www.pytutor-sendspace.com. Yes

[Tutor] What is Dani Web?

2009-04-09 Thread Wayne Watson
Title: Signature.html See . It seems to a set of forum for a lot of software, including Python. I don't see any explanation of Dani and how it formed. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std.

Re: [Tutor] What is Dani Web?

2009-04-10 Thread Wayne Watson
rc=121&ab=0&u=http%3A%2F%2Fwww.daniweb.com%2Fforums%2Ffaq.php%3Ffaq%3Ddaniweb_faq or shorter http://tinyurl.com/cfsvpa -Original Message- From: Wayne Watson Sent: Apr 9, 2009 11:52 PM To: "tutor@python.org" Subject: [Tutor] What is Dani Web?

[Tutor] Reading a "Raw "Image File

2009-04-12 Thread Wayne Watson
n the image that are pretty bright. So what weirdness took place w/o the 'rb'? Why no 150? One more question, when I tried (no 'wb') read(size=307200), why di read balk at size, syntactically. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

Re: [Tutor] Reading a "Raw "Image File

2009-04-12 Thread Wayne Watson
g the 307200, I found it to be 150, which I believe is correct. That is, there are pixels in the image that are pretty bright. So what weirdness took place w/o the 'rb'? Why no 150? not sure what this means... -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

Re: [Tutor] Using Easygui in Python v3

2009-04-12 Thread Wayne Watson
ading and installing I get a "No module named StringIO" error under Python v3. Before I start digging deeper I thought I'd ask if anyone else had the same problem and knows of a fix? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 D

[Tutor] Tkinter and Antialiasing

2009-04-12 Thread Wayne Watson
If I draw a fairly slanted line across an image using Tkinter, it looks a bit jagged. Is this typical of Tkinter graphics, or is there an option or mechanism that will antialias? Win XP, Python 2.5, Tkinter 8.4. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA

Re: [Tutor] Tkinter and Antialiasing

2009-04-12 Thread Wayne Watson
same results. Tkinter probably uses them anyway. Maybe there's hope when the new PIL is released. Alan Gauld wrote: "Wayne Watson" wrote If I draw a fairly slanted line across an image using Tkinter, it looks a bit jagged. Is this typical of Tkinter graphics, or is there an

[Tutor] Using numpy Array Capabilities

2009-04-12 Thread Wayne Watson
code it? I think numpy produces an array like object, but it's not necessarily the same as Python. However, the numpy arrays are going to be input into an object that expects numpy arrays. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.

Re: [Tutor] Using numpy Array Capabilities

2009-04-13 Thread Wayne Watson
Alan Gauld wrote: "Wayne Watson" wrote Basically, what I would like to do is to take a list like: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] and convert it to; [['0x0', '0x1', '0x2', '0x3', '0x4'], ['0x5', '0x6', &#x

[Tutor] Event Handling--Key Press, Mouse Movement ...

2009-04-13 Thread Wayne Watson
from Alan Gauld, which refers to his web site. Still I'm curious about other sources. The few books I have on Python seem to avoid the subject. Perhaps it goes by another name in Python-ville. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg.

Re: [Tutor] Event Handling--Key Press, Mouse Movement ...

2009-04-13 Thread Wayne Watson
I see between Alan's site and the NM Tech Tkinter manual, that's good coverage for what I need. Wayne Watson wrote: Sometime ago, one of my posts brought a response brief exchange on event handling*. Where might I find more about event handling with respect to the keyboard, and pa

Re: [Tutor] python books

2009-04-15 Thread Wayne Watson
engineers, math-majors, elementary statistics classes, and even upper-level astronomy classes. One can often get a good sense of a book by going to Amazon. They have a Look-Inside feature that allows you to browse parts of many books. -- Wayne Watson (Watson Adventures, Prop.,

[Tutor] Conventional Y Axis Label in pylab plot

2009-04-29 Thread Wayne Watson
I'd like to label the plot axes as x and y. All I see is xlabel and ylabel. ylabel puts y on its side, rotated 90 degrees from the horizontal. Is there way to put it in a normal reading position? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 D

[Tutor] Web Site for Temporarily Posting Pictures for Images of Dialogs?

2009-09-09 Thread Wayne Watson
Some months ago when I was active in modifying a Python program I needed to show members of the group pix of dialogs, and someone or two offered choices for web sites that allow temporary posts. Could someone send me links to some of these? -- Wayne Watson (Watson Adventures, Prop

[Tutor] Anyone with Experience Using WinTV Capture Cards?

2009-09-24 Thread Wayne Watson
dealing with such commercial built capture cards? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "I feel that

[Tutor] Various Topics from IDLE to ImageDraw Options

2008-02-13 Thread Wayne Watson
ere is are there more detailed explanations somewhere for the options? For example, I found a rather helpful document at New Mexico Tech, which goes into considerable detail on options for Tkinter. See page 4 of <http://infohost.nmt.edu/tcc/help/pubs/tkinter.pdf> by John Shipman. --

[Tutor] Understanding the ImageDraw Options

2008-02-13 Thread Wayne Watson
omething similar for ImageDraw? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "I know th

[Tutor] Producing a pop-up on graphics area?

2008-02-15 Thread Wayne Watson
I want to allow a user who is looking at a graphic area that contains an image to be able to right-click on the graphic to produce a menu of choices. What's available to do that? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 3

[Tutor] Following the Mouse in a Graphics Area

2008-02-17 Thread Wayne Watson
. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "I know that this defies the law of gravity, but

[Tutor] tkSimpleDialog, Tkinter, and IDLE

2008-02-18 Thread Wayne Watson
importing the name tkSimpleDialog. Hasn't it just been obtained with from? When I enter import tkinter into IDLE, it objects. However, if I run a program in idle that imports it, then all is OK. What's up there? -- Wayne Watson (Watson Adventures, Prop., Nevad

[Tutor] Putting the Output of Help to a File

2008-02-18 Thread Wayne Watson
See Subject. Is it possible? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "I know th

[Tutor] Saving an Image in a Given Format

2008-03-29 Thread Wayne Watson
dn't work? I see that current_image.convert is involved in one place and current_image.save in the first. What module owns these "current" methods? Hmmm, maybe I needed to use jpeg? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W

Re: [Tutor] Saving an Image in a Given Format

2008-03-29 Thread Wayne Watson
I see that I misunderstood the syntax of Python for: current_image.convert current_image.save current_image is a "pointer" whose type is some class, so convert() and save() must be methods in that class. The question is what class/module? PIL? Wayne Watson wrote: > I'm pr

[Tutor] Diff for Python

2008-04-04 Thread Wayne Watson
Is there a Linux diff-like command for Python code? I'd like to see the difference between two py files. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N

[Tutor] Setting the PC Clock to Correct Time

2008-04-19 Thread Wayne Watson
am is activated at dusk. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "Philosophy

[Tutor] Python open of c:\ path Problem

2008-08-23 Thread Wayne Watson
oblematic segment is just a hack of a similar statement which has the same problem and a much longer path. I suspect the problem is with the back slash. Comments? BTW, how does one continue a long statement that has, say, a long path to a file? -- Wayne Watson (Watson Adventures, Prop.,

[Tutor] Working with IDLE in XP, Set Up for A New Program

2008-08-27 Thread Wayne Watson
folder of my py files, and not somewhere else. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet “We

[Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread Wayne Watson
words not some really strange period of time well outside our current era of history. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121°

[Tutor] Responding to Tutor Posts, Reply-To

2008-09-01 Thread Wayne Watson
a Reply-To, which sends the post to the list. Did I set something up wrong when I subscribed? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121°

Re: [Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread Wayne Watson
Title: Signature.html How do I just get the current time? The following gives me 00:00:00. import datetime dt = datetime.time() print "dt: ", dt greg whittier wrote: On Mon, Sep 1, 2008 at 10:17 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: That's the que

[Tutor] Checking for a Valid Date

2008-09-01 Thread Wayne Watson
ction? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet Interesting government experience prior to thei

[Tutor] Message 'list' object has no attribute 'strptime ?

2008-09-04 Thread Wayne Watson
ribute 'strptime' However, in another function the line   x = time.strptime(fmt_date, "%m %d %Y") with fmt_date = "10 02 2008" works just fine. Does my format string in strptime for time have a problem? If I use the shell to set fmt_time and x = time.strptime(fmt_time, ...,

Re: [Tutor] Message 'list' object has no attribute 'strptime ?

2008-09-04 Thread Wayne Watson
ot;)     nhour   = int(hour)     nminute = int(minute)     nsecond = int(second)     except:     print     print "Invalid date values or format (hh:mm:ss): ", in_time     print "Valid examples: 15:55:02, 8:20:5"     print "Invalid examples: 14: 2:33

[Tutor] Exit from a Program While in IDLE

2008-09-04 Thread Wayne Watson
hen I get to the last line, it exits next. Win XP, Python 2.4. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

[Tutor] Inserting an Indent in IDLE?

2008-09-07 Thread Wayne Watson
Title: Signature.html Occasionally I would like to indent 20-30 lines of code. I don't see a way to do this in IDLE other than brute force. The Replace dialog doesn't seem to offer a way. Does it by any chance use regular expressions to do this? -- Wayne Watson (Watson

[Tutor] Formating from hhmms to hh:mm:ss

2008-09-07 Thread Wayne Watson
me, I have a function that converts hhmmss to hh:mm:ss,  and another to go the other way. In between, I add seconds. Maybe datetime can do this more easily without the use of my functions? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 D

Re: [Tutor] Formating from hhmms to hh:mm:ss

2008-09-07 Thread Wayne Watson
nts of the file and the output.  I'm pretty sure the problem will be identified quickly if you do that. On Sun, Sep 7, 2008 at 6:56 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: I have no idea how the time class module got into this. Possibly it's a remnant of having t

Re: [Tutor] Formating from hhmms to hh:mm:ss

2008-09-07 Thread Wayne Watson
? I need the result 20080321_113405 -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet &q

Re: [Tutor] Formating from hhmms to hh:mm:ss

2008-09-07 Thread Wayne Watson
roblem is reminiscent of my problems. IDLE? Python 2.4.x? Kent Johnson wrote: On Sun, Sep 7, 2008 at 9:33 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: Here's as far as I can go with this. The last line of output asks the question I need an answer for. (Once again my dir

Re: [Tutor] Formating from hhmms to hh:mm:ss

2008-09-07 Thread Wayne Watson
x27; >From a PLEAC web: # The easiest way to convert this to a datetime seems to be; now = datetime.datetime(*time.strptime("16/6/1981", "%d/%m/%Y")[0:5]) # the '*' operator unpacks the tuple, producing the argument list. I tried the [0:6] and it got the same resul

Re: [Tutor] Formating from hhmms to hh:mm:ss

2008-09-08 Thread Wayne Watson
This sure was tricky business, but it's working. Thanks to all who participated. Now if I can my "tutor" posting problem squared away! Kent Johnson wrote: On Sun, Sep 7, 2008 at 11:27 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: Well, maybe. Here'

[Tutor] Dealing with Microseconds

2008-09-10 Thread Wayne Watson
2.74 might be entered.  Using 2.74 for a time that's 24 hours from the base would cause me to record the increase as 2 seconds. How can I account for fractional increases? I see that the tuple allows for microseconds, but I'm not sure arithmetic or formatting is allowed on it.  --

Re: [Tutor] Dealing with Microseconds

2008-09-10 Thread Wayne Watson
.7*3), ... 27 (2.7*10 and not 20), ... Kent Johnson wrote: On Wed, Sep 10, 2008 at 8:13 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: I'd like to allow a user to enter a drift rate in seconds per day into a program along with the date and time, a base, to begin calculation o

[Tutor] Looking at a String as a Struct?

2008-09-11 Thread Wayne Watson
t-name, date_of birth, which consists of month, day, and year, and finally SSN, street_address, state, city, and zip_code. I'd like to access these fields directly instead of lastname = record[38:55]. What if fields are not just strings, but some numeric values? -- Wayne Watson (Wat

Re: [Tutor] Looking at a String as a Struct?

2008-09-11 Thread Wayne Watson
t Johnson wrote: On Thu, Sep 11, 2008 at 6:58 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: Is it possible in Python to look at a string as a "struct". I don't think a struct exists in python. Actually, is there something analogous to a record. In the case of st

Re: [Tutor] Fwd: Looking at a String as a Struct?

2008-09-11 Thread Wayne Watson
t the mess. -- Forwarded message -- From: Jaggo <[EMAIL PROTECTED]> Date: Thu, Sep 11, 2008 at 6:25 PM Subject: Re: [Tutor] Looking at a String as a Struct? To: Wayne Watson <[EMAIL PROTECTED]> I think had I faced this sort of a problem I would've created a Class for 'em

Re: [Tutor] Looking at a String as a Struct?

2008-09-11 Thread Wayne Watson
Title: Signature.html Wayne Watson wrote: Thanks. I had a hunch that might be a good way to do it. I saw something like this in other s/w. Now I know what they were up to. Omer wrote: Class Person:     def __init__(str):         self.Firstname = str[0:4]         self.Surname

[Tutor] No Blank Separator between Date and Time Valid?

2008-09-11 Thread Wayne Watson
0080101_30.27 Enter date and time: 2008/1/100:00:30 <- Why is this valid. The fields are not spearated. dout:  20080110_30 prefix:  v20080110_30.27 OK:  v20080110_30.27 Enter date and time: 2008/1/1 x00:00:30  <- Invalid input caught Invalid date input. Use /

[Tutor] Releasing a File for Access

2008-09-11 Thread Wayne Watson
(input_file):     if j == 0: # replace header     output_file.write("Event time: "+new_event_date)     continue     output_file.write(line) # copy other lines     output_file.close()     input_file.close()     print "modified txt file with event info"     # now c

Re: [Tutor] Releasing a File for Access

2008-09-11 Thread Wayne Watson
e 70 characters per line, and typically no more than 100 lines. I know of no other way to make it faster. It should be sufficient for these purposes. Although I user might try to rename  500 files at a single shot. bob gailer wrote: Wayne Watson wrote: Enclosed is a segment of a program whi

[Tutor] No Blank Separator between Date and Time Valid?

2008-09-12 Thread Wayne Watson
date and time: 2008/1/1 x00:00:30  <- Invalid input caught Invalid date input. Use /mm/dd hh:mm:ss. prefix:  False Enter date and time: end bye ... -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time

Re: [Tutor] Releasing a File for Access

2008-09-12 Thread Wayne Watson
w me to determine if a file is locked, or that I can break the lock at some level. Alan Gauld wrote: "Wayne Watson" <[EMAIL PROTECTED]> wrote I need to use something like sys.exit(). sys.exit won't change the file permissions etc. It simply sets the exit status of the p

Re: [Tutor] Releasing a File for Access

2008-09-12 Thread Wayne Watson
Title: Signature.html I'm using 2.4 for Win. I'll look into the tempfile module. Tim Golden wrote: Wayne Watson wrote: Enclosed is a segment of a program which copies a txt file, but replaces the first line with a new one. The new one has a suffix of tmp. After it executed th

[Tutor] How Fix Misdirected Posts to Tutor

2008-09-12 Thread Wayne Watson
Maybe the solution is to unsubscribe and resubscribe? I'm using SeaMonkey (Mozilla) for mail and browsing. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7&quo

Re: [Tutor] Releasing a File for Access

2008-09-12 Thread Wayne Watson
k at the os module and the stat() function. Take a read of the Using the OS topic in my tutorial for basic info on using all of these features. Alan G. http://www.freenetpages.co.uk/hp/alan.gauld/ -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

Re: [Tutor] No Blank Separator between Date and Time Valid?

2008-09-12 Thread Wayne Watson
Title: Signature.html Ah, thanks. I think I figured it out. It's my wonderful Yahoo/Spamguard. It's  probably holding the messages, including mine(!), on the server in the spam folder. In the meantime I'll look at the URL. Kent Johnson wrote: On Fri, Sep 12, 2008 at 7:28 A

Re: [Tutor] How Fix Misdirected Posts to Tutor

2008-09-12 Thread Wayne Watson
Title: Signature.html Thanks. That seems to work. However, I thought I had experimented with it and found otherwise.  Now to remember to do that. It's the only list I have that requires Reply All. It's certainly working now! Kent Johnson wrote: On Fri, Sep 12, 2008 at 7:39 AM, Wa

[Tutor] SBC/Yahoo and Spamguard--Stuck in Limbo

2008-09-12 Thread Wayne Watson
title of as part of an e-mail address to let the messages through? Presently, I have to go into the Yahoo mailer and move them from the Spam folder into the Inbox. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std

Re: [Tutor] No Blank Separator between Date and Time Valid?

2008-09-12 Thread Wayne Watson
Title: Signature.html Thanks. Yes, 2.4 for Win. Now to find out if the fellow who wrote the s/w package I'm writing a utility for can move his s/w to 2.4. Martin Walsh wrote: Wayne Watson wrote: This program segment allows an invalid date to go undetected. See below.

Re: [Tutor] No Blank Separator between Date and Time Valid?

2008-09-12 Thread Wayne Watson
Do you know of a work around? I can probably provide a simple one by looking for a blank between the time and date. Wayne Watson wrote: Thanks. Yes, 2.4 for Win. Now to find out if the fellow who wrote the s/w package I'm writing a utility for can move his s/w to 2.4. M

Re: [Tutor] Python class at Foothill College

2008-09-12 Thread Wayne Watson
ass, please register beforehand by going to: http://www.foothill.fhda.edu/reg/index.php If you have questions, you can contact the instructor at: [EMAIL PROTECTED] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/t

[Tutor] Sort Output

2008-09-17 Thread Wayne Watson
t sort from making it the same I have to resort to copying b into a first? What is the proper way to retain a variable with the original values of a? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)

[Tutor] deltatime difficulty

2008-09-18 Thread Wayne Watson
round/Utility_Dev/junk.py", line 9, in adjust_ftime     diff = datetime.timedelta(seconds = sec) AttributeError: type object 'datetime.datetime' has no attribute 'timedelta' -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 D

Re: [Tutor] deltatime difficulty

2008-09-18 Thread Wayne Watson
Title: Signature.html Well, that works. Thanks. How do I know what modules (?) or methods are in datetime? greg whittier wrote: On Thu, Sep 18, 2008 at 8:38 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: What's the problem here. It seems right to me. line 9 is diff =...

Re: [Tutor] deltatime difficulty

2008-09-18 Thread Wayne Watson
alidating user input. Otherwise, it's close to release, 600+ lines.  It should be very useful for its purpose, which is to basically re-adjust file time stamps.  This was my baby-steps Python program to get to the next program,, which is a bit more formidable. Martin Walsh wrote: Hi W

[Tutor] Local Unbound Mystery

2008-09-19 Thread Wayne Watson
dia_Meteors\Improved_Sentinel\Sentinel_Playground\Utility_Dev\SU_DateTimeAdjust.py", line 35, in sync_low2high_files     print updown UnboundLocalError: local variable 'updown' referenced before assignment -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA

Re: [Tutor] Local Unbound Mystery

2008-09-19 Thread Wayne Watson
_Dev/debug.py", line 35, in ?     sync_low2high_files()   File "C:/Sandia_Meteors/Improved_Sentinel/Sentinel_Playground/Utility_Dev/debug.py", line 13, in sync_low2high_files     print updown UnboundLocalError: local variable 'updown' referenced before assignment ... http://eff

Re: [Tutor] Local Unbound Mystery

2008-09-20 Thread Wayne Watson
global statement in the full program, and it's working. This was not the case yesterday. I give up trying to explain this. It works as it should, so I'm going to continue making the mods before all this happened. Sander Sweers wrote: On Sat, Sep 20, 2008 at 00:23, Wayne Wa

Re: [Tutor] Local Unbound Mystery

2008-09-20 Thread Wayne Watson
Title: Signature.html Alan Gauld wrote: "Wayne Watson" <[EMAIL PROTECTED]> wrote I do not think I've made an inaccurate observation. Is it possible the IDLE shell is leaving something behind that I can't see? That's very possible. The interpreter will

Re: [Tutor] Local Unbound Mystery

2008-09-20 Thread Wayne Watson
Title: Signature.html Kent Johnson wrote: On Sat, Sep 20, 2008 at 7:26 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: I do not think I've made an inaccurate observation. Is it possible the IDLE shell is leaving something behind that I can't see? Maybe I had two sh

Re: [Tutor] Local Unbound Mystery

2008-09-20 Thread Wayne Watson
HTH, -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "Though no one can go back and make a brand new

Re: [Tutor] Local Unbound Mystery

2008-09-20 Thread Wayne Watson
create keyop in this example. UnboundLocalError: local variable 'updown' referenced before assignment HTH, -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)

Re: [Tutor] Local Unbound Mystery

2008-09-20 Thread Wayne Watson
Title: Signature.html Thanks. Still much to learn. Where is your tutorial? Alan Gauld wrote: "Wayne Watson" <[EMAIL PROTECTED]> wrote tried it, but, once the program ends (or dies?), the DOS-like window disappears. How does one prevent that? Another newbie gotcha! :-)

[Tutor] How Match a Dot?

2008-09-23 Thread Wayne Watson
Title: Signature.html How do I match a dot in, for example, abc.txt? I want to match it exactly. There must be some sort of escape. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time

Re: [Tutor] How Match a Dot?

2008-09-23 Thread Wayne Watson
nks. Kent Johnson wrote: On Tue, Sep 23, 2008 at 10:02 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: How do I match a dot in, for example, abc.txt? I want to match it exactly. There must be some sort of escape. Assuming you want to match in a regular _expression_, use \

[Tutor] Where Does the DOS Window Come From?

2008-09-24 Thread Wayne Watson
I find why it's used? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) "Truth is mighty and will prevail. There is nothing wrong with this, except that it a

Re: [Tutor] Where Does the DOS Window Come From?

2008-09-24 Thread Wayne Watson
of use, I maybe have seen the message twice. It runs every day for about 10 hours per day. I don't think the program stopped when it was issued. Kent Johnson wrote: On Wed, Sep 24, 2008 at 11:36 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: I'm looking at a GUI applicati

<    1   2   3   4   5   >