Re: OT: excellent book on information theory

2006-01-17 Thread Terry Hancock
On Mon, 16 Jan 2006 15:31:58 - Grant Edwards <[EMAIL PROTECTED]> wrote: > That made me smile on a Monday morning (not an > insignificant accomplishment). I noticed in the one > footnote that the H.P. book had been "translated into > American". I've always wondered about that. I noticed > sev

Re: Arithmetic sequences in Python

2006-01-17 Thread Gregory Petrosyan
Some ideas: 1) Let [a,b .. c] be *ordinary list* ! Just like [1,2,3]. Are there any questions why 3 is included in [1,2,3]? IMO it's more correct to think about [first, next .. last] as about syntax for list creation, but not as about "syntax-to-replace-range-function". (And, because it's an ordi

SMPP implementation in python

2006-01-17 Thread Alvin A. Delagon
Greetings! Does anyone know a good reference on how to implement SMPP in python. I can't find any besides NET::SMPP in perl and I don't want to get my hands for that. Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-17 Thread Antoon Pardon
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 and xrange. >> >> Oh come on, [5,4,..0] is much

_bsddb on NetBSD

2006-01-17 Thread Miki Tebeka
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. Any ideas? Thanks, Miki -- http://mail.python.org/mailman/listinfo/python-list

Addressing a COM port from Python

2006-01-17 Thread Doru-Catalin Togea
Hi! I am writing some tests and I need to place calls through the modem. Is there an API for addressing the COM ports on my machine, so that I can issue AT-commands to the modem? If this can not be done from Python, I am sure it can be done from C/C++/Java. Any tutorials/examples that you know

Re: exec a string in an embedded environment

2006-01-17 Thread Tommy Ryding
No it didn't help me :( the foo_ptr that is returned from PyRun_String is not a callable object. Therefor I can't call it from PyObject_Call. I would like to do the exact same procedure as I do when the code is located in a module (file). pModule = PyImport_Import(pName); Py_DECREF(pNam

Re: Addressing a COM port from Python

2006-01-17 Thread Fredrik Lundh
Doru-Catalin Togea wrote: > I am writing some tests and I need to place calls through the modem. Is > there an API for addressing the COM ports on my machine, so that I can > issue AT-commands to the modem? > > If this can not be done from Python, I am sure it can be done from > C/C++/Java. Any tu

Re: Addressing a COM port from Python

2006-01-17 Thread Miki Tebeka
Hello Catalin, > I am writing some tests and I need to place calls through the modem. Is > there an API for addressing the COM ports on my machine, so that I can > issue AT-commands to the modem? > > If this can not be done from Python, I am sure it can be done from > C/C++/Java. Any tutorials

Re: exec a string in an embedded environment

2006-01-17 Thread Tommy Ryding
I can't post that much of what I have done but some questions might answer if you e-mail me the question to my gmail.com address. [EMAIL PROTECTED] //Tommy -- http://mail.python.org/mailman/listinfo/python-list

Re: Web application design question (long)

2006-01-17 Thread bruno at modulix
Fried Egg wrote: > I must not express myself very clearly. > > I don't need any help with the disassociated text algorithm. What I > need is a framework for data processing web apps, If that's your main need, and you want to use a RDBMS, then you may want to have a look at turbogears http://turb

Re: Arithmetic sequences in Python

2006-01-17 Thread Paul Rubin
"Gregory Petrosyan" <[EMAIL PROTECTED]> writes: > 2) [5 .. 0] -> [5,4,3,2,1,0] > So, if "next" is omited, let the default step be 1 if "first" < "last" > and -1 otherwise. So what do you want [a..b] to do? Dynamically decide what direction to go? Ugh! -- http://mail.python.org/mailman/listinfo/

EOF occurred in violation of protocol

2006-01-17 Thread Glauco
Hi all, I have an urgent issue using some WebServices in ZSI and python 2.3.3. The Server Was obviously an ISS and today all my comunication end with: File "/opt/sfera/python2.3.3/lib/python2.3/socket.py", line 73, in ssl return _realssl(sock, keyfile, certfile) socket.sslerror: (8, 'EOF occ

Re: Arithmetic sequences in Python

2006-01-17 Thread Gregory Petrosyan
Hmm, and why not? Or you realy hate such behaviour? Note, everything I post here is just some ideas I want to discuss, and to make these ideas better after discussion. And this particular idea needs to be discussed, too. -- http://mail.python.org/mailman/listinfo/python-list

Re: Addressing a COM port from Python

2006-01-17 Thread Nick Craig-Wood
Doru-Catalin Togea <[EMAIL PROTECTED]> wrote: > I am writing some tests and I need to place calls through the modem. Is > there an API for addressing the COM ports on my machine, so that I can > issue AT-commands to the modem? http://pyserial.sourceforge.net/ Works well in my experience --

Re: Socket Programming HOWTO example

2006-01-17 Thread Manlio Perillo
Steve Holden ha scritto: > [...] > I can see you have changed the example a little (because I know that > Gordon's original didn't have comments in Italian). The example cames from italian translation of the howto: http://python.it/doc/howto/Socket/sockets-it/sockets-it.html Regards Manlio P

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

2006-01-17 Thread Giovanni Bajo
Neil Hodgson wrote: >> - There will be some opposition to the obvious policy of "keeping >> the bare minimum inside the DLL" because of inefficiencies in the >> Python build system. > > It is also non-optimal for those that do want the full set of > modules as separate files can add overhead f

Re: Class __init__ trouble

2006-01-17 Thread SkyRanger
So any one have ideas how to solve this problem??? I think my problem in code that adds new methods in class. Every time i add new methods it adds on single class or maybe globally. How to make it correctly??? -- http://mail.python.org/mailman/listinfo/python-list

ANN: Firedrop2 0.1.3 the Python Blog Client

2006-01-17 Thread Fuzzyman
Firedrop2 has had a new release and a complete docs overhaul. The release is a minor update, but the new tutorial will take you from downloading and installing, through setting up your blog to making entries. http://www.voidspace.org.uk/python/firedrop2/ What's New ? == The new release

Re: MVC Help

2006-01-17 Thread Fredrik Lundh
"Sbaush" <[EMAIL PROTECTED]> wrote: > The View must be only the clickable button > The Control must be the event listener on the button > The Model must be the action of the button. > If we can complete this MVC simple implementation we could publish this like > a "MVC SIMPLE TUTORIAL" because wi

Re: About socket threading

2006-01-17 Thread Steve Holden
Kr z wrote: > Hi, > > Do anyone know the Python source codes on how the client can send/"pump" > a lot of threads to the server class? > It isn't that difficult. Here's a basic threading framework that allows you to vary the number of threads fairly easily. Then you just have to make sure that

Re: Sudoku solver: reduction + brute force

2006-01-17 Thread ago
> But to inflate my ego beyond the known universe, here is my solver > (that solves the avove mentioned grid reasonably fast). I suppose the > only difference is that is uses 3, rather than 2, rules to simplify > before starting tree-like search. Thanks for the nice problem and the nice post. Th

Re: Class __init__ trouble

2006-01-17 Thread SkyRanger
Problem was solved by adding classes into new separate modules. -- http://mail.python.org/mailman/listinfo/python-list

Re: MVC Help

2006-01-17 Thread Sbaush
Thanks!!Is there a wx example? 2006/1/17, Fredrik Lundh <[EMAIL PROTECTED]>: "Sbaush" <[EMAIL PROTECTED]> wrote:> The View must be only the clickable button> The Control must be the event listener on the button> The Model must be the action of the button. > If we can complete this MVC simple implem

Re: magical expanding hash

2006-01-17 Thread Giovanni Bajo
James Stroud wrote: >> I need a magical expanding hash with the following properties: >> >> * it creates all intermediate keys >> >> meh['foo']['bar] = 1 >> >> -- works even if meh['foo'] didn't exist before >> >> * allows pushing new elements to leaves which are arrays >> >> meh['foo']['list] <<

Re: PDA Implementations

2006-01-17 Thread gregarican
Mike Meyer wrote: > On an unrelated topic, you might take a look at Symbian > devices. They've released a version of Python 2.3 for it. > > http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-17 Thread Steve Holden
Grant Edwards wrote: > On 2006-01-16, Tim Peters <[EMAIL PROTECTED]> wrote: > > http://www.inference.phy.cam.ac.uk/mackay/itila/Potter.html >> >>[Grant Edwards] >> >>>That made me smile on a Monday morning (not an insignificant >>>accomplishment). I noticed in the one footnote that the H.P.

Re: magical expanding hash

2006-01-17 Thread Diez B. Roggisch
> > BTW: remember that setdefault() is written "setdefault()" but it's read > "getorset()". I can only second that. The misleading name has - well, mislead me :) Regards, Diez -- http://mail.python.org/mailman/listinfo/python-list

ANN: Leo 4.4b1 released

2006-01-17 Thread Edward K. Ream
Leo 4.4 beta 1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 The code is stable; there are no known serious bugs. Some features are incomplete. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.

ANN:NewEdit 3.2 Released

2006-01-17 Thread limodou
What's it? It's an Editor based on wxPython. NewEdit uses Mixin and Plugin technique as its architecture. Most of its classes can be extended via mixin and plugin components, and finally become an integrity class at creating the instance. So NewEdit is very dynamic. You can write the new

Re: Newcomer question wrt variable scope/namespaces

2006-01-17 Thread Gary Duzan
Florian Daniel Otel wrote: > Gary, > > First of all, many thanks for the reply. Do I understand it correctly > that actually the rule has to be refined as pertaining to the (so > called) "immutable" types (like e.g. integers, tuples/strings) > whereas lists and dictionaries are "mutable" types

Re: OT: excellent book on information theory

2006-01-17 Thread Max Erickson
Steve Holden <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Grant Edwards wrote: >> On 2006-01-16, Tim Peters <[EMAIL PROTECTED]> wrote: >> >> >http://www.inference.phy.cam.ac.uk/mackay/itila/Potter.html >>> >>>[Grant Edwards] >>> That made me smile on a Monday morning (not an i

Re: Decimal ROUND_HALF_EVEN Default

2006-01-17 Thread Tim Peters
[LordLaraby] > If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? Not banker's rounding ;-). Same answer if you had said ROUND_HALF_UP instead (which I assume you intended) -- most of these don't have cute names. > I confess to never having heard the terms. ROUND_HALF_UP etc are

Re: Sudoku solver: reduction + brute force

2006-01-17 Thread Anton Vredegoor
ago wrote: > You can see my amended code in the link above. Thanks, I will look into it sometime. At the moment I'm at a library computer, which severely limits my Python options. Meanwhile I have been thinking about the sudoku problem, maybe it will prompt you, me or someone else to make some ki

Hi, about socket programming and threading

2006-01-17 Thread Kr z
Hi All!I wonder if anyone knows the simple code structure for a multithreaded web server handling multiple clients at the same time?Thanx!Regards.KrzGet an advanced look at the new version of MSN Messenger. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem of types:

2006-01-17 Thread Larry Bates
Laurent wrote: > I do not understand why he is talking me about 'str', no str given!!! > > I have this: > > - > > def to_float(elt): > if type(elt) is list: > return map(to_float, elt) > else: > return float(elt) > > def Denombrement(A,b,c

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

2006-01-17 Thread Larry Bates
Terry Carroll wrote: > It looks like ConfigParser will accept a list to be writing to the > *.ini file; but when reading it back in, it treats it as a string. > > Example: > > ### > import ConfigParser > def whatzit(thingname, thing): >print thingname, "value:", th

Re: Decimal ROUND_HALF_EVEN Default

2006-01-17 Thread Rocco Moretti
LordLaraby wrote: > If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I > confess to never having heard the terms. There was a Slashdot article on rounding a short while back: http://developers.slashdot.org/article.pl?sid=06/01/05/1838214 -- http://mail.python.org/mailman/listinfo

ANN: PyDev 0.9.8.7 released

2006-01-17 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.8.7 has been released. Check the homepage (http://pydev.sourceforge.net/) for more details. Details for Release: 0.9.8.7: Major highlights: * The debugger tracing was turned off (this was a bug in 0.9.8.6 an

forced spaces when inserting a variable between strings

2006-01-17 Thread mjteigen
I'm very new at Python, but have been trying it in conjunction with CGI. I've encountered a problem that I'm pretty sure is a trivial one, but I don't know enough Python to work it out. Here's an example. Imagine that I have a file named "5.jpg" in the same directory as this Python script: prin

Re: forced spaces when inserting a variable between strings

2006-01-17 Thread snoe
You can use: print "" % (number) or print "" or a number of others, but for short strings one of these two generally work fine. -- http://mail.python.org/mailman/listinfo/python-list

rational numbers

2006-01-17 Thread Schüle Daniel
Hello NG, recently I was using Scheme and Ruby and was really nicely surprised to find there support for the computing with rational numbers for example this how it works in Ruby mond:/pool/PROG/ruby # irb irb(main):001:0> irb(main):002:0* require "mathn" => true irb(main):003:0> r = Rational(1,

Re: forced spaces when inserting a variable between strings

2006-01-17 Thread Stephen Illingworth
mjteigen wrote: > My goal is print out ''. However, when I view the > source on the generated html page, I see this: > > > > In other words, that "5" has a space tacked on either side of it, and > of course a browser can't find the file. Is there a way I can avoid the > tacking of spaces on

Re: Decimal ROUND_HALF_EVEN Default

2006-01-17 Thread 3c273
Thanks to all! Interesting reading. Louis -- http://mail.python.org/mailman/listinfo/python-list

Re: forced spaces when inserting a variable between strings

2006-01-17 Thread Xavier Morel
mjteigen wrote: > I'm very new at Python, but have been trying it in conjunction with > CGI. I've encountered a problem that I'm pretty sure is a trivial one, > but I don't know enough Python to work it out. Here's an example. > Imagine that I have a file named "5.jpg" in the same directory as this

Re: magical expanding hash

2006-01-17 Thread Paul Rubin
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > BTW: remember that setdefault() is written "setdefault()" but it's read > > "getorset()". > > I can only second that. The misleading name has - well, mislead me :) Hmm, x[a][b][c][d] = e# x is a "magic" dict becomes x.setdefault(a,{}

Re: Testing complex new syntax

2006-01-17 Thread Carl Friedrich Bolz
Hi! [EMAIL PROTECTED] wrote: > I have some significantly extended syntax for Python that I need to > create a reference implementation for. My new syntax includes new > keywords, statements and objects that are sort of like classes but not > really. The implementation is all possible using standar

Re: rational numbers

2006-01-17 Thread Paul Rubin
Schüle Daniel <[EMAIL PROTECTED]> writes: > does anybody know modules which make rational numbers available? Try gmpy.mpq (google for gmpy). > and are there considerations to add them to the core, like > complex numbers (maybe in Python 3) I don't think it's been discussed much. -- http://mail.

Re: rational numbers

2006-01-17 Thread Paul Rubin
Schüle Daniel <[EMAIL PROTECTED]> writes: > does anybody know modules which make rational numbers available? > and are there considerations to add them to the core, like > complex numbers (maybe in Python 3) I think it's not likely. In Scheme, (/ 5 2) is the rational number 5/2, while in current

Re: Convert Active Directory Object to string

2006-01-17 Thread Fredrik Lundh
Dirk Hagemann wrote: > When I receive data from Microsoft Active Directory it is an >"ad_object" and has the type unicode. When I try to convert it to a > string I get this error: > UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in > position 26: ordinal not in range(128) > > Thi

Re: rational numbers

2006-01-17 Thread Carsten Haese
On Tue, 2006-01-17 at 11:22, Paul Rubin wrote: > Schüle Daniel <[EMAIL PROTECTED]> writes: > > does anybody know modules which make rational numbers available? > > Try gmpy.mpq (google for gmpy). > > > and are there considerations to add them to the core, like > > complex numbers (maybe in Python

Convert Active Directory Object to string

2006-01-17 Thread Dirk Hagemann
Hi! When I receive data from Microsoft Active Directory it is an "ad_object" and has the type unicode. When I try to convert it to a string I get this error: UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 26: ordinal not in range(128) This is caused by characters lik

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

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

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

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

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: 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

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: 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: _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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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

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: 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

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

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: 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

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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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 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 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

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 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

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

  1   2   >