Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
That's completely unnecessary. Just pass a set of time,value pairs and they'll get plotted as desired. -- Grant Edwards grante Yow! As a FAD follower, at my BEVERAGE choices are visi.comrich and fulfilling! -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-20 Thread Grant Edwards
On 2005-10-20, Grant Edwards <[EMAIL PROTECTED]> wrote: >> and insert None (or whatever value is used by charting >> package) for times where observations were not taken. This >> will mean that you have to preprocess your data by determining >> a time step step valu

Re: Accessing a dll from Python

2005-10-21 Thread Grant Edwards
; a VB project just including it in the references > configuration. But I can't access it from python. I tried the > ctypes module. ctypes has always worked for me. Sorry, I've no clue about anything VB-related unless it's Victoria Bitter. -- Grant Edwards

Re: Set an environment variable

2005-10-21 Thread Grant Edwards
calls a .sh script that executes the > export command and then calls another .py script (and how would the > first .py script look)? Good grief, that's ugly. Just use os.putenv(). > That would be much more what is my basic problem. And even Google knows the correct answer http

Re: Execute C code through Python

2005-10-21 Thread Grant Edwards
On 2005-10-21, Ernesto <[EMAIL PROTECTED]> wrote: > Thanks. Can anyone provide an example of using *subprocess* to run > helloWorld.C through the python interpreter. No. You can't run a .C file. You can run a .exe file (I'm guessing you're using Windows based on

Re: Compile C program -> .pyc file

2005-10-21 Thread Grant Edwards
Generating Python byte code from Pascal wouldn't be terribly difficult, but doing so for C would be pretty tough because you'd have to figure out how to fake all the low-level pointer shenanigans which C allows (or some would say depends upon). -- Grant Edwards

Re: Execute C code through Python

2005-10-21 Thread Grant Edwards
On 2005-10-21, Micah Elliott <[EMAIL PROTECTED]> wrote: > On Oct 21, Grant Edwards wrote: >> I'm guessing you're using Windows based on the question. > > +1 QOTW. Yow! That's two in one day, what do I win? -- Grant Edwards grante

Re: need some advice on x y plot

2005-10-21 Thread Grant Edwards
#x27;,'.join(ticstrings)) gp.plot(data) pause() outfile = 'foo.png' gp('set term png') gp('set out "%s"' % outfile) gp.plot(data) --8<-- -- Grant Edwards grante Yow! ... The waitress's at UNIFORM sheds TARTAR SAUCE visi.comlike an 8" by 10" GLOSSY... -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-21 Thread Grant Edwards
x27;) I don't get why people seem to be obfuscating things with multiple layers of shells or writing shell commands to to a file and executing them. > Maybe the results order has changed since you looked? No, I mixed them up. My point: the OP wanted to know how to export an environ

Re: Set an environment variable

2005-10-21 Thread Grant Edwards
On 2005-10-21, Mike Meyer <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: >> My point: the OP wanted to know how to export an environment >> variable to a child process. Either of the lines of code above >> will do that, so what

Re: need some advice on x y plot

2005-10-21 Thread Grant Edwards
On 2005-10-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > gp('set term png') > > is this an example of sending normal gnuplot commands? Yes. > if so, are all of the gnuplot commands available ? Yes. -- Grant Edwards grante

Re: Set an environment variable

2005-10-24 Thread Grant Edwards
obably warps one's perception of what's obvious and what isn't. -- Grant Edwards grante Yow! My face is new, my at license is expired, and I'm visi.comunder a

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
stored in plot_times[].. We can't read your mind. Unless you show us actual code, we can't help. Show us a small example program with Gnuplot's debug feature enabled that doesn't do what you want it to. Tell us what it is you wanted the program to do and post the output from t

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
t's your problem. Look at the ticstrings value that worked, and look at the ticstrings value that didn't work. What is the difference between the two? > because its a little different application of time. > > i think i am having trouble knowing exactly what the set xt

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
cs (seconds since start of run) gp.plot(data) pause() # same data with x value as Unix timestamps xdata = [x+start for x in xdata] print xdata data = Gnuplot.Data(xdata,ydata,with='linespoints',using=(1,2)) gp('set xdata time') gp('set timefmt "%s') gp('set format x "%r"') gp('set xtics 120') gp.plot(data) pause() --8<-- -- Grant Edwards grante Yow! LOOK!!! I'm WALKING at in my SLEEP again!! visi.com -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-25, Grant Edwards <[EMAIL PROTECTED]> wrote: > It looks like it. Though I've used custom tics in the past, it > was never for time values. Based on the help from gnuplot, I > suspect you can get what you want without doing custom tics, > but rather using the co

