Looking for a General Method to Configure Tkinter Widgets

2009-03-02 Thread W. eWatson
],d[2]) stop_time is a string like 10:30:15. -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http

Re: Looking for a General Method to Configure Tkinter Widgets

2009-03-03 Thread W. eWatson
odeits wrote: On Mar 2, 7:14 am, W. eWatson notval...@sbcglobal.net wrote: I'm modifying a Tkinter Python program that uses hard coded initial values for several widgets. For example, latitude = 40. My plan is to put the names and values for configuration purposes into a file. For example

A Simple Menu , Stretching the Window Width--Tkinter

2009-03-03 Thread W. eWatson
there. This is a simple menu. Presently the window shrinks in width the accommodate My Menu, and I see Hello, out th. How do I force the width to accommodate the whole title? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15

Re: Looking for a General Method to Configure Tkinter Widgets

2009-03-03 Thread W. eWatson
W. eWatson wrote: odeits wrote: On Mar 2, 7:14 am, W. eWatson notval...@sbcglobal.net wrote: I'm modifying a Tkinter Python program that uses hard coded initial values for several widgets. For example, latitude = 40. My plan is to put the names and values for configuration purposes

Re: A Simple Menu , Stretching the Window Width--Tkinter

2009-03-03 Thread W. eWatson
http://www.pctools.com/en/spyware-doctor-antivirus/ Yep, that works. Thanks. -- W. eWatson (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 Web Page

Configuration Files and Tkinter--Possible?

2009-03-03 Thread W. eWatson
? -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Configuration Files and Tkinter--Possible?

2009-03-04 Thread W. eWatson
Gabriel Genellina wrote: En Wed, 04 Mar 2009 03:13:43 -0200, W. eWatson notval...@sbcglobal.net escribió: I'm converting a Tkinter program (Win XP) that uses widgets that allows the user to change default values of various parameters like start and stop time in hh:mm:ss, time of exposure

Re: Configuration Files and Tkinter--Possible?

2009-03-04 Thread W. eWatson
Gabriel Genellina wrote: En Wed, 04 Mar 2009 12:12:50 -0200, W. eWatson notval...@sbcglobal.net escribió: That's fine, but I think my problem boils down to one question. There seem to be two ways to communicate with a dialog (I mean a collection of widgets assembled in a window that requires

A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread W. eWatson
is that Python objects to v=. v=Tk.StringVar() AttributeError: class Tk has no attribute 'StringVar' What corrects this? -- W. eWatson (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

Re: A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread W. eWatson
Marc 'BlackJack' Rintsch wrote: On Wed, 04 Mar 2009 10:09:10 -0800, W. eWatson wrote: Here's what I think the author meant in discussing a control variable sample program. http://effbot.org/tkinterbook/entry.htm from Tkinter import * v=Tk.StringVar() e = Entry(master, textvariable=v) e.pack

Re: A Simple Tkinter Control Program--Slight Problem

2009-03-06 Thread W. eWatson
, type(v), type(v.get()) e = Entry(master,textvariable=v) e.pack() b = Button(master, text=Push to Print, width=10, command=mycallback) b.pack() e.focus_set() v.set(123) mainloop() -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time

A Dangling Tk Entry

2009-03-08 Thread W. eWatson
has gone wrong? -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http://mail.python.org/mailman/listinfo

Re: A Dangling Tk Entry

2009-03-08 Thread W. eWatson
r wrote: On Mar 8, 9:34 pm, W. eWatson notval...@sbcglobal.net wrote: Radiboutton(master, textvariable = ... Radiobutton(msster, textvariable = ... Checkbox(master, text=... entry = Entry(master, width=10, ... entry.insert(0,self.slowdown)# testing a default methodology Label( master, text

Re: A Dangling Tk Entry

2009-03-09 Thread W. eWatson
Marc 'BlackJack' Rintsch wrote: On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: You didn't answer my question why entry is necessary at all. The original author thought it was necessary to return entry. I'll give you a peek at a segment of the code I'm working with here: class

Re: A Dangling Tk Entry

2009-03-09 Thread W. eWatson
Marc 'BlackJack' Rintsch wrote: On Mon, 09 Mar 2009 04:22:57 -0700, W. eWatson wrote: Marc 'BlackJack' Rintsch wrote: On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: You didn't answer my question why entry is necessary at all. The original author thought it was necessary to return

Re: A Dangling Tk Entry

2009-03-10 Thread W. eWatson
Rhodri James wrote: On Tue, 10 Mar 2009 04:14:51 -, W. eWatson notval...@sbcglobal.net wrote: Marc 'BlackJack' Rintsch wrote: On Mon, 09 Mar 2009 04:22:57 -0700, W. eWatson wrote: Marc 'BlackJack' Rintsch wrote: On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: You didn't answer

Re: A Dangling Tk Entry

2009-03-10 Thread W. eWatson
== __main__: Process() The next message i send will be a rewrite of this code in a proper Pythonic fashion, this frankly is a plate of spaghetti! -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7 N, 121

Re: A Dangling Tk Entry

2009-03-10 Thread W. eWatson
r wrote: On Mar 10, 10:52 am, W. eWatson notval...@sbcglobal.net wrote: [snip: biting the hand that feeds] This is not the first time you have come to c.l.py with hat in hand seeking help and then scoffed at suggestions made by well respected posters. I should have known you would just do

Re: A Dangling Tk Entry

2009-03-11 Thread W. eWatson
variables. You'll have to be satisfied with what I've said. I have no more to say. All parts of this thread I consider closed. Include me out. -- Yogi Berra -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39

Tkinter--Column Alignment in a Dialog

2009-03-20 Thread W. eWatson
() print setting lat=1.0 long=0.0 root = Tk() root.withdraw() DialogPrototype(root) -- W. eWatson (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 Web Page

Re: Tkinter book on current versions

2009-03-21 Thread W. eWatson
(r252:60911, Dec 1 2008, 17:47:46) If you mean calc1.py, I had no trouble with calc1.py under 2.5, but calc2.py uses Pmw, which I do not have. calc2 has a few problems with mixing tabs and blanks. -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8

Grayson, Tkinter, Chapter 5

2009-03-28 Thread W. eWatson
, combo box, etc in the lower right corner. In fact, I suspect that's exactly it. Well, I just leave this open for comments anyway.It is a very instructive example on grids. -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz

PyFits for Windows?

2009-03-28 Thread W. eWatson
It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? -- W. eWatson (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 Web Page

Re: Geometry package

2009-03-28 Thread W. eWatson
it, the article was aimed at finding the minimal distance between two lines in space. Anyway, the Google tip might get you started. -- W. eWatson (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

Re: PyFits for Windows?

2009-03-29 Thread W. eWatson
Michiel Overtoom wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? According to http://www.stsci.edu/resources/software_hardware/pyfits: PyFITS’s source code is pure Python. It requires Python version 2.3 or newer. PyFITS

Re: PyFits for Windows?

2009-03-29 Thread W. eWatson
John Yeung wrote: On Mar 28, 4:03 pm, Michiel Overtoom mot...@xs4all.nl wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? To install it, unpack the tar file and type: python setup.py install It looks like PyFits is platform

Re: PyFits for Windows?

2009-03-29 Thread W. eWatson
W. eWatson wrote: Michiel Overtoom wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? According to http://www.stsci.edu/resources/software_hardware/pyfits: PyFITS’s source code is pure Python. It requires Python version 2.3

Re: PyFits for Windows?

2009-03-29 Thread W. eWatson
andrew cooke wrote: W. eWatson wrote: I downloaded the tar file, and untarred it with IZarc. That's a strange way to package it, that is, for Windows. This almost suggests not many Win users are using it. One of the pages, http://www.scipy.org/wikis/topical_software/Tutorial, has a lot

Re: PyFits for Windows?

2009-03-30 Thread W. eWatson
W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? I'm now on the scipy mail list. Things look hopeful, according to the first respondent, to meet my criteria mentioned in another sub-thread to this one: I'm hoping the use

Re: PyFits for Windows?

2009-03-31 Thread W. eWatson
W. eWatson wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? I'm now on the scipy mail list. Things look hopeful, according to the first respondent, to meet my criteria mentioned in another sub-thread to this one: I'm hoping

Default Tkinter Structure of a 640x480 PIL BMP File?

2009-04-01 Thread W. eWatson
See Subject. Does it have a header, DIB, palette, and data section? What is the default depth? -- W. eWatson (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 Web

PIL Handbooks

2009-04-02 Thread W. eWatson
some features like digital cameras and scanners. Ah here, http://pypi.python.org/pypi/PIL/1.1.6. Any other news? I'd settle even for a 1.1.5 pdf of the handbook right now. -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time

Re: PIL Handbooks

2009-04-02 Thread W. eWatson
Irmen de Jong wrote: W. eWatson wrote: I'm very new to PIL, and don't see any handbooks for 1.1.6 or the forthcoming 1.1.7. In fact, this looks like the extent of them: * Python Imaging Library Handbook for 1.1.5 (online) * Python Imaging Library Handbook for 1.1.3 (PDF) Somewhere

PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread W. eWatson
is the capability of Tkinter or PIL to allow one to place a transparent layer (mode, I guess in PIL may be roughly equivalent to a layer in tools like Photoshop) on top of an image and then move the transparency around over the image with a mouse? -- W. eWatson

Re: PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread W. eWatson
You got it. That lamda did look a little odd. The white background is opaque and the telescope is seen as green. The program will ask for a file. I didn't write the code. Eric Brunel wrote: W. eWatson wrote: Basically, I'd like to know how one (broadly, e.g., references in Win-land) does IP

Problem with PIL/Tkinter Program Example

2009-04-09 Thread W. eWatson
Something is amiss here. The program produces a canvas in which one can move an object around. The input file is hard coded (see open). If you want to try it, you'll need to provide a file. Python error below. Name space difficulty? #Mouse movement from Tkinter import * import PIL import

Re: Problem with PIL/Tkinter Program Example

2009-04-09 Thread W. eWatson
Peter Otten wrote: W. eWatson wrote: Something is amiss here. The program produces a canvas in which one can move an object around. The input file is hard coded (see open). If you want to try it, you'll need to provide a file. Python error below. Name space difficulty? Traceback (most

Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread W. eWatson
that? Pickle? -- W. eWatson (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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread W. eWatson
Diez B. Roggisch wrote: W. eWatson schrieb: I have an image of described as: Img Info: {} size: (640, 480) format: None mode: P palette: ImagePalette.ImagePalette instance at 0x02393378 bands: ('P',) type: type 'instance' I'd like to write it to a file. Apparently, I need

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread W. eWatson
MRAB wrote: W. eWatson wrote: I have an image of described as: Img Info: {} size: (640, 480) format: None mode: P palette: ImagePalette.ImagePalette instance at 0x02393378 bands: ('P',) type: type 'instance' I'd like to write it to a file. Apparently, I need to convert

Re: Syntax Problem with strptime in Python 2.4

2008-09-08 Thread W. eWatson
Diez B. Roggisch wrote: W. eWatson wrote: Apparently, use of strptime of datetime needs a workaround in Python 2.4 to work properly. The workaround is d = datetime.datetime(*(time.strptime(date_string, format)[0:5])). However, when I try to use it, or even use it the regular way, it fails

Correcting for Drift between Two Dates

2008-09-08 Thread W. eWatson
in hh:mm:ss) to # days + fraction of day, D. I want to multiple D by drift # to get seconds of drift in period, then add it to d2. Results 3 days, 6:00:00 2016-09-04 18:00:00 -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz

Re: Correcting for Drift between Two Dates

2008-09-09 Thread W. eWatson
Steven D'Aprano wrote: On Mon, 08 Sep 2008 21:53:18 -0700, W. eWatson wrote: I have two dates, ts1, ts2 as below in the sample program. I know the clock drift in seconds per day. I would like to calculate the actual date of ts2. See my question at the end of the program. When faced

Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
(s)') ylabel('voltage (mV)') title('About as simple as it gets, folks') grid(True) show() finish() -- W. eWatson (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 Web

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Dennis Lee Bieber wrote: On Sun, 12 Oct 2008 11:24:32 -0700, W. eWatson [EMAIL PROTECTED] declaimed the following in comp.lang.python: available there. I've long forgotten how to get a console window up in Win XP. I can strip it all the code way down to the from, and it will fail the same

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Dennis Lee Bieber wrote: On Sun, 12 Oct 2008 12:56:26 -0700, W. eWatson [EMAIL PROTECTED] declaimed the following in comp.lang.python: Oddly when I use cmd, it gets me to settings and docs. If I try c:\whatever I get a msg, and it remains in the same folder. That's likely

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
John Machin wrote: On Oct 13, 9:07 am, W. eWatson [EMAIL PROTECTED] wrote: I worked my way into the folder where the py program is, but couldn't executed. Just entering aprog.py, run aprog.py or exec aprog.py didn't work. One wouldn't expect the run or the exec to work. Try

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Dennis Lee Bieber wrote: On Sun, 12 Oct 2008 15:07:57 -0700, W. eWatson [EMAIL PROTECTED] declaimed the following in comp.lang.python: I worked my way into the folder where the py program is, but couldn't executed. Just entering aprog.py, run aprog.py or exec aprog.py didn't work

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
please! The rest is about the run time error. This (Pystring) seems quite relevant, but I have no idea what. -- W. eWatson (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

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
, but I have no idea what. +++ -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http

Python IDLE and Access Denied

2008-10-13 Thread W. eWatson
it there. Python 2.4. Suggestions? -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http://mail.python.org/mailman

Re: Python IDLE and Access Denied

2008-10-13 Thread W. eWatson
Dennis Lee Bieber wrote: On Mon, 13 Oct 2008 19:07:06 -0700, W. eWatson [EMAIL PROTECTED] declaimed the following in comp.lang.python: I had just finished working with IDLE, and tried to double-click on a py file. It produced an OK dialog with the path to the file and the msg access denied

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
Terry Reedy wrote: Steve Holden wrote: W. eWatson wrote: I suspect something has been corrupted in Python 2.4. Can I just re-install on top of it, and still expect to have scipy and other pkgs I've installed? On Windows, certainly - you can even uninstall and reinstall and retain your

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
Martin v. Löwis wrote: W. eWatson wrote: I suspect something has been corrupted in Python 2.4. Can I just re-install on top of it On Windows, you shouldn't reinstall, but instead run the repair installation, from Add and remove programs. Regards, Martin Do you mean on the Win Control Panel

Re: Python IDLE and Access Denied

2008-10-14 Thread W. eWatson
W. eWatson wrote: Dennis Lee Bieber wrote: On Mon, 13 Oct 2008 19:07:06 -0700, W. eWatson [EMAIL PROTECTED] declaimed the following in comp.lang.python: I had just finished working with IDLE, and tried to double-click on a py file. It produced an OK dialog with the path to the file

Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
I suspect something has been corrupted in Python 2.4. Can I just re-install on top of it, and still expect to have scipy and other pkgs I've installed? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
there about 5 Python parts in the ARP, and one is Python 2.4.4. There's a Change/Remove, and clicking on Change brings up a Python window to change, remove or repair. What is change? A new version? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-14 Thread W. eWatson
Gabriel Genellina wrote: En Sun, 12 Oct 2008 23:45:15 -0300, W. eWatson [EMAIL PROTECTED] escribió: The meat of the matter is the Fatal error msg I copied below. To me it indicates a serious error. Maybe some developer can sort it out. From above post. ++ Ah

Anyone Have (XP) 2.4.4 Installed and Can Check This Simple matplotlib Program?

2008-10-14 Thread W. eWatson
('Press Enter to Quit') sys.exit() t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t) plot(t, s, linewidth=1.0) xlabel('time (s)') ylabel('voltage (mV)') title('About as simple as it gets, folks') grid(True) show() finish() -- W. eWatson (121.015 Deg. W

Re: Anyone Have (XP) 2.4.4 Installed and Can Check This Simple matplotlib Program?

2008-10-15 Thread W. eWatson
[EMAIL PROTECTED] wrote: On Oct 15, 6:38 am, W. eWatson [EMAIL PROTECTED] wrote: I'm going to try another stab at this problem again. I'd like someone with 2.4.4 and matplotlib-0.98.3.win32-py2.4exe to try it (below). IMHO an important detail of your configuration is missing. What's your

Convertimg a Sequence of Images to an AVI File

2008-10-17 Thread W. eWatson
from them. What in Python will help me do that? -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http

Re: Convertimg a Sequence of Images to an AVI File

2008-10-17 Thread W. eWatson
W. eWatson wrote: I have a file of images shot at a frame rate of 1/30th of a second. They are 640 by 480 bytes followed immediately by up to 200 smaller images 128x128 pixels. The software I'm using will convert this into a mov file. I'd like to simply take the large images out of the file

Filling in Degrees in a Circle (Astronomy)

2008-08-22 Thread W. eWatson
The other night I surveyed a site for astronomical use by measuring the altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north clockwise around the site to 360 degrees, almost north again) of obstacles, trees. My purpose was to feed this profile of obstacles (trees) to an

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-22 Thread W. eWatson
Mensanator wrote: On Aug 22, 6:12 pm, W. eWatson [EMAIL PROTECTED] wrote: The other night I surveyed a site for astronomical use by measuring the altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north clockwise around the site to 360 degrees, almost north again) of obstacles

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
Maric Michaud wrote: Le Saturday 23 August 2008 01:12:48 W. eWatson, vous avez écrit : The other night I surveyed a site for astronomical use by measuring the altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north clockwise around the site to 360 degrees, almost north again

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
Carl Banks wrote: On Aug 22, 7:12 pm, W. eWatson [EMAIL PROTECTED] wrote: Is there some simple operational device in Python that would allow me to create an array (vector) of 360 points from my data by interpolating between azimuth points when necessary? All my data I rounded to the nearest

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
Scott David Daniels wrote: W. eWatson wrote: ... I'm working on this now, but my knowledge of python needs refreshing. Right now I have a file of all the az,el data I've collected, and I'd like to open it with Python for XP. However, Python doesn't like this: junkfile = open('c:\tmp

Total No. of Records in a File?

2008-08-23 Thread W. eWatson
I have an ordinary text file with a CR at the end of a line, and two numbers in each line. Is there some way to determine the number of lines (records) in the file before I begin reading it? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W,

Re: Total No. of Records in a File?

2008-08-23 Thread W. eWatson
the contents of a file without opening and reading that file. W. eWatson wrote: I have an ordinary text file with a CR at the end of a line, and two numbers in each line. Is there some way to determine the number of lines (records) in the file before I begin reading it? -BEGIN PGP SIGNATURE

Re: Total No. of Records in a File?

2008-08-23 Thread W. eWatson
Fredrik Lundh wrote: W. eWatson wrote: I have an ordinary text file with a CR at the end of a line, and two numbers in each line. Is there some way to determine the number of lines (records) in the file before I begin reading it? In the general case, no. A file is just a bunch of bytes

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
I completed a Win Python program and it has generated the necessary data, which I have in turn used successfully with the telescope software. Is there some way to turn this into an executable program for people who do not have Python? -- Wayne Watson (Watson Adventures, Prop.,

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
tom wrote: W. eWatson wrote: The other night I surveyed a site for astronomical use by measuring the altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north clockwise around the site to 360 degrees, almost north again) of obstacles, trees. My purpose was to feed

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
Dennis Lee Bieber wrote: On Fri, 22 Aug 2008 23:18:17 -0700, W. eWatson [EMAIL PROTECTED] declaimed the following in comp.lang.python: I'll take a look. I just posted above yours with a more insightful set of data than the first three pointer. Yes, some way of bisecting, or chopping

Turning py into an Executable Program for Win?

2008-08-23 Thread W. eWatson
How do I get my py code into some executable form so that Win users who don't have python can execute it? -- 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,

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread W. eWatson
tom wrote: W. eWatson wrote: tom wrote: W. eWatson wrote: The other night I surveyed a site for astronomical use by measuring the altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north clockwise around the site to 360 degrees, almost north again) of obstacles, trees. My

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread W. eWatson
David wrote: What modules do I need to use pylab? I've installed scipy and numpy. http://matplotlib.sourceforge.net/ I'm using Python 2.4. The install looks pretty complicated for Windows. It doesn't seem like matplotlib is a module. -- Wayne Watson (Watson Adventures, Prop.,

Date Comparison and Manipulation Functions?

2008-08-24 Thread W. eWatson
Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after 22:02:51? (24 hour day is fine) How about the date after 02/28/04 is 02/29/04, or the date after

Re: Date Comparison and Manipulation Functions?

2008-08-25 Thread W. eWatson
[EMAIL PROTECTED] wrote: check out Pyfdate: http://www.ferg.org/pyfdate from pyfdate import * t = Time().add(hours=14) print It is now, t.wdt datestring1 = 2005/10/05 #year,month,day datestring2 = 2002/09/22 #year,month,day datestring3 = 2007/11/11 #year,month,day year,month,day =

Re: Date Comparison and Manipulation Functions?

2008-08-26 Thread W. eWatson
[EMAIL PROTECTED] wrote: check out Pyfdate: http://www.ferg.org/pyfdate from pyfdate import * t = Time().add(hours=14) print It is now, t.wdt datestring1 = 2005/10/05 #year,month,day datestring2 = 2002/09/22 #year,month,day datestring3 = 2007/11/11 #year,month,day year,month,day =

Re: Date Comparison and Manipulation Functions?

2008-08-26 Thread W. eWatson
John Machin wrote: On Aug 27, 10:21 am, W. eWatson [EMAIL PROTECTED] wrote: I'm using IDLE for Python 2.4, and put pfydate distribution in C:\Python24\Lib\site-packages\pfydate, as required by the ttp://www.ferg.org/pyfdate/download.html page. How to install pyfdate. Save pyfdate.py

Re: Date Comparison and Manipulation Functions?

2008-08-27 Thread W. eWatson
John Machin wrote: On Aug 27, 11:24 am, W. eWatson [EMAIL PROTECTED] wrote: John Machin wrote: On Aug 27, 10:21 am, W. eWatson [EMAIL PROTECTED] wrote: I'm using IDLE for Python 2.4, and put pfydate distribution in C:\Python24\Lib\site-packages\pfydate, as required by the ttp://www.ferg.org

Wild Card String Comparison

2008-08-27 Thread W. eWatson
Is it possible to do a search for a wild card string in another string. For example, I'd like to find v*.dat in a string called bingo. v must be matched against only the first character in bingo, and not simply found somewhere in bingo, as might be the case for *v*.dat. -- Wayne

Re: Wild Card String Comparison

2008-08-27 Thread W. eWatson
Timothy Grant wrote: On Wed, Aug 27, 2008 at 8:49 PM, W. eWatson [EMAIL PROTECTED] wrote: Is it possible to do a search for a wild card string in another string. For example, I'd like to find v*.dat in a string called bingo. v must be matched against only the first character in bingo

Re: Wild Card String Comparison

2008-08-27 Thread W. eWatson
Sean DiZazzo wrote: On Aug 27, 8:49 pm, W. eWatson [EMAIL PROTECTED] wrote: Is it possible to do a search for a wild card string in another string. For example, I'd like to find v*.dat in a string called bingo. v must be matched against only the first character in bingo, and not simply found

Python in a Nutshell -- Book vs Web

2008-08-28 Thread W. eWatson
I read an Amazon of Python in a Nutshell. The first edition is supposedly much like the web site. What web site? The second edition apparently adds more to the book than the web site. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262

Re: Wild Card String Comparison

2008-08-28 Thread W. eWatson
Cameron Laird wrote: In article [EMAIL PROTECTED], W. eWatson [EMAIL PROTECTED] wrote: Is it possible to do a search for a wild card string in another string. For example, I'd like to find v*.dat in a string called bingo. v must be matched against only the first character in bingo

Lining Up and PaddingTwo Similar Lists

2008-08-28 Thread W. eWatson
Maybe there's some function like zip or map that does this. If not, it's probably fairly easy to do with push and pop. I'm just checking to see if there's not some known simple single function that does what I want. Here's what I'm trying to do. I have a list dat like (assume the items are

Re: Lining Up and PaddingTwo Similar Lists

2008-08-28 Thread W. eWatson
castironpi wrote: On Aug 28, 10:50 pm, W. eWatson [EMAIL PROTECTED] wrote: Maybe there's some function like zip or map that does this. If not, it's probably fairly easy to do with push and pop. I'm just checking to see if there's not some known simple single function that does what I want

Tough Guy Competition

2008-08-28 Thread W. eWatson
Something to do on your weekends. http://www.toughguy.co.uk/home.shtml -- W. Watson (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 --

Re: Tough Guy Competition

2008-08-29 Thread W. eWatson
alex23 wrote: On Aug 29, 3:45 pm, W. eWatson [EMAIL PROTECTED] wrote: Something to do on your weekends. [non-related link clipped] Another thing to do with your weekends would be to -not spam-. Sorry, misdirected. -- W. Watson (121.015 Deg. W

Re: Date Comparison and Manipulation Functions?

2008-08-29 Thread W. eWatson
I just tried the following code, and got an unexpected result. from pyfdate import * t = Time() ts = Time(2008, 8, 29,15,20,7) tnew = ts.plus(months=6) print new date: , tnew Result: new date: 2009-02-28 15:20:07 I believe that should be April 1, 2009. If I use months = 1 and day =31, I get

Re: Lining Up and PaddingTwo Similar Lists

2008-08-29 Thread W. eWatson
castironpi wrote: ... I don't think that's guaranteed by anything. I realized that 'dat.sort()' and 'txt.sort()' weren't necessary, since their contents are moved to a dictionary, which isn't sorted. Actually, I'm getting the file names from listdir, and they appear to be sorted low to high.

Re: Date Comparison and Manipulation Functions?

2008-08-29 Thread W. eWatson
John Machin wrote: On Aug 30, 2:32 am, W. eWatson [EMAIL PROTECTED] wrote: I just tried the following code, and got an unexpected result. from pyfdate import * t = Time() ts = Time(2008, 8, 29,15,20,7) tnew = ts.plus(months=6) print new date: , tnew Result: new date: 2009-02-28 15:20:07 I

Re: Date Comparison and Manipulation Functions?

2008-08-30 Thread W. eWatson
John Machin wrote: On Aug 30, 10:41 am, W. eWatson [EMAIL PROTECTED] wrote: What I'm trying to do is adjust date-time stamped file names for date and time errors. The software program collects through a period that roughly coincides with night hours every day and according to the OS clock

Re: Date Comparison and Manipulation Functions?

2008-08-30 Thread W. eWatson
W. eWatson wrote: John Machin wrote: On Aug 30, 10:41 am, W. eWatson [EMAIL PROTECTED] wrote: What I'm trying to do is adjust date-time stamped file names for date and time errors. The software program collects through a period that roughly coincides with night hours every day and according

Re: Date Comparison and Manipulation Functions?

2008-08-30 Thread W. eWatson
John Machin wrote: On Aug 30, 10:41 am, W. eWatson [EMAIL PROTECTED] wrote: What I'm trying to do is adjust date-time stamped file names for date and time errors. The software program collects through a period that roughly coincides with night hours every day and according to the OS clock

Re: Date Comparison and Manipulation Functions?

2008-08-30 Thread W. eWatson
The author has updated the Tutorial and added a flex method. -- http://mail.python.org/mailman/listinfo/python-list

How Compute # of Days between Two Dates?

2008-08-31 Thread W. eWatson
period of time well outside our current era of history. -- W. eWatson (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 Web Page: www.speckledwithstars.net/ -- http

Re: How Compute # of Days between Two Dates?

2008-09-01 Thread W. eWatson
Grant Edwards wrote: On 2008-09-01, W. eWatson [EMAIL PROTECTED] wrote: That's the question in Subject. For example, the difference between 08/29/2008 and 09/03/2008 is +5. The difference between 02/28/2008 and 03/03/2008 is 4, leap year--extra day in Feb. I'm really only interested in years

Re: How Compute # of Days between Two Dates?

2008-09-01 Thread W. eWatson
Grant Edwards wrote: On 2008-09-01, W. eWatson [EMAIL PROTECTED] wrote: Grant Edwards wrote: On 2008-09-01, W. eWatson [EMAIL PROTECTED] wrote: That's the question in Subject. For example, the difference between 08/29/2008 and 09/03/2008 is +5. The difference between 02/28/2008 and 03/03

  1   2   3   4   5   >