Re: getting data from a port in use

2005-01-31 Thread Grant Edwards
t right. Once the connection has been accepted, you have to read data from the socket returned by the accept() call. > print data > s.close() -- Grant Edwards grante Yow! Actually, what at I'd like is a lit

Re: need for binary floats (except performance)?

2005-01-31 Thread Grant Edwards
performance)? That's a pretty huge "except" for some applications. -- Grant Edwards grante Yow! HUGH BEAUMONT died at in 1982!! visi.com -- http://mail.python.org/mailman/listinfo/python-list

Where are list methods documented?

2005-02-01 Thread Grant Edwards
o >>> list.sort.__doc__ 'L.sort(cmpfunc=None) -- stable sort *IN PLACE*; cmpfunc(x, y) -> -1, 0, 1' -- Grant Edwards grante Yow! But they went to MARS at around 1953!!

Re: Where are list methods documented?

2005-02-01 Thread Grant Edwards
On 2005-02-01, Tim Peters <[EMAIL PROTECTED]> wrote: > [Grant Edwards] >> I'm trying to figure out how to sort a list, and I've run into >> a problem that that I have tripped over constantly for years: >> where are the methods of basic types documented? >

Re: Where are list methods documented?

2005-02-01 Thread Grant Edwards
t; ><http://www.python.org/doc/2.4/lib/typesseq-mutable.html> Yes, that last page was the one I was looking for. I didn't know enough to spell list as "mutable sequence type". -- Grant Edwards grante Yow! I think my CAREE

Re: Where are list methods documented?

2005-02-01 Thread Grant Edwards
On 2005-02-01, Tim Peters <[EMAIL PROTECTED]> wrote: > [Grant Edwards] >> I did. I looked up sort in the library index, and it took me >> to 3.3.5 Emulating container types, > > It doesn't for me. Here: > > http://docs.python.org/lib/genindex.html#

Re: how about writing some gui to a known console application

2005-02-01 Thread Grant Edwards
On 2005-02-01, alexrait1 <[EMAIL PROTECTED]> wrote: > Do something useful... (at least for me) > For instance I need a gtk frontend for pgp. > So here you can have an opportunity to learn both pyGTK and pgp. A lot > of python code... :) Um, to whom are you addressing your co

Re: getting data from a port in use

2005-02-01 Thread Grant Edwards
27;ve already said: if you're trying to get data from already established connections, you can't do it using accept. You have to use the pcap library. You're going to have to accurately describe what you're trying to do, or none of us are going to be ab

Re: getting data from a port in use

2005-02-01 Thread Grant Edwards
=13826 Once upon a time, there was a rumor that somebody had a Win32 version of pylibpcap. Good luck. :) -- Grant Edwards grante Yow! Did an Italian CRANE at OPERATOR just experience

Re: how about writing some gui to a known console application

2005-02-02 Thread Grant Edwards
On 2005-02-01, Jeremy Bowers <[EMAIL PROTECTED]> wrote: > On Tue, 01 Feb 2005 21:57:45 +0000, Grant Edwards wrote: > >> On 2005-02-01, alexrait1 <[EMAIL PROTECTED]> wrote: >> >>> Do something useful... (at least for me) For instance I need a gtk >&g

Re: how about writing some gui to a known console application

2005-02-02 Thread Grant Edwards
in it's own thread. I later saw the post to which you intended to reply. -- Grant Edwards grante Yow! The entire CHINESE at WOMEN'S VOLLEYBALL TEAM all visi.com

Re: extreme newbie

2005-06-19 Thread Grant Edwards
-character file name that console-beep is placed Under Unix it's not all that hard to accidentally create files like that. Sometimes you have to resort to blasting them away by i-node number, or by moving the files you want to keep and then nuking the directory. -- Grant Edwards

pickle broken: can't handle NaN or Infinity under win32

2005-06-21 Thread Grant Edwards
ate note, are there hooks in pickle to allow the user to handle types that pickle can't deal with? Or, do I have to throw out pickle and write something from scratch? [NaN and Infinity are prefectly valid (and extremely useful) floating point values, and not using them would require huge

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-21 Thread Grant Edwards
On 2005-06-21, Grant Edwards <[EMAIL PROTECTED]> wrote: > I finally figured out why one of my apps sometimes fails under > Win32 when it always works fine under Linux [...] Oh, I forgot, here's pickletest.py: #!/usr/bin/python import pickle f1 = (1e300*1e300) f2 = f1

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
hat to do with "+`s` self.append(f) Obviously the list of accepted string values should be expanded to include other platforms as needed. The above example handles Win32 and glibc (e.g. Linux). Even better, add that code to float(). -- Grant Edwards grante

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
;s using the "native" string representation of a NaN or Inf. A perhaps simpler approach would be to define a string representation for Python to use for NaN and Inf. Just because something isn't defined by the C standard doesn't mean it can't be defined by Python.

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
dden is it taboo for Python to impliment something that's not universally portable and defined in a standard? Where's the standard defining Python? -- Grant Edwards grante Yow! ... A housewife at is wearing a polypyrene visi.comjumpsuit!! -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
On 2005-06-22, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2005-06-22, Scott David Daniels <[EMAIL PROTECTED]> wrote: >>>Several issues: >> >> >>>(1) The number of distinct NaNs varies among platforms. >>

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
e300*1e300)/(1e300*1e300) and hope for the best. The other is to assume IEEE 754 just use 7f80 or 7fc0 depending on whether you want a signalling or quiet NaN. -- Grant Edwards grante Yow! Don't hit me!! I'm in

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
Aren't we talking about IEEE 754 arithmetic? Mainly, yes. > There's some specific bit pattern(s) for -0.0 and you can > assign a float variable to such a pattern. Yup. -- Grant Edwards grante Yow! My Aunt MAUREEN was

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
ke > major improvements here in pickle, struct and marshal for > Python 2.5! I would think it doable if one assumed IEEE-754 FP (famous last words). I suppose there are still a few VAX machines around. And there are things like TI DSPs that don't use IEEE-754. -- Grant Edwards

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-22 Thread Grant Edwards
On 2005-06-23, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-23, Tim Peters <[EMAIL PROTECTED]> wrote: > >> C89 doesn't define the result of that, but "most" C compilers these >> days will create a negative 0. >> >>> and (double)0

Re: Allowing only one instance of a script?

2005-06-23 Thread Grant Edwards
ther instance of the script is launched, it will just >| return with an >| error. > > If you're on Windows, have a look at this recent thread: > > http://groups-beta.google.com/group/comp.lang.python/msg/2a4fadfd3d6e3d4b?hl=en If you're on Unix/Linux, the usua

Re: Allowing only one instance of a script?

2005-06-23 Thread Grant Edwards
hen call link() to rename it. Both open() and link() are atomic operations, so there's no race condition. -- Grant Edwards grante Yow! I don't know WHY I at said that... I think it

Re: Allowing only one instance of a script?

2005-06-23 Thread Grant Edwards
On 2005-06-23, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-23, Tim Golden <[EMAIL PROTECTED]> wrote: >> [Ali] >>| >>| I have a script which I double-click to run. If i double-click it >>| again, it will launch another instance of the script. &g

Re: Allowing only one instance of a script?

2005-06-23 Thread Grant Edwards
On 2005-06-23, Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Grant Edwards <[EMAIL PROTECTED]> wrote: >> >>Both open() and link() are atomic operations, so there's no >>race condition. > > ...unless you're running

Re: Newbie question: how to keep a socket listening?

2005-06-24 Thread Grant Edwards
o > 0, it won't accept any more connections. (I'm not at all sure, but that > sounds like what it's doing.) The "1" tells the stack how many pending connections are allowed. -- Grant Edwards grante Yow! I FORGOT to do the

Re: Newbie question: how to keep a socket listening?

2005-06-24 Thread Grant Edwards
t obvious. I thought this response might > clarify the meaning of listen(1) a little bit for some folks > nevertheless. He could change the 1 to a larger number and see if the behavior changes. -- Grant Edwards grante Yow! I was giving HAIR

Re: Newbie question: SOLVED (how to keep a socket listening), but still some questions

2005-06-24 Thread Grant Edwards
down() before one does a > socket.close?? No. [I've never figured out why one would do a shutdown RDWR rather than close the connection, but I haven't put a lot of thought into it.] -- Grant Edwards grante Yow! -- I love KATRINKA

Re: Newbie question: how to keep a socket listening?

2005-06-24 Thread Grant Edwards
en that 8 was the minimum, but I do remember that 1 didn't result in a second connect failing. -- Grant Edwards grante Yow! Ha ha Ha ha Ha ha at Ha Ha Ha Ha -- When will I

Re: Newbie question: SOLVED (how to keep a socket listening), but still some questions

2005-06-24 Thread Grant Edwards
the only time I had ever used shutdown was to shutdown just the transmit half. -- Grant Edwards grante Yow! An INK-LING? Sure -- at TAKE one!! Did you BUY any visi.comCOMMUNIS

Re: turn text lines into a list

2005-06-27 Thread Grant Edwards
Dumper; > print Dumper([EMAIL PROTECTED]); > > -- > is there some shortcut to turn lines into list in Python? corenames = [ "rb_basic_islamic", "sq1_pentagonTile", "sq_arc501Tile", "sq_arc503T

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
," does it sound unsophisticated and dumb? I too have always wondered about this. > Be blunt. We Americans need to know. Should we try to change > the way we speak? Are there certain words that sound > particularly goofy? Please help us with your advice on this > awkward matter. --

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
ht forum to use indicates more > sophistication and high intelligence than the way one speaks. > ;-) Well, there is that... -- Grant Edwards grante Yow! Hello... IRON at CURTAIN? Send ov

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Grant Edwards napisa³(a): > >>>To be blunt, I have no idea what this has to do with Python. >> >> Monty Python was mostly Brits? > > Wasn't they all Brits? Nope. Terry Gill

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Devan L <[EMAIL PROTECTED]> wrote: > Thats like posting about Google here because the newsgroup is hosted on > Google. Except the newsgroup isn't "hosted on Google", and it's far less interesting than Monty Python. -- Grant Edwards

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Grant Edwards napisa³(a): > >>>>>To be blunt, I have no idea what this has to do with Python. >>>>Monty Python was mostly Brits? >>> >>>Wasn't they all Brits? >> >>

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
have seen the "Twit of the Year" skit or the election skit with what's-his-name (pronounced "mangrove throatwarbler"). -- Grant Edwards grante Yow! I wonder if I should at put myself in ESCROW!

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
the character was supposed to be an _American_. I assume that when I try to speak with a British accent I sound just as bad to a Brit. -- Grant Edwards grante Yow! Why is everything at made of Lycra Spandex?

Re: python broadcast socket

2005-06-29 Thread Grant Edwards
r should be able to do. In a real OS, it's a restricted operation and you need special privledges. Under Linux, you need to be root to send a broadcase packet. -- Grant Edwards grante Yow! How's the wife? Is

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread Grant Edwards
On 2005-06-29, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> That depends on the accent. I believe that's probably true for >> the educated south of England, BBC, received pronunciation. I >> don't think that's true for some of

Re: python broadcast socket

2005-06-29 Thread Grant Edwards
On 2005-06-29, Jp Calderone <[EMAIL PROTECTED]> wrote: > On Thu, 30 Jun 2005 00:13:45 +0200, Irmen de Jong <[EMAIL PROTECTED]> wrote: >>Grant Edwards wrote: >> >>> Under Linux, you need to be root to send a broadcase packet. >> >>I don't think

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Grant Edwards
g plenty of BBC, and I run into afew native Londoners whom I have hard time understanding. I don't ever remember having troubly understanding people outside the city. -- Grant Edwards grante Yow! I KAISER ROLL?! What

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-06-30 Thread Grant Edwards
to take the r's removed from words like "carrier" and "order", and add them to the ends of other words like Amanda. -- Grant Edwards grante Yow! There's a SALE on at STRETCH SOCKS down at the

Re: Scket connection to server

2005-06-30 Thread Grant Edwards
t;>> >>> >> >> Off the top of my head (so there could be errors): >> >> import socket >> s = socket.Socket() >> s.connect((10.214.109.50, 2)) >> s.send("Hello, Mum\r\n") > > Just curious...where do these messag

Re: Python for everything?

2005-07-01 Thread Grant Edwards
r all sorts of programs under from a couple lines for a normal text filter to thousands of lines with a complex GUI. [Why are Python programs referred to as "scripts". Python no more a "scripting" language than Java, Pascal, Smalltalk, Objective C.] -- Grant Ed

Re: Python for everything?

2005-07-01 Thread Grant Edwards
st was never the case. There never was a C-language monoculture in any OS. Another possible interpretation is that at some point in the past, there was some misguided soul who has tried to use C for every type of task imaginable. That's probably true, but the same could be said of any language. -- Grant Edwards -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Grant Edwards
On 2005-07-02, Andrew Durdin <[EMAIL PROTECTED]> wrote: > On 7/1/05, Grant Edwards <[EMAIL PROTECTED]> wrote: >> On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: >> > Tom Anderson wrote: >> > >> >> How about carrier? >>

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-07-02 Thread Grant Edwards
cents that the average Brit does. -- Grant Edwards grante Yow! Do you guys know we at just passed thru a BLACK visi.comHOLE in space? -- http://mail.python.org/mailman/listinfo/python-list

Re: threads and sleep?

2005-07-05 Thread Grant Edwards
of multiple processors. No matter how many CPUs you have, only one thread is allowed to run at any point in time. Multi-threading in Python is useful for simplifying the architecture of a program that has to do multiple independent tasks, but it isn't useful for actually running mult

Re: threads and sleep?

2005-07-05 Thread Grant Edwards
ue. Python can execute C code in parallel, but not Python code. > Tou might get the results you want by not using threads, > instead spawning off completely new Python invocations > assigned to other processors. That should work, but managing the inter-process communication and sync

Re: threads and sleep?

2005-07-05 Thread Grant Edwards
On 2005-07-05, Grant Edwards <[EMAIL PROTECTED]> wrote: >> Don't think you can do that with Python... The Python runtime >> interpreter itself is running on a single processor. > > I don't see how that can be. Under Linux at least, the Python > threading mo

Re: How do you program in Python?

2005-07-05 Thread Grant Edwards
7;t. Emacs doesn't follow the Unix way. > (Note: this isn't a flame about emacs, nor vi for that matter, > just a discussion about the apparent conflict in the two > philosophies embodied by the "simple little programs" and the > "emacs" approaches.) Who

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-05 Thread Grant Edwards
ence background doesn't know it. > And besides, "def" isn't a "magic" word... it's an abreviation > for "define"... I hope that any student who didn't understand > a word as common as "define" wouldn't have graduated fro

Re: threads and sleep?

2005-07-06 Thread Grant Edwards
On 2005-07-06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 05 Jul 2005 16:01:23 -0000, Grant Edwards <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Or is the Python interpreter actually doing the context >> switches itself? >

Re: threads and sleep?

2005-07-06 Thread Grant Edwards
On 2005-07-06, Alex Stapleton <[EMAIL PROTECTED]> wrote: > Is SYS V shared memory a totalyl stupid way of doing distributed locks > between processes then? Sys V semaphores would seem to be a more logical choice. -- Grant Edwards grante Yow! I'

Re: threads and sleep?

2005-07-06 Thread Grant Edwards
ine code, I wouldn't say there > are multiple interpreters. > > There's a reason the GIL is the *global* interpreter lock... Exactly. -- Grant Edwards grante Yow! I've been WRITING at to SOPHIA

Re: Use cases for del

2005-07-06 Thread Grant Edwards
erence between an "invalid integer value" and an integer with value 0. -- Grant Edwards grante Yow! I've read SEVEN at MILLION books!! visi.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Use cases for del

2005-07-06 Thread Grant Edwards
On 2005-07-07, Ron Adam <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> On 2005-07-06, Ron Adam <[EMAIL PROTECTED]> wrote: >> >> >>>It would be a way to set an argument as being optional without >>>actually assigning a value to it.

Re: Use cases for del

2005-07-06 Thread Grant Edwards
On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> 1) So I know whether an parameter was passed in or not. Perhaps >>it's not considered good Pythonic style, but I like to use a >>single method for both get and set operations.

Re: Use cases for del

2005-07-06 Thread Grant Edwards
that d.foo(3) d.foo() are doing something other than just getting/setting the value of an instance attribute. If all I really wanted to do was get/set the instance's "v" attribute, I probably would have just done it like this d.v = 3 print d.v --

Re: Use cases for del

2005-07-06 Thread Grant Edwards
On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote: >>>_NOVALUE = object() >>>class demo: >>>def foo(v=_NOVALUE): >>>if v

Re: Use cases for del

2005-07-07 Thread Grant Edwards
you don't have to check for a NameError. How would you spell "if a name is None"? Personally, I think the spellings del name if 'name' in locals() is much more explicit/obvious than name = None name is None I expect the "=" operator to bind a name t

Re: Do a "Python beginners e-mail list" exist?

2005-07-07 Thread Grant Edwards
hat you ask, somebody else will someday want to know the same thing, and Google will find them the answer if it's in a public forum. -- Grant Edwards grante Yow! He is the at

Re: threads and sleep?

2005-07-07 Thread Grant Edwards
atforms. At least in my experience under Linux, libpthread always creates an extra "manager" thread. Though in our case that thread probably wouldn't be running a Python interpreter. -- Grant Edwards grante Yow! Uh-oh!! I'm having

Re: socket code

2005-07-08 Thread Grant Edwards
ow I can get around > this? I have to transmitt data to an old system. The system > only reads broadcast data on port 17100. Didn't we just answer this question for you two weeks ago? http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/6447ef29cf613660/dc

Re: Defending Python

2005-07-09 Thread Grant Edwards
or projects that need to perform tasks on > non-Microsoft operating systems. :-) It's also darned handy for projects that need to perform tasks on Microsft operating systems but you want to do all the development work under a real OS. -- Grant Edwards grante

Re: Environment Variable

2005-07-11 Thread Grant Edwards
On 2005-07-11, Vivek Chaudhary <[EMAIL PROTECTED]> wrote: > Is it possible to set an environment variable in python script whose > value is retained even after the script exits. No, not in Unix/Linux. In VMS I think there is. -- Grant Edwards grante

Re: read output and store in file

2005-07-11 Thread Grant Edwards
ter in these kind of jobs. Using bash and find: (find path1 path2 path3 -type f -exec existingProgram {} \;) >outputFile -- Grant Edwards grante Yow! You can't hurt at me!! I have an ASSUMABLE

Re: Help with report

2005-07-11 Thread Grant Edwards
built-in int() the string formatting operator "%": http://docs.python.org/lib/typesseq-strings.html -- Grant Edwards grante Yow! All right, you at degenerates! I want this

Re: append one file to another

2005-07-12 Thread Grant Edwards
issue? The end-of-line characters might get converted -- even if they're not really "end-of-line" characters in the file in question. -- Grant Edwards grante Yow! My mind is a potato at field...

Re: Web client, https and session management

2005-07-12 Thread Grant Edwards
On 2005-07-12, Yannick Turgeon <[EMAIL PROTECTED]> wrote: > To acheive point #3, which is the goal, my web client has to manage > session (because of the login aspect). This is the part I don't know > how it's working. You might want to take a look at the ClientCookie pa

Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-14 Thread Grant Edwards
any way to get Python to return the correct results for those operations rather than raising an exception? There's no way to "resume" from the exception and return a value from an exception handler, right? [This is the other option allowed by the IEEE 754 standard.] -- Grant Edwards

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-14 Thread Grant Edwards
u > can't give a non-silly answer to my earlier "what does your > platform C return for the integer expression 42/0?" question > today . > >> There's no way to "resume" from the exception and return a >> value from an exception handl

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-14 Thread Grant Edwards
story, but the remarkable dominance of > the Pentium architecture changed everything on the HW side. As messed up as I think the IA32 architecture is, I do think Intel got FP mostly right. :) -- Grant Edwards grante Yow! If I felt any more

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-14 Thread Grant Edwards
On 2005-07-14, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-07-14, Tim Peters <[EMAIL PROTECTED]> wrote: > >> You may have forgotten how much richer the "plausible HW" landscape >> was at the time too. > > I've probably blocked most of it ou

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-14 Thread Grant Edwards
ion. > (although in a different way than the C implementation on the > same system). I can't find my copy of the standard at the moment, though I did just re-read Goldberg's 1991 discussion of the standard. -- Grant Edwards grante Yow! My Aunt MAUREEN

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-15 Thread Grant Edwards
On 2005-07-15, Michael Hudson <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: > >> I've read over and over that Python leaves floating point >> issues up to the underlying platform. > > Please read the conversation Tim and I are h

Re: socket programming

2005-07-19 Thread Grant Edwards
capability. > That's probably why my program dies, how can i get my code to > handle this? I don't understand what "this" is. If the server is sending you some sort of redirect message, then parse it and obey it. -- Grant Edwards grante

Re: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router?

2005-07-19 Thread Grant Edwards
On 2005-07-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Chris, How would a wireless router show a signal to noise ratio? On a web page. > Especially if it's providing the signal? It receives as well. At least mine does. Data goes both in and out.

Re: print pdf file to network printer using python

2005-07-21 Thread Grant Edwards
gt; f.close() > > Basically it doesnt work and what it prints out is the value of > pdffile_path variable. If anyone can offer some help, Id appreaciate it > thanks! You forgot to read the data from the pdf file. f = open(printer_path, 'w') f.write(open(pdffile_path,'rb

Re: Difference between " and '

2005-07-22 Thread Grant Edwards
o short, the good ones go over yer head. Ya got a hole in yer glove, boy, I keep pitching them and you keep missing them. Ya gotta keep yer eye on the ball, son. Eye. Ball. Eyeball. I almost had a funny there. Joke, that is. -- Grant Edwards grante

Re: return None

2005-07-22 Thread Grant Edwards
;s just not explicit enough for me. My preference would be that if the function didn't execute a "return" statement, then it didn't return anyting and attempting to use a return value would be an error. I suppose there probably is code out there that depends on the implicit "

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Grant Edwards
is: >>> def foo(): ... print "foo was called" ... >>> s = "foo" >>> globals()[s]() foo was called >>> -- Grant Edwards grante Yow! I'm meditating on at

Re: To thread or not to thread

2005-07-28 Thread Grant Edwards
ier to write buggy code containing race conditions using C/pthreads. -- Grant Edwards grante Yow! I want to read my new at poem about pork brains and visi.comouter space... -- http://mail.python.org/mailman/listinfo/python-list

Re: inheriting from datetime

2005-08-01 Thread Grant Edwards
ce/ You need to override __new__ rather than __init__ -- Grant Edwards grante Yow! I'm ANN LANDERS!! I at can SHOPLIFT!! visi.com -- http://mail.python.org/mailman/listinfo/python-list

py2exe windows apps path question

2005-08-02 Thread Grant Edwards
he search path for .dll's? -- Grant Edwards grante Yow! .. I think I'd at better go back to my DESK visi.comand toy with a few common

Re: py2exe windows apps path question

2005-08-02 Thread Grant Edwards
On 2005-08-02, vincent wehren <[EMAIL PROTECTED]> wrote: > > "Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] >|I have several python apps (some wxPython, some plain text-mode >| stuff) that I distribute internally for instal

Re: py2exe windows apps path question

2005-08-02 Thread Grant Edwards
> any location from the command line - sys.argv[0] just won't do > the trick in such a setting. I'll give that a try. -- Grant Edwards grante Yow! .. I think I'd at bette

Re: pain

2005-08-03 Thread Grant Edwards
form you're using either interprets the Java byte code or uses some variant of JIT compilation into native object code. -- Grant Edwards grante Yow! HELLO, little boys! at Gimme a MINT TULIP!! Let's

Re: Does any one recognize this binary data storage format

2005-08-09 Thread Grant Edwards
On 2005-08-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I can posted records as it will take up to much space. But all > three phone numbers are stored in 8 bytes with null bytes (ie. > 00) stored in the leading positions (ie. the left hand side) > > I do have some more examples; > > I have

Re: Does any one recognize this binary data storage format

2005-08-09 Thread Grant Edwards
On 2005-08-09, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >>>Ex #1) 333- >>>Hex On disk: 00 00 00 80 6a 6e 49 41 >>> >>>Ex #2) 666- >>>Hex On disk: 00 00 00 80 6a 6e 59 41 >> >> So there

Re: Does any one recognize this binary data storage format

2005-08-09 Thread Grant Edwards
On 2005-08-09, Christopher Subich <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> That would just be sick. I can't imagine anybody on an 8-bit >> CPU using FP for a phone number. > > Nobody on an 8-bit CPU would have a FPU, so I'll guarantee that t

Re: Does any one recognize this binary data storage format

2005-08-10 Thread Grant Edwards
On 2005-08-10, Bengt Richter <[EMAIL PROTECTED]> wrote: > On Tue, 09 Aug 2005 21:50:06 -0000, Grant Edwards <[EMAIL PROTECTED]> wrote: > >>On 2005-08-09, Scott David Daniels <[EMAIL PROTECTED]> wrote: >>> Grant Edwards wrote: >>>>>Ex #1

Re: Does any one recognize this binary data storage format

2005-08-10 Thread Grant Edwards
bers (whether integer or FP) when the only arithmetic > operations that can be applied to them stuff them up mightily > (like losing leading zeroes off post-codes, having NEGATIVE > tax file numbers, etc) and it's still happening on the best > OSes and 64-bit CPUS. W

Re: "Compile time" checking?

2005-08-10 Thread Grant Edwards
On 2005-08-11, Qopit <[EMAIL PROTECTED]> wrote: > >> if debug: print "v=%s" % (v,) > > Not that important, but I assume the first one was supposed to be: > > if debug: print "v=", s > > right? http://docs.python.org/tut/node9

Re: What is Python?!

2005-08-11 Thread Grant Edwards
y to run other programs and manipulate the programs' input/output streams. It can be done, but the semantics used to do so are identical to C (which nobody seems to think is a scripting language). Python is a general purposeprogramming language. -- Grant Edwar

Re: what's the exactly newsgroup url of python-list?

2005-08-11 Thread Grant Edwards
a news- > reader even if you don't have access to a "real" NNTP server, > see http://gmane.org/ Using an NNTP gateway to a mailing list that's gatewayed to a Usenet group. That's about like running Cygwin under Windows under Linux: there are valid reasons to do i

Re: how to append semicolon to a variable

2005-08-13 Thread Grant Edwards
';' 1) The append() method of a sequence doesn't return anything. 2) You call methods using () 3) String are immutable, and therefore don't have an append method. Perhaps you ought to read through the tutorial? -- Grant Edwards grant

Re: how to append semicolon to a variable

2005-08-13 Thread Grant Edwards
On 2005-08-13, tiissa <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> s = ';'.join([couch,price,sdate,city]) >> print s > > I'll risk myself with something like: > > s = ';'.join([tag.string for tag in [couch,price,sdate,city]]) &g

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