Re: need some advice on x y plot

2005-10-25 Thread Grant Edwards
On 2005-10-25, Grant Edwards <[EMAIL PROTECTED]> wrote: > It appears that the Gnuplot modules has coerced my data into > single-precision -- thus throwing away most of the resolution > on the x-axis. Passing Gnuplot.Data a Numeric array object is a good work-around. Otherwise, Gn

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Grant Edwards
sage out of order; Uh, no. Isn't what we're doing here top-quoting? The quoted stuff is at the top. Everything is in chronological order. I think what you're referring to is "top-posting". -- Grant Edwards grante Yow! ..

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Grant Edwards
On 2005-10-26, Duncan Booth <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> Uh, no. Isn't what we're doing here top-quoting? The quoted >> stuff is at the top. Everything is in chronological order. I >> think what you're referring to is &quo

Re: Suggestion for (re)try statement

2005-10-28 Thread Grant Edwards
the for loop to detect the case where you ran out of retries: for i in range(retries): try: whatever break except retryableExceptionList: sleep(delay) else: whatelse > Is it worth for a PEP? I don't think you can come up with a syntax that is really that much better

Re: popen2

2005-10-29 Thread Grant Edwards
know about the named pipe and open it. I don't think there is any way to swap a pipe in for stdin/stdout once a process is running. -- Grant Edwards grante Yow! NOW, I'm supposed at to SCRAMBLE two, and HOLD visi.comth' MAYO!! -- http://mail.python.org/mailman/listinfo/python-list

Re: popen2

2005-10-29 Thread Grant Edwards
o write a Python program that can "attach" pipes to that already running program's stdin/stdout. I know there's no way to do that under Unix. IIRC, the OP is running Win32, and I'm not quite as confident that it can't be dont under Win32, but I don't think it can.

Re: Python's website does a great disservice to the language

2005-11-01 Thread Grant Edwards
Maybe we could round up a couple of designers to donate some > time? Maybe we could build a basic CMS on top of Django or > TurboGears (displaying Python's capability as a web > development stack)? I like the Python web site. It's simple, easy to read, and easy to use. Just li

Re: WTF?

2005-11-01 Thread Grant Edwards
On 2005-11-01, James Stroud <[EMAIL PROTECTED]> wrote: > Why do my posts get held for suspcious headers and troll Xha > Lee gets to post all sorts of profanity and ranting without > any problem? Held? It's not a moderated group... -- Grant Edwards gr

Re: Python's website does a great disservice to the language

2005-11-01 Thread Grant Edwards
lash chunk is pretty clever. Most sites just have a large blank rectangle where the flash stuff is supposed to be. These guys have figured out that they should put something _under_ the flash rectangle that elicits a click out of people who have flash disabled by default. Um, not that I clicked,

Re: WTF?

2005-11-01 Thread Grant Edwards
On 2005-11-01, James Stroud <[EMAIL PROTECTED]> wrote: > On Tuesday 01 November 2005 14:26, Grant Edwards wrote: >> On 2005-11-01, James Stroud <[EMAIL PROTECTED]> wrote: >> > Why do my posts get held for suspcious headers > ... >> Held? It's not a

Re: About the Python Expert

2005-11-02 Thread Grant Edwards
, see the discussions and help the people. but > it is ur decision. There's _already_ a tutor mailing list and a general Python newsgroup -- both full of knowledgeable and helpful people. [Since I took a shot at this guy's spelling, there's _got_ to be a spelling error in

Re: reading internet data to generate random numbers.

2005-11-02 Thread Grant Edwards
ture? > 2. how would I skip every 2nd, 3rd, or 4th byte to protect privacy? 2nd, 3rd, 4th, byte of what? Doesn't your OS have an entropy-gathering RN generator built-in? -- Grant Edwards grante Yow! Yow! I forgot my

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Grant Edwards
g" is an array of 8-bit bytes. If you want the integer equivalent of the 3rd byte in a string s, do this: b = ord(s[2]) For example: >>> s = "ABC" >>> ord(s[0]) 65 >>> ord(s[1]) 66 >>> ord(s[2]) 67 If you want a list of the

Re: reading internet data to generate random numbers.

2005-11-02 Thread Grant Edwards
On 2005-11-02, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> wrote: >> Doesn't your OS have an entropy-gathering RN generator built-in? > > Alternatively, if you want lots of high-quality random numbers, buy > a cheap web ca

Re: reading internet data to generate random numbers.

2005-11-03 Thread Grant Edwards
<" and ">" I bet, and > relatively few "\x03"). I've never heard of anybody using the data as source of entropy. All the entropy gathering I've read about used the timing of network events, not the user-data associated with

Re: reading internet data to generate random numbers.

2005-11-03 Thread Grant Edwards
hose events. > > Me neither, but the original poster did ask how to read every nth byte > of "the Internet stream", so I assumed he had something like that in mind. I agree that would be a pretty bad idea unless you went to some effort to reduce the bias in the distribution of the

Re: reading internet data to generate random numbers.

2005-11-03 Thread Grant Edwards
't be any fun.) That's for sure. The real questions are rarely as interesting and the imagined ones. -- Grant Edwards grante Yow! Well, O.K. I'll at compromise with my

Re: UART parity setting as "mark" or "space" (using Pyserial???)

2005-11-04 Thread Grant Edwards
ty and loading the next byte into the data register. Many OSes "drain" functions are notoriously inaccurate. -- Grant Edwards grante Yow! Did I say I was a at sardine? Or a bus??? vis

Re: Using Which Version of Linux

2005-11-05 Thread Grant Edwards
7;s very no-nonsense, but there are alot of available packages and everything (so far) just works. However, it's not for the impatient (or at least not for the poor and impatient). Since it compiles packages from source, a full-featured desktop install on a slow machine can take days

Re: Using Which Version of Linux

2005-11-05 Thread Grant Edwards
that I have to say that the RPM package tools suck > quite badly. You'd say the same think about Debian if all you had ever used was dpgk, and I dare you to try to do anything with dselect. > Debian and SUSE are both pretty good choices. -- Grant Edwards

Re: Goto XY

2005-11-08 Thread Grant Edwards
y be more trouble than it's worth. In which case you could always use tput -- and it will still be portable. -- Grant Edwards grante Yow! I'm GLAD I at remembered to XEROX all

Re: PYTHON LOOSING FOR JAVA???????

2005-11-09 Thread Grant Edwards
On 2005-11-09, James Colannino <[EMAIL PROTECTED]> wrote: > Bill Mill wrote: > >>+1 QOTW >> >> > > My ignorance shows here. What does that mean? :-P It's a "vote" for Qutoe of the Week. -- Grant Edwards

Re: Floating numbers and str

2005-11-09 Thread Grant Edwards
se the string formatting operator "%" like this: >>> x=.13241414515 >>> y = "%0.4g" % x >>> y '0.1324' -- Grant Edwards grante Yow! A GRAM?? A BRAM... A at

Re: Floating numbers and str

2005-11-09 Thread Grant Edwards
On 2005-11-09, Tuvas <[EMAIL PROTECTED]> wrote: > Wait, one more question. If the number is something like: > > 1.32042 > > It is like > "1.32 stuff" > > I would like it's size to remain constant. Any way around this? http://www.python.org/doc/current

Re: Python obfuscation

2005-11-09 Thread Grant Edwards
r another level of protection > maybe use these offuscator on the remaining Python source. > What do you think ? Um... sounds like an excellent way to burn hours while introducing bugs and security problems? -- Grant Edwards grante

Re: struct, IEEE-754 and internal representation

2005-11-09 Thread Grant Edwards
? Yes. C-Python "float" objects are of the C type "double" and use 64-bit IEEE-754 representation on all the common platforms I know about. -- Grant Edwards grante Yow! .. or were you

Re: Floating numbers and str

2005-11-09 Thread Grant Edwards
On 2005-11-10, Dan Bishop <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2005-11-09, Tuvas <[EMAIL PROTECTED]> wrote: >> >> > I would like to limit a floating variable to 4 signifigant digits, when >> > running thorugh a str command. >>

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-10 Thread Grant Edwards
On 2005-11-10, Svenn Are Bjerkem <[EMAIL PROTECTED]> wrote: > (and python can not do "set result [exec someprog << $input]" > as far as I know) I don't remember Tcl very well, but doesn't this do the same thing? result = os.popen(&#x

Re: Is there a built-in method for transforming (1, None, "Hello!") to 1, None, "Hello!"?

2005-11-11 Thread Grant Edwards
On 2005-11-11, Daniel Crespo <[EMAIL PROTECTED]> wrote: > Is there a built-in method for transforming (1,None,"Hello!") to > 1,None,"Hello!"? What transformation? The two are identical: >>> x = (1,None,"Hello!") >>> y = 1,None,"He

Re: q: console widgets for *nix and windows?

2005-11-14 Thread Grant Edwards
set of widgets, event loop, handler > methods etc. http://tvision.sourceforge.net/ -- Grant Edwards grante Yow! I'm using my X-RAY at VISION to obtain a rare visi.c

Re: Proposal for adding symbols within Python

2005-11-14 Thread Grant Edwards
to be "local to a module". I don't think I even understand what the objection is. What is needed is a code fragment that shows how the use of strings is untenable. -- Grant Edwards grante Yow! And furthermore, at

Re: q: console widgets for *nix and windows?

2005-11-15 Thread Grant Edwards
On 2005-11-15, aum <[EMAIL PROTECTED]> wrote: > On Mon, 14 Nov 2005 20:56:36 +0000, Grant Edwards wrote: > >>> Can anyone please recommend a widget library for text console, >>> that works not only on *nix systems but windows /as well/? >>> I'm lookin

Re: Proposal for adding symbols within Python

2005-11-15 Thread Grant Edwards
On 2005-11-15, Ben Sizer <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> In the situations described, I always use strings >> and have never felt the need for something else: > > ... > >> I don't think I even understand what the objection is. What i

Re: is parameter an iterable?

2005-11-15 Thread Grant Edwards
me instead of passing up the proper exception (the good, Pythonic thing to do), I'd be fairly pissed off at you. An exception is the _right_ way to let the caller know something is wrong. -- Grant Edwards grante Yow! I smell like a wet

Re: running functions

2005-11-16 Thread Grant Edwards
thon. Is it possible to run this function and still be able to do > other things with Python while it is running? Yes. > Is that what threading is about? Exactly. Take a look at the "treading" module: http://www.python.org/doc/current/lib/module-threading.html --

Re: running functions

2005-11-17 Thread Grant Edwards
x shared memory or whatnot. It's not difficult if you don't have to do any communication between processes, but in that case, shared objects aren't a problem either. [...] > That is why threads that don't do trivial things are so scary. Maybe I've just been using t

Re: Choose meaningful subjects for posts [was: Re: newb ?]

2005-11-18 Thread Grant Edwards
ervice). Obligatory aside: I'm completely baffled why anybody would choose the mailing list format over Usenet. I don't even read mailing lists via mailing lists. I recommend gmane.org's NNTP server for all your mailing list needs. -- Grant Edwards

Re: the PHP ternary operator equivalent on Python

2005-11-18 Thread Grant Edwards
On 2005-11-18, Daniel Crespo <[EMAIL PROTECTED]> wrote: > I would like to know how can I do the PHP ternary operator/statement > (... ? ... : ...) in Python... The _PHP_ ternary operator (x?y:z)! Kids these days! -- Grant Edwards grante Yow! It&

Re: Choose meaningful subjects for posts [was: Re: newb ?]

2005-11-18 Thread Grant Edwards
l ears. slrn is the definitive choice -- especially for a mutt user. :) > I have tried to setup "tin" in the past but the voluminosity > of its documentation made me give up. I used tin for a couple years back in the early 90's, but I find

Re: Entry widget -- how to prevent change

2005-11-22 Thread Grant Edwards
or the widget in question. Since you don't specify what toolkit you're using, that about as specific an answer as you're going to get... -- Grant Edwards grante Yow! I've read SEVEN at

Re: hex string to hex value

2005-11-22 Thread Grant Edwards
ed with the hex function). >> > aren't you converting from a hex string to a decimal value here? No. He's converting from a hex string to an integer object. -- Grant Edwards grante Yow! It's OKAY --- I'm an

Re: strange behaviour when writing a large amount of data on stdout

2005-11-23 Thread Grant Edwards
s fine under Windows Me with 32MB of RAM ActivePython 2.3.4 Build 233 (ActiveState Corp.) based on Python 2.3.4 (#53, Oct 18 2004, 20:35:07) [MSC v.1200 32 bit (Intel)] on win32 -- Grant Edwards grante Yow! Alright, at

Re: Reading binary data

2005-11-23 Thread Grant Edwards
27;m > still learning so please be gentle. use the struct module http://www.python.org/doc/current/lib/module-struct.html -- Grant Edwards grante Yow! O.K.! Speak with a at PHILADELPHIA ACCENT!! Send

Re: Reading binary data

2005-11-23 Thread Grant Edwards
rces and find the typedefs. > And what about the enum section? It's probably a 32-bit integer, but it may take some experimentation to confrim that. -- Grant Edwards grante Yow! I invented skydiving at

Re: Reading binary files

2005-11-23 Thread Grant Edwards
On 2005-11-23, amfr <[EMAIL PROTECTED]> wrote: > On windows, is there anything special I have to do to read a binary > file correctly? Open it in binary mode? -- Grant Edwards grante Yow! I didn't order at

Re: ncurses' Dark Devilry

2005-11-29 Thread Grant Edwards
to move the cursor to the location where you want to write, some terminals allow you to make the cursor invisible. This can reduce the visual distraction when you need to update something on the screen that isn't where the cursor belongs (from the user's point of view). -- Grant Ed

Re: Newbie: Python & Serial Port question

2005-12-01 Thread Grant Edwards
t's the best way to do this using python? Use pyserial and a database interface module. > Does anyone know of an existing software/python library/module > for this? Sorry. -- Grant Edwards grante Yow! I'm ANN LANDERS!! I

Re: Newbie: Python & Serial Port question

2005-12-01 Thread Grant Edwards
x27;d need to set the correct port parameters > with some other app, Just use termios. Or better yet, pyserial. > but it should be do-able. -- Grant Edwards grante Yow! Intra-mural sports at results are filtering

Re: Bitching about the documentation...

2005-12-05 Thread Grant Edwards
e credibility points in the minds of most of the old-school Usenet denizens -- and having a yahoo address subtracts a few more points. That just means you're going to have to work a bit to get back up to the same point that somebody with a real name and a "real" ISP would start a

Re: Usenet falsehoods (was Re: Bitching about the documentation...)

2005-12-05 Thread Grant Edwards
On 2005-12-06, Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Grant Edwards <[EMAIL PROTECTED]> wrote: >> >>Hmm, I though he explained it: >> >> 1) Not using your real name. >> >> 2) A yahoo, aol, or hotmail

Re: Binary representation of floating point numbers

2005-12-06 Thread Grant Edwards
int value so I can read the flags represented here? Use the struct module. > Also, it's little (or big?) endian. Whatever... how do I > manipulate the endianness? Again, the struct module. -- Grant Edwards grante Yow! ... I have read the

Re: Binary representation of floating point numbers

2005-12-06 Thread Grant Edwards
On 2005-12-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The only way to get the flags is as a float, either through an > ascii string or a true float. That's perverse. Really. Somebody needs to be slapped. > The value of the float, however, is representable as 24 bits > of normal binar

Re: Bitching about the documentation...

2005-12-07 Thread Grant Edwards
falo buffalo buffalo buffalo Buffalo buffalo." Why the goofy-looking capitalization? Are the 2nd and 3rd occurances of "Buffalo" referring to the city? -- Grant Edwards grante Yow! All of life is a blur at o

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
hen I do print time.time()-time.time() is usually about 2-3us, but some of that is probably due to the overhead involved. -- Grant Edwards grante Yow! TAILFINS!!...click... at vi

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
time measurement. I don't know which library call the time modules uses, but if it's gettimeofday(), that is limited to 1us resolution. clock_gettime() provides an API with 1ns resolution. Not sure what the actual data resolution is... -- Grant Edwards

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
On 2005-12-07, Grant Edwards <[EMAIL PROTECTED]> wrote: >> if I run this on the Windows 2K box I'm sitting at right now, it settles >> at 100 for time.time, and 1789772 for time.clock. on linux, I get 100 >> for time.clock instead, and 262144 for time.time. > &

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
e() After the first loop, I usually get one of three values: 3.099us, 2.14,us, 2.86us. In any case, the resolution of time.time() _appears_ to be less than 1us. -- Grant Edwards grante Yow! Alright, at you!

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
-2.86102294922e-06 -1.90734863281e-06 -2.14576721191e-06 -2.14576721191e-06 -9.53674316406e-07 -1.90734863281e-06 The min delta seen is 0.95us. I'm guessing thats function/system call overhead and not timer resolution. -- Grant Edwards grante Yow! I HAVE a towel. at visi.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
On 2005-12-07, Grant Edwards <[EMAIL PROTECTED]> wrote: >>>> for f in range(10): > ... print t()-t() > ... > -4.05311584473e-06 > -1.90734863281e-06 > -1.90734863281e-06 > -2.14576721191e-06 > -2.86102294922e-06 > -1.90734863281e-06 > -2.145767211

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
1e-06 > > items from time to time on both machines... We're seeing floating point representation issues. The resolution of the underlying call is exactly 1us. Calling gettimeofday() in a loop in C results in deltas of exactly 1 or 2 us. Python uses a C double to represent time, and

Re: Calculating Elapsed Time

2005-12-07 Thread Grant Edwards
I assume that's what the underlying Linux system call is doing (I haven't looked). Then it just rounds/truncates to the nearest microsecond (because that's what the BSD/SysV/Posix API specifies) when it returns the answer that Python sees. -- Grant Edwards grante

Re: OT: spacing of code in Google Groups

2004-12-31 Thread Grant Edwards
(mod 17261) 0 24 fib 75077: 75076 (mod 75077) 0 <-- counter example 25 fib 80189: 80188 (mod 80189) 0 26 """ Not sure what Google Groups does to it... -- Grant Edwards grante Yow! Now I understand the

Re: Python equivalent of script(1)

2005-01-01 Thread Grant Edwards
On 2005-01-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there anything like script(1) for python interactive sessions. $ script transcript.txt Script started, file is transcript.txt $ python ... Not sure if there's a way to shut off readline... --

Approximating scattered data

2005-01-01 Thread Grant Edwards
g there might be something that was already usable from Python. Can anybody point me toward a Python module for approximating scattered data using something like a Renka algorithm? -- Grant Edwards grante Yow! How do I get HOME?

Re: Approximating scattered data

2005-01-01 Thread Grant Edwards
point HW, and if the evaluation takes more than about 40ms, I'm going to have problems. The evaluating the spline surface produced by scipy's FITPACK wrapper was fast enough, but I had to force the scattered data onto a grid (which introduced errors), and then the spline su

Re: How to make executable file ?

2005-01-02 Thread Grant Edwards
ion? Yes. > I want to display results in windows message box. -- Grant Edwards grante Yow! Pardon me, but do you at know what it means to be visi.comTRULY ONE with your BOOTH!

Re: Example of using pty to control a process?

2005-01-05 Thread Grant Edwards
can be used > for this, however, I can't find any good examples of how to > use it. Any ideas as to where I can look? I've you're dead set on using pty, I can tell you how to do it in C, and maybe you can extrapolate. -- Grant Edwards gr

Re: OT: spacing of code in Google Groups

2005-01-06 Thread Grant Edwards
. Using rectangular operations in an editor was a ways down the list of alternatives. -- Grant Edwards grante Yow! Is this ANYWHERE, at USA? visi.com -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: spacing of code in Google Groups

2005-01-06 Thread Grant Edwards
not :-) > > Microsoft Windows XP [Version 5.1.2600] > (C) Copyright 1985-2001 Microsoft Corp. > > c:\> That's not a command line. ;) > 'cut' is not recognized as an internal or external command, > operable program or batch file. -- Grant Edwards

Re: Port blocking

2005-01-10 Thread Grant Edwards
roubles for firewall admins. It's to give corporate IT types the _illusion_ of security and relieve them of the need to learn how to configure firewalls. > But its not inherently more secure. That's a property of the > application running. -- Grant

Re: pyserial and com port interrupts

2005-01-12 Thread Grant Edwards
hon is really, really painless. -- Grant Edwards grante Yow! Someone is DROOLING at on my collar!! visi.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how to control the mouse pointer with python?

2005-01-13 Thread Grant Edwards
On 2005-01-13, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Sorry, I should have mentioned it's linux (debian). > Thanks. What environment? Console? X11? MGR? ??? -- Grant Edwards grante Yow! My ELBOW is a remote

Re: interpret 4 byte as 32-bit float (IEEE-754)

2005-01-15 Thread Grant Edwards
\xff\xff' >>> print struct.unpack('>f',bytes) (-6.8056469327705772e+38,) 0xff is _not_ -6.8...e38. It's a NaN. IIRC, it doesn't work for infinities either. I haven't tried denormals. -- Grant Edwards grante Yow! It

Re: List problems in C code ported to Python

2005-01-16 Thread Grant Edwards
h the Python and C code at > http://home.earthlink.net/~lvraab. The two files are ENIGMA.C and engima.py http://www.catb.org/~esr/faqs/smart-questions.html -- Grant Edwards grante Yow! Did an Italian CRANE at

Re: List problems in C code ported to Python

2005-01-16 Thread Grant Edwards
x27;m too lazy to compose and post a precise question, so go look at my program and fix it for me."] Now, go back and read the smart questions reference. -- Grant Edwards grante Yow! Hello? Enema a

Re: List problems in C code ported to Python

2005-01-17 Thread Grant Edwards
do what you want it to, I gaurantee that somebody will explain why it doesn't do what you want and how to fix it. -- Grant Edwards grante Yow! LOU GRANT froze at my ASSETS!! visi

Re: List problems in C code ported to Python

2005-01-17 Thread Grant Edwards
ext function and test it to make sure it works. Then the next function, etc. -- Grant Edwards grante Yow! My ELBOW is a remote at FRENCH OUTPOST!! visi.com -- http://mail.python.org/mailman/listinfo/python-list

Re: List problems in C code ported to Python

2005-01-17 Thread Grant Edwards
he indexerror, but I feel a class is what you need > here to make life easier and the program more readable I'd probably numeric python (which I beleive is depricated, but it's what I have installed) or numarray. I think either would make it a lot easier. Using lists of lists when wha

Re: hex notation funtion

2005-01-18 Thread Grant Edwards
On 2005-01-18, tertius <[EMAIL PROTECTED]> wrote: > Is there a builtin function that will enable me to display the hex > notation of a given binary string? (example below) ' '.join('%02x' % ord(b) for b in s) -- Grant Edwards grante

Re: hex notation funtion

2005-01-18 Thread Grant Edwards
On 2005-01-18, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-01-18, tertius <[EMAIL PROTECTED]> wrote: > >> Is there a builtin function that will enable me to display the hex >> notation of a given binary string? (example below) > > ' '.join

Re: Another scripting language implemented into Python itself?

2005-01-25 Thread Grant Edwards
n do anything > they want with your system without you doing "import module." > > Bottom line: Don't exec or eval untrusted code. Don't import untrusted > modules. I still don't see how that's any different for Python than for any ot

Re: py2exe problem

2005-01-25 Thread Grant Edwards
act recipe, but I've got it at work. If you can't figure it out by tomorrow, let me know and I'll post a snippet from my setup.py file. -- Grant Edwards grante Yow! Sometime in 1993 at NANCY SINATRA will

Re: exclude binary files from os.walk

2005-01-26 Thread Grant Edwards
f so, what's the reasoning behind this? Behind what? > Again all of this pertains to files on Windows XP and Python 2.4 -- Grant Edwards grante Yow! Now that I have my at "APPLE", I comprehend COST

Re: exclude binary files from os.walk

2005-01-26 Thread Grant Edwards
other encoding that doesn't use bit 7. Or, it could just be binary data that happens to have bit 7 == 0. > We could be of more help, if you would take the time to > explain a little about what you are trying to do. Yup. -- Grant Edwards grante Yow!

<    8   9   10   11   12   13   14   15   16   17   >