Re: OT: excellent book on information theory

2006-01-17 Thread Steve Holden
Alex Martelli wrote: > Terry Hancock <[EMAIL PROTECTED]> wrote: >... > >>due to the Evil Conspiracy of region-coding, I couldn't >>watch the British DVD even if I were to import it (Well, >>yeah I could, but it would be painful, and probably illegal, > > > I have a region-free DVD player her

Re: Problem with FTPLib and incomplete files on some downloads

2006-01-17 Thread Martin Franklin
Peter A.Schott wrote: > I download a lot of 4-6 KB files and regularly run into issues with files that > don't get downloaded all the way or otherwise get corrupt. > > I do something like: > > RemoteList = nlstdir() > for filename in RemoteList: > LocalFile = open(filename, "wb") > LocalFile.

Re: search multiple dictionaries efficiently?

2006-01-17 Thread gene tani
Livin wrote: > I'm a noobie so please be easy on me. I have searched a ton and did not find > anything I could understand. > > I'm using py2.3 > > I've been using Try/Except but this gets long with multiple dictionaries. > > I found some code on web pages and such but cannot get them to work. Any

10060, 'Operation timed out'

2006-01-17 Thread Sumit Acharya
I am using following script to connect to the server and i try the connection for 1000 times. Some times it succeeds for all the 1000 times,but some times it fails with error:- 10060, 'Operation timed out'. When it fails with the abover error, it seems timed out time is 20 seconds. Is there a way I

Re: Is 'everything' a refrence or isn't it?

2006-01-17 Thread Max
Terry Hancock wrote: > On Sat, 07 Jan 2006 01:29:46 -0500 > Mike Meyer <[EMAIL PROTECTED]> wrote: > >>From what I can tell, Liskov proposed *three* different >>names for >>passing references to objects: call-by-sharing, >>call-by-object, and call-by-object-reference. > > > "Call by object refere

Re: XML Writer in wxPython

2006-01-17 Thread Tim Roberts
"Marco Meoni" <[EMAIL PROTECTED]> wrote: > >Could you post an example please? Not really; it depends on what it is you're writing. def PrintAddress( last, first, address, city, state, zip ): print " " print "%s" % last print "%s" % first print "%s" % address prin

Re: ConfigParser: writes a list but reads a string?

2006-01-17 Thread Terry Carroll
On Tue, 17 Jan 2006 09:11:24 -0600, Larry Bates <[EMAIL PROTECTED]> wrote: >To read lists from .INI files I use following: > >listvalues=INI.get(section, option).split(',') > >where INI is an instance of ConfigParser > >There is the problem of if list items contain commas. Thanks; that's basical

Re: Arithmetic sequences in Python

2006-01-17 Thread Alex Martelli
Tom Anderson <[EMAIL PROTECTED]> wrote: ... > Sounds good. More generally, i'd be more than happy to get rid of list > comprehensions, letting people use list(genexp) instead. That would > obviously be a Py3k thing, though. I fully agree, but the BDFL has already (tentatively, I hope) Pronounc

Funny! More offers to select a search engine!

2006-01-17 Thread zizi2002198
www.goodugle.com -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-17 Thread Alex Martelli
Terry Hancock <[EMAIL PROTECTED]> wrote: ... > due to the Evil Conspiracy of region-coding, I couldn't > watch the British DVD even if I were to import it (Well, > yeah I could, but it would be painful, and probably illegal, I have a region-free DVD player here in CA -- considering that I broug

Re: Newbie ? -- SGML metadata extraction

2006-01-17 Thread ProvoWallis
Thanks very much for your help. It's greatly appreciated. It look a couple of tries to see what was happening but I've figured it out. Greg -- http://mail.python.org/mailman/listinfo/python-list

Python 2.4, Win XP Pro and Tix

2006-01-17 Thread Mondal
Hi, After searching the messages on this group I concluded that perhaps no one has posted the problem and the solution I mention below. When I used Tix for the first time I recieved the following error message. >>> import Tix >>> r=Tix.Tk() Traceback (most recent call last): File "", line 1, i

Re: search multiple dictionaries efficiently?

2006-01-17 Thread George Sakkis
Livin wrote: > I'm a noobie so please be easy on me. I have searched a ton and did not find > anything I could understand. > > I'm using py2.3 > > I've been using Try/Except but this gets long with multiple dictionaries. > > I found some code on web pages and such but cannot get them to work. Any

Re: search multiple dictionaries efficiently?

2006-01-17 Thread Paul McGuire
"Livin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm a noobie so please be easy on me. I have searched a ton and did not find > anything I could understand. > > I'm using py2.3 > > I've been using Try/Except but this gets long with multiple dictionaries. > > I found some code o

Re: HP open source printer drivers are in Python

2006-01-17 Thread Andy Leszczynski
Andy Leszczynski wrote: > I have a specific question, anybody is familiar? Just wanted to report, that problem is solved :-). But seriously, sorry for enigmatic question. I have had a very weird problem with HPLIP 0.97. Wanted to check out if there is someone familiar with the design of HPLIP

Re: check to see if value can be an integer instead of string

2006-01-17 Thread nephish
this looks like the solution i am looking for. thanks for the education by the way. i have a couple of other try / except clauses. Never thought of pulling it off like that. thanks very much, really simple. -- http://mail.python.org/mailman/listinfo/python-list

The Python cross? Was New Python.org website

2006-01-17 Thread Obaid R.
Bugs wrote: > I thought I read here that a new website design was in the works for > python.org in time for the new year? Is that still true and of so, > anyone know what is it's status? > Thanks! I googled around and found no background on how the new Python logo came to be selected. Does any o

Re: check to see if value can be an integer instead of string

2006-01-17 Thread gry
[EMAIL PROTECTED] wrote: > Hello there, > i need a way to check to see if a certain value can be an integer. I > have looked at is int(), but what is comming out is a string that may > be an integer. i mean, it will be formatted as a string, but i need to > know if it is possible to be expressed as

Re: check to see if value can be an integer instead of string

2006-01-17 Thread Brian Cole
Python uses "Exceptions" to catch these "Exceptional" situations:http://docs.python.org/tut/node10.html -Brian Cole On 17 Jan 2006 18:51:44 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > thanks for the reply, but wont python fail out if you try to make an > integer out of what cant be an i

search multiple dictionaries efficiently?

2006-01-17 Thread Livin
I'm a noobie so please be easy on me. I have searched a ton and did not find anything I could understand. I'm using py2.3 I've been using Try/Except but this gets long with multiple dictionaries. I found some code on web pages and such but cannot get them to work. Any help is appreciated as I

Re: check to see if value can be an integer instead of string

2006-01-17 Thread nephish
thanks for the reply, but wont python fail out if you try to make an integer out of what cant be an integer? like this : var = int(abc) wont this crash ? -- http://mail.python.org/mailman/listinfo/python-list

Re: magical expanding hash

2006-01-17 Thread James Stroud
braver wrote: > Thanks, James! This is really helpful. > > : It would take a lot of coding to make that << work right. Better is > the pythonic > : > : m[key] = [value] > : > : Its really only one more keystroke than > : > : m[key] << value > > But it's only for the first element, right? I'd ha

Re: check to see if value can be an integer instead of string

2006-01-17 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Hello there, > i need a way to check to see if a certain value can be an integer. I > have looked at is int(), but what is comming out is a string that may > be an integer. i mean, it will be formatted as a string, but i need to > know if it is possible to be expressed as

Re: magical expanding hash

2006-01-17 Thread Jean-Paul Calderone
On Tue, 17 Jan 2006 16:47:15 -0800, James Stroud <[EMAIL PROTECTED]> wrote: >braver wrote: >> Well, I know some python, but since there are powerful and magical >> features in it, I just wonder whether there're some which address this >> issue better than others. >> > >In python, += is short, of co

Re: OT: excellent book on information theory

2006-01-17 Thread Paul Rubin
Terry Hancock <[EMAIL PROTECTED]> writes: > > > Very interesting. And rather sad that editors think the > > > average Amermican reader too dim-witted to figure out > > > (in context, even) that a "car park" is a "parking lot" > > > and a "dustbin" is a "trash can." > > > ... > The real reason is t

check to see if value can be an integer instead of string

2006-01-17 Thread nephish
Hello there, i need a way to check to see if a certain value can be an integer. I have looked at is int(), but what is comming out is a string that may be an integer. i mean, it will be formatted as a string, but i need to know if it is possible to be expressed as an integer. like this var = some

Another method of lazy, cached evaluation.

2006-01-17 Thread simonwittber
Recently, I needed to provide a number of game sprite classes with references to assorted images. I needed a class to: - allow instances to specify which image files they need. - ensure that a name should always refer to the same image. - only load the image if it is actually used. Af

Re: How to get Windows system information?

2006-01-17 Thread dpickles
nevermind, found it thanks all! -- http://mail.python.org/mailman/listinfo/python-list

Re: magical expanding hash

2006-01-17 Thread braver
Thanks, James! This is really helpful. : It would take a lot of coding to make that << work right. Better is the pythonic : : m[key] = [value] : : Its really only one more keystroke than : : m[key] << value But it's only for the first element, right? I'd have to say meh[key1]...[keyN].append(el

Dr. Dobb's Python-URL! - weekly Python news and links (Jan 18)

2006-01-17 Thread Magnus Lycka
QOTW: "*what* the value is is defined by the operations that the object supports (via its type). *how* the value is represented inside the object is completely irrelevant; a Python implementation may use electric charges in small capacitors, piles of rocks, diapers,or an endless supply of small

Re: Preventing class methods from being defined

2006-01-17 Thread David Hirschfield
I realize now that it would probably be best to define the problem I'm having according to the constraints imposed by other requirements, and not by describing the basic functionality. That way, since there are so many possible ways to get something like what I want, there will probably be only

Re: magical expanding hash

2006-01-17 Thread Steven Bethard
Steve Holden wrote: > Steven Bethard wrote: >> Agreed. I really hope that Python 3.0 applies Raymond Hettinger's >> suggestion "Improved default value logic for Dictionaries" from >> http://wiki.python.org/moin/Python3%2e0Suggestions >> >> This would allow you to make the setdefault() call o

Re: Arithmetic sequences in Python

2006-01-17 Thread Steven Bethard
Gregory Petrosyan wrote: > Hey guys, this proposal has already been rejected (it is the PEP 204). No, this is a subtly different proposal. Antoon is proposing *slice* literals, not *range* literals. Note that "confusion between ranges and slice syntax" was one of the reasons for rejection of `

Re: magical expanding hash

2006-01-17 Thread James Stroud
braver wrote: > Well, I know some python, but since there are powerful and magical > features in it, I just wonder whether there're some which address this > issue better than others. > In python, += is short, of course, for a = a + 1 But if we haven't already assigned a, how does the interpret

Re: Converting TIFF files to PDF and/or JPEG

2006-01-17 Thread [EMAIL PROTECTED]
The Tiff library and utilities combined with Ghostscript make this very easy. http://www.remotesensing.org/libtiff/ http://www.cs.wisc.edu/~ghost/ With the above two packages installed, you can do something like this in Python: def tiff2pdf(width, length, files): path, filename = os.pat

Re: Arithmetic sequences in Python

2006-01-17 Thread Xavier Morel
Paul Rubin wrote: > I don't think this is a valid objection. Python is already full of > syntactic sugar like indentation-based block structure, infix > operators, statements with keyword-dependent syntax, etc. It's that > very sugar that attracts programmers to Python away from comparatively > s

Re: Running DOS App on win32 via python over ssh

2006-01-17 Thread Peter Hansen
James Stroud wrote: > The program in question, in case anyone doesn't understand this problem, > is lem: > > http://spitswww.uvt.nl/web/fsw/mto/lem/lemdos.zip Well, LEM.EXE calls RTM.EXE and RTM.exe contains signs of not being a pure DOS program. It contains references to USER.EXE and KERNEL.E

Re: Arithmetic sequences in Python

2006-01-17 Thread Tom Anderson
On Tue, 17 Jan 2006, Antoon Pardon wrote: > Op 2006-01-16, Alex Martelli schreef <[EMAIL PROTECTED]>: >> Paul Rubin wrote: >> >>> Steven D'Aprano <[EMAIL PROTECTED]> writes: For finite sequences, your proposal adds nothing new to existing solutions like range a

Re: Ordering numbers

2006-01-17 Thread Fredrik Lundh
"yawgmoth7" wrote: > I have a dictonary here: > > seq = {8:0x13AC9741, 10:0x27592E8, 4:0x4EB25D, 5:0x9D64B, 7:0x13AC9, > 1:0x2759, 11:0x4EB, 3:0x9D, 9:0x13, 2:0x2, 0:0x0, 6:0x0} > > Python always prints them in order, from least to greatest. nope. Python prints them in ... in an arbitrary o

Re: Arithmetic sequences in Python

2006-01-17 Thread Tom Anderson
On Tue, 16 Jan 2006, it was written: > Tom Anderson <[EMAIL PROTECTED]> writes: > >> The natural way to implement this would be to make .. a normal >> operator, rather than magic, and add a __range__ special method to >> handle it. "a .. b" would translate to "a.__range__(b)". I note that >> Ro

Ordering numbers

2006-01-17 Thread yawgmoth7
I have a dictonary here: seq = {8:0x13AC9741, 10:0x27592E8, 4:0x4EB25D, 5:0x9D64B, 7:0x13AC9, 1:0x2759, 11:0x4EB, 3:0x9D, 9:0x13, 2:0x2, 0:0x0, 6:0x0} Python always prints them in order, from least to greatest. But I wanna have it show them in hte order that I put in. Thanks for all your help gu

Re: OT: excellent book on information theory

2006-01-17 Thread Terry Hancock
On Tue, 17 Jan 2006 13:28:15 + Steve Holden <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > > Very interesting. And rather sad that editors think the > > average Amermican reader too dim-witted to figure out > > (in context, even) that a "car park" is a "parking lot" > > and a "dustbin" is

Re: Shrinky-dink Python (also, non-Unicode Python build is broken)

2006-01-17 Thread Larry Hastings
> Are you willing to monitor and fix new Py_USING_UNICODE issues or > are you proposing just to produce a patch now and then expect > contributors to maintain this feature? Neither, I suppose, or perhaps both. I am proposing to produce a patch now which fixes the non-Unicode build under Windows.

Re: Web application design question (long)

2006-01-17 Thread Tom Anderson
On Tue, 16 Jan 2006, Fried Egg wrote: > I am interested if anyone can shed any light on a web application > problem, I'm not going to help you with that, but i am going to mention the Dada Engine: http://dev.null.org/dadaengine/ And its most famous incarnation, the Postmodernism Generator: h

Re: magical expanding hash

2006-01-17 Thread braver
Well, I know some python, but since there are powerful and magical features in it, I just wonder whether there're some which address this issue better than others. -- http://mail.python.org/mailman/listinfo/python-list

Re: On Numbers

2006-01-17 Thread Tom Anderson
On Mon, 16 Jan 2006, Erik Max Francis wrote: > Steven D'Aprano wrote: > >> The square root of 1 is +1 (the negative root being explicitly >> rejected). Pure mathematicians, who may be expected to care whether the >> root is the integer 1 or the real number 1, are unlikely to write >> 1**0.5, pr

Re: Testing complex new syntax

2006-01-17 Thread Carl Friedrich Bolz
[EMAIL PROTECTED] wrote: > Carl Friedrich Bolz wrote: > >>I cannot really say much about how easy it would be to just write a >>preprocessor. However, I think what you are trying to do could be done >>reasonably easy with the PyPy project: >> >>http://codespeak.net/pypy >> >>PyPy is an implementat

Re: magical expanding hash

2006-01-17 Thread Paul Rubin
"braver" <[EMAIL PROTECTED]> writes: > Can assigning to hash without intermediate levels, possibly adding to a > numeric leaf or adding an element to a leaf array, be python code? > > h['a']['b']['c'] += 42 > > If it can, I'd like to have a class which supports it. Yes, it's simple enough to wri

Re: magical expanding hash

2006-01-17 Thread braver
Can assigning to hash without intermediate levels, possibly adding to a numeric leaf or adding an element to a leaf array, be python code? h['a']['b']['c'] += 42 If it can, I'd like to have a class which supports it. Is keeping a list at the leaf of a hash python code? h['a']['b']['c'].push(7)

Re: Converting TIFF files to PDF and/or JPEG

2006-01-17 Thread Paul Rubin
"sophie_newbie" <[EMAIL PROTECTED]> writes: > It looks like this odd compression format is not supported, or am i > wrong? > > I know its a long shot but would anyone have a different solution? I don't know about doing it directly in Python but there's a Linux command line utility called tiff2ps

Re: Arithmetic sequences in Python

2006-01-17 Thread Gregory Petrosyan
Hey guys, this proposal has already been rejected (it is the PEP 204). -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting TIFF files to PDF and/or JPEG

2006-01-17 Thread Fredrik Lundh
"sophie_newbie" <[EMAIL PROTECTED]> wrote: > As part of a college project I'm trying to write a script to convert > TIFF images downloaded from the US patent office site, www.uspto.gov. > > The tiff images are encoded using CCITT Group 4 compression and appear > to throw an error when i try to sav

pythonw problem?

2006-01-17 Thread Colin J. Williams
If I execute the single liner below in Boa Constructor, Python Scripter or PythonWin, I get crashes, using windows XP with numpy 0.9.2. Examples: # Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] # wxPython 2.6.1.0, Boa Constructor 0.4.4 # Type "copyright", "credits" or "li

Re: magical expanding hash

2006-01-17 Thread Fredrik Lundh
"braver" wrote: > The point of this exercise is to compare how either ruby or python can > implement perl's default behavior when dealing with hashes. Since > these are bread and butter of scripting, having a MEH class handy can > enable fast semantically equivalent translation. This can be > be

Converting TIFF files to PDF and/or JPEG

2006-01-17 Thread sophie_newbie
Hey guys, As part of a college project I'm trying to write a script to convert TIFF images downloaded from the US patent office site, www.uspto.gov. The tiff images are encoded using CCITT Group 4 compression and appear to throw an error when i try to save them using the Image library: >>> im.sa

Re: magical expanding hash

2006-01-17 Thread braver
The point of this exercise is to compare how either ruby or python can implement perl's default behavior when dealing with hashes. Since these are bread and butter of scripting, having a MEH class handy can enable fast semantically equivalent translation. This can be beneficial for demonstrating

Re: New Python.org website ?

2006-01-17 Thread Tim Chase
>>I've got an old copy of the html and tried to fix the general problem. >>It's currently on another website >> >>http://pyyaml.org/downloads/masterhtml/ This seems to no longer have the problem and scales nicely no matter which font-size I use. Good work! -tim -- http://mail.python.org/ma

Re: magical expanding hash

2006-01-17 Thread Fredrik Lundh
"braver" wrote > Exactly, << as in C++/ruby streams. But notice the extra checks needed > to see whether we want a new leaf which is an array or a number, or we > create an intermediate hash level. Would the checks look the same in > python? we? trust me, the number of people who think it's a

Re: New Python.org website ?

2006-01-17 Thread [EMAIL PROTECTED]
Tim Parkin wrote: > [EMAIL PROTECTED] wrote: > > JW wrote: > >>Very strange. With FF 1.0.7, I can just get the buttons to violate the > >>next column if I "View>Page Style>Large Text", but I wouldn't have noticed > >>it unless Tim had pointed it out. Tim's gifs are much worse than what > >>I see.

Re: Shrinky-dink Python (also, non-Unicode Python build is broken)

2006-01-17 Thread Neil Hodgson
Larry Hastings: > As for future development of Windows-specific Python features... > doesn't that generally happen in modules, rather than the Python > interpreter, these days? Either in Mark Hammond's pywin32 (what used > to be called "win32all"), or perhaps done in Python using ctypes. > There

Re: Testing complex new syntax

2006-01-17 Thread astromog
Carl Friedrich Bolz wrote: > I cannot really say much about how easy it would be to just write a > preprocessor. However, I think what you are trying to do could be done > reasonably easy with the PyPy project: > > http://codespeak.net/pypy > > PyPy is an implementation of a Python interpreter writ

Re: magical expanding hash

2006-01-17 Thread Paul Rubin
"braver" <[EMAIL PROTECTED]> writes: > Exactly, << as in C++/ruby streams. But notice the extra checks needed > to see whether we want a new leaf which is an array or a number, or we > create an intermediate hash level. Would the checks look the same in > python? You could check what is being sh

Re: Can't compile

2006-01-17 Thread Fredrik Lundh
"llothar" wrote: > Here i jump into this thread. > With this option the configure script runs well. > But then i get a compile error in complexobject. so what did the compiler say ? have you tried googling for relevant portions of the error message ? could this be the problem you're seeing ?

Re: Indentation/whitespace

2006-01-17 Thread Dave Hansen
On 16 Jan 2006 20:41:24 -0800 in comp.lang.python, "thakadu" <[EMAIL PROTECTED]> wrote: >Yes, thats what you have to do. And that was my original point, you >cannot just paste and go, you have to first reformat. My heart bleeds. Regards, -=Dave -- Change

Re: magical expanding hash

2006-01-17 Thread Fredrik Lundh
"braver" wrote > Exactly, << as in C++/ruby streams. But notice the extra checks needed > to see whether we want a new leaf which is an array or a number, or we > create an intermediate hash level. Would the checks look the same in > python? we? trust me, the number of people who think it's a

Re: magical expanding hash

2006-01-17 Thread braver
Exactly, << as in C++/ruby streams. But notice the extra checks needed to see whether we want a new leaf which is an array or a number, or we create an intermediate hash level. Would the checks look the same in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: time scheduling in ptyhon

2006-01-17 Thread utabintarbo
http://sourceforge.net/projects/pycron/ -- http://mail.python.org/mailman/listinfo/python-list

Re: magical expanding hash

2006-01-17 Thread Paul Rubin
"braver" <[EMAIL PROTECTED]> writes: > Actually, the behavior is important to translate perl into ruby. Can > it be implemented in python looking similarly? It's kind of bizarre in Python to use << as a mutation operator, but I guess you could do it. Sort of like 'cout << "hello world"' in C++.

Re: magical expanding hash

2006-01-17 Thread Steve Holden
Steven Bethard wrote: > Paul Rubin wrote: > >>Hmm, >> >> x[a][b][c][d] = e# x is a "magic" dict >> >>becomes >> >> x.setdefault(a,{}).setdefault(b,{}).setdefault(c,{})[d] = e >> >>if I understand correctly. Ugh. > > > Agreed. I really hope that Python 3.0 applies Raymond Hettinger's >

Re: chi-squared tests in python?

2006-01-17 Thread Rob Cowie
>> Matthew >> ps: given the "batteries included" philosphy, there's a remarkable dearth >> of stats in python... >I think Chi^2 tests fall distinctly in the "third-party library" category, >>myself. I don't know... I've often thought the Standard Library should include a stats package. -- http

Using CGI to interface with an XML-RPC server

2006-01-17 Thread Rob Cowie
Hi all, Assume I have a working XML-RPC server that runs persistently and correctly accepts remote calls, executes the relevant code and outputs the XML-RPC result. This is fine when using an XML-RPC client. However, I wish to provide a web user interface. I gather it is possible to use PHP as an

Re: magical expanding hash

2006-01-17 Thread braver
Actually, the behavior is important to translate perl into ruby. Can it be implemented in python looking similarly? -- http://mail.python.org/mailman/listinfo/python-list

Re: magical expanding hash

2006-01-17 Thread Paul Rubin
"braver" <[EMAIL PROTECTED]> writes: > Nice. What about pushing to leaves which are arrays, or incrementing > leaves which are numbers? If the array leaf didn't exist, or a number > wasn't set yet, << must create an empty array and push the element from > the RHS into it, and += must init the lea

Bounce messages

2006-01-17 Thread Grant Edwards
Whould whoever is gatewaying c.l.p postings to a mailing list _please_ remove the return addresses on the postings so we don't have to put up with bounce messages everytime we post? -- Grant Edwards grante Yow! Everywhere I look at

Re: StringVar() IntVar() vs. Dictionary of same

2006-01-17 Thread Bob Greschke
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Bob Greschke" <[EMAIL PROTECTED]> writes: >> Just roughly what do you think the effect would be? > > Either extremely slight or else nonexistent. I kinda thought so. Thanks! Bob -- http://mail.python.org/mailm

Re: Running DOS App on win32 via python over ssh

2006-01-17 Thread James Stroud
Peter Hansen wrote: > James Stroud wrote: > >> I am helping someone write a python script to run their DOS >> application through an SSH terminal. It seems that this program wants >> to access a DOS shell and send output there. If running remotely, this >> causes a problem because it locks up t

Re: time scheduling in ptyhon

2006-01-17 Thread Grant Edwards
On 2006-01-17, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I need schedule some jobs, times of this jobs are read from database. > So i would like to periodically(every hour) run some python script $ man cron > (or leave runnig some script which will every hour start some > method) which will

Re: SMPP implementation in python

2006-01-17 Thread Damjan
You can see some code here http://pysmpp.sourceforge.net/ but it's not complete... it need much more work. -- http://mail.python.org/mailman/listinfo/python-list

time scheduling in ptyhon

2006-01-17 Thread jiri . juranek
Hello, i am learning python so this will be propably a stupid question/problem, so sorry ;) I need schedule some jobs, times of this jobs are read from database. So i would like to periodically(every hour) run some python script(or leave runnig some script which will every hour start some method)

Re: Decimal ROUND_HALF_EVEN Default

2006-01-17 Thread Bengt Richter
On 16 Jan 2006 20:36:12 -0800, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote: >LordLaraby wrote: >> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I >> confess to never having heard the terms. > >The terms are defined in the docs for the Context object: >http://docs.python.or

Re: magical expanding hash

2006-01-17 Thread braver
Nice. What about pushing to leaves which are arrays, or incrementing leaves which are numbers? If the array leaf didn't exist, or a number wasn't set yet, << must create an empty array and push the element from the RHS into it, and += must init the leaf to 0 and add the RHS to it. Here's the corr

Re: Socket Programming HOWTO example

2006-01-17 Thread Bryan Olson
I mis-phrased: > The code passes > 'self' to __init__, but not to any of the others methods. Of course I meant that the formal parameter for self is missing. > > class mysocket: > >> '''classe solamente dimostrativa >> - codificata per chiarezza, non per efficenza''' >>

Re: Can't compile

2006-01-17 Thread llothar
Here i jump into this thread. With this option the configure script runs well. But then i get a compile error in complexobject. I'm using Solaris in 32-Bit Mode on my AthlonX2. -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing class methods from being defined

2006-01-17 Thread David Hirschfield
>>bit more insight into the arrangement I'm trying to get: >> >>restrict = True >> >> >Why a global value? If it is to affect class instantiation, why not pass it >or a value to the constructor, e.g., C(True) or C(some_bool)? > > > For reasons unrelated to this problem, the class that does t

Re: Socket Programming HOWTO example

2006-01-17 Thread Bryan Olson
Marco Meoni wrote: > Hi. I read the Gordon McMillan's "Socket Programming Howto". > I tried to use the example in this howto but this doesn't work. You are right, that obviously won't work. The code passes 'self' to __init__, but not to any of the others methods. I'm cc'ing this post to [EMAIL PR

Re: SQLObject connection pooling

2006-01-17 Thread jeff . lewis
Hi Jake, When establishing a new connection using sqlobject, there is a param called cache that has a default val of True. See http://sqlobject.org/SQLObject.html#declaring-the-class For more info, potential gotchas, etc, check out http://wiki.sqlobject.org/connections.html http://pythonpaste.

Re: Preventing class methods from being defined

2006-01-17 Thread Bengt Richter
On Mon, 16 Jan 2006 18:55:43 -0800, David Hirschfield <[EMAIL PROTECTED]> wrote: >Thanks for this, it's a great list of the ways it can be done. Here's a Actually, your way is yet another ;-) >bit more insight into the arrangement I'm trying to get: > >restrict = True Why a global value? If it i

Re: magical expanding hash

2006-01-17 Thread Steven Bethard
Paul Rubin wrote: > Hmm, > >x[a][b][c][d] = e# x is a "magic" dict > > becomes > >x.setdefault(a,{}).setdefault(b,{}).setdefault(c,{})[d] = e > > if I understand correctly. Ugh. Agreed. I really hope that Python 3.0 applies Raymond Hettinger's suggestion "Improved default value

Re: chi-squared tests in python?

2006-01-17 Thread Robert Kern
Matthew Vernon wrote: > Hi, > > I'd like to be able to use the chi-squared test in my code. Currently, > I can output "look up [this value] in a chi-squared table with [x] > degrees of freedom", but that's obviously a little sub-optimal. I > notice that numarray has a chi_square function, but that

Re: Arithmetic sequences in Python

2006-01-17 Thread Steven Bethard
Antoon Pardon wrote: > Why don't we give slices more functionality and use them. > These are a number of ideas I had. (These are python3k ideas) > > 1) Make slices iterables. (No more need for (x)range) > > 2) Use a bottom and stop variable as default for the start and >stop attribute. top wo

Re: HTML library

2006-01-17 Thread Cliff Wells
On Tue, 2006-01-17 at 09:28 -0800, Ron Griswold wrote: > Hi Folks, > > > > Can someone point me in the direction of an html library that > generates html text for you. For example, if I had a tuple of tuples, > I’d like a function that would create a table for me. I’ve looked > through the stan

Re: _bsddb on NetBSD

2006-01-17 Thread Laszlo Zsolt Nagy
Miki Tebeka wrote: >Hello All, > >I can't seem to build Python2.4.2 with bsddb on NetBSD. >bsddb seems to be missing from the pkg_add installation as well. > > Please look at the message that you get when you execute pkg_add -r python You will see that tkinter, bsddb, gdbm and some other libs

RE: HTML library

2006-01-17 Thread Ron Griswold
Hi Cliff, Looks like xist is exactly what I'm looking for. Thank you, Ron Griswold Character TD R!OT Pictures [EMAIL PROTECTED] -Original Message- From: Cliff Wells [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 9:33 AM To: Ron Griswold Cc: python-list@python.org Subject:

Re: Looking for standalone Python

2006-01-17 Thread Twig
Szabolcs Nagy wrote: >>Is this possible? > > yes: movable python > http://www.voidspace.org.uk/python/movpy/introduction.html > Thanks! Also found this: http://arctrix.com/nas/python/standalone.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for standalone Python

2006-01-17 Thread Szabolcs Nagy
> Is this possible? yes: movable python http://www.voidspace.org.uk/python/movpy/introduction.html -- http://mail.python.org/mailman/listinfo/python-list

chi-squared tests in python?

2006-01-17 Thread Matthew Vernon
Hi, I'd like to be able to use the chi-squared test in my code. Currently, I can output "look up [this value] in a chi-squared table with [x] degrees of freedom", but that's obviously a little sub-optimal. I notice that numarray has a chi_square function, but that just gives you random numbers fro

Re: SMPP implementation in python

2006-01-17 Thread Todd Whiteman
SMPP, are you referring to the Short Message Peer to Peer protocol? If so, I implemented this in python some 4 years ago for SMPP v3.4, I have the source code, which I might release LGPL if interested. Cheers, Todd Alvin A. Delagon wrote: > Greetings! > > Does anyone know a good reference on ho

HTML library

2006-01-17 Thread Ron Griswold
Hi Folks,   Can someone point me in the direction of an html library that generates html text for you. For example, if I had a tuple of tuples, I’d like a function that would create a table for me. I’ve looked through the standard library and it only seems to have html parsers. I need to

Looking for standalone Python

2006-01-17 Thread Twig
Hello, I have a need to have python on intranet server for other users to create a common tool base for working community (SW). So that workers can take it in use just by mapping the drive adding dirs to paths. Need to have all standard modules at the same place, so there would not be any loca

Find and slice problem

2006-01-17 Thread jont999
Hi guys, been going around in circles with this so I hope you can help! My current situation is I'm using Grinder and Jython to test pages, but the log on process is giving me some headaches. After entering the correct username and password, you then need to enter 3 characters from the security ph

  1   2   >