Claudio Grondi wrote:
> Dennis Lee Bieber wrote:
>
>>On Thu, 19 Jan 2006 17:25:38 +0100, Claudio Grondi
>><[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>>
>>
>>
>>>Any hints towards enlightenment what this from the geometry known term
>>>'ellipsis' mean in Python? Googling show
[EMAIL PROTECTED] wrote:
> ok i found something that works. instead of using the def i did this:
>
> for incident in row('div', {'class': 'food' or 'drink' }):
>
> and it worked!
'food' or 'drink' doesn't do what you think it does:
>>> 'food' or 'drink'
'food'
>>> {'class': 'food'
Hello,
I am trying to study/understand OOP principles using Python. I have
found following code http://tinyurl.com/a4zkn about FSM (finite state
machine) on this list, which looks quite useful for my purposes. As
this code was posted long time ago (November 1998) I would like to ask
if the principl
Rats, you beat me to it.
It seems to work if I just give the same, combined file as the argument
to both the key_file and cert_file parameters. (that's not to say that
it doesn't work if I do something else).
In my case, the passphrase is packaged up in the xml payload and sent
over.
Thank you
Fredrik Lundh wrote:
> > If I see this correctly, Fredrik would volonteer to (help) implement
> > something that imports the current python.org content into a Wiki.
>
> Exactly.
I don't really have time for this tonight, and I've spent more time copying
and pasting stuff than working on the conve
Hi Steve,You were absolutely correct! Sorry for the slow reply, but I was off for a couple of days and had shelved the problem. Saw your reply today and tried it. I then re-read the mxODBC docs and saw the section that I should have read a little better.
Thanks again.Bill.On 1/12/06, Steve Holden <
Hi!
I'm working under RedHat Linux (Advanced Server 3.0, kernel 2.4) and would like
to determine thread identifiers in my multithreaded application. The "ps -efm"
shell command lists every thread id of my process, but I do not know how to get
them from Python. os.getpid() returns the same numbe
Fredrik Lundh wrote:
> any special reason why pexpect cannot ship with a standard distutils
> setup.py file (or even egg support) ?
Oh, apparently there is a standard/builtin python distribution
mechanism called 'distutils'.
I guess on the install issue my only suggestion would be for the
pexpe
On 2006-01-19, Terry Hancock <[EMAIL PROTECTED]> wrote:
>>> given that it's trivial to create fork bombs and memory
>>> monsters in all those languages, I think you might need
>>> to define the term "real OS".
>>>
>>> (or do you run all your programs in a virtual sandbox ?)
>>
>> I guess I never
funkyj wrote:
> Fredrik Lundh wrote:
>
>>any special reason why pexpect cannot ship with a standard distutils
>>setup.py file (or even egg support) ?
>
>
>
> Oh, apparently there is a standard/builtin python distribution
> mechanism called 'distutils'.
>
> I guess on the install issue my only
Hi,
I liked the twist at the end when you state that only the first two 2's
count. It reminded me
of my maths O'level revision where you always had to read the question
thoroughly.
Here is what I came up with:
>>> ref
[2, 2, 4, 1, 1]
>>> lst
[2, 2, 5, 2, 4]
>>> tmp = [ [val]*min(lst.count(val), r
Fredrik Lundh wrote:
> Markus Wankus wrote:
>
>> Well I happen to agree whole-heartedly with Tim on that one. I can't
>> stand trying to navigate some of these Wiki-trying-to-be-website pages.
>> It is impossible to find anything on most of them (notice I didn't say
>> all..there are exceptions)
Derek wrote:
> Hi,
>
> I am looking to port Python to an embedded platform (an ARM7 device with
> fairly limited memory, capable of running an RTOS, but not an OS, such as
> Linux). I came across DePython from a few years ago, but it seems to have
> died a death.
>
> Does anybody have advice? I am
pycraze wrote:
> Hi guys,
>
> I Need to know how do i create a dictionary... eg:
> n = pali_hash
> n={}
> n={1:{ } } -> i need to know how to make a key of a dictionary, to a
> dictionary using Python/C API's
It looks like you are asking how to create a dictionary (hash). If it
is more t
A.M. Kuchling wrote:
> > The renderer/template engine can deal with that.
>
> Um... yeah, but how? We can group pages into folders ('Doc/whatever',
> 'SuccessStories/Whatever'), and then say it'll retrieve 'Doc/Sidebar'
> for the sidebar. But how could a particular page add more stuff to
> the s
Petr Jakes wrote:
> Hello,
> I am trying to study/understand OOP principles using Python. I have
> found following code http://tinyurl.com/a4zkn about FSM (finite state
> machine) on this list, which looks quite useful for my purposes. As
> this code was posted long time ago (November 1998) I would
On Thu, 19 Jan 2006 11:58:27 -0600 in comp.lang.python, Terry Hancock
<[EMAIL PROTECTED]> wrote:
[...]
>At worst, the cross might be a reference to "The Spanish
>Inquisition", which anyone who knows anything about Python
>should know is topical.
Perhaps, but they wouldn't expect it...
Regards,
On 2006-01-19, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>> Does anybody have advice? I am looking for any tricks, features I can
>> disable, etc so I can get the python core to be a small as possible (<100k
>> would be good).
>
> Have you thought about using a JVM as the Python runtime? AFAIK the
>
Hi Folks,
I’m getting the following error from my web server
(httpd on linux): “malformed header from script. Bad header=:
htmllib.cgi
The script I’m running is a Python script as follows:
#!/usr/bin/python
def
openDocument( ):
print "";
def openHTML(
):
Petr Jakes wrote:
> Hello,
> I am trying to study/understand OOP principles using Python. I have
> found following code http://tinyurl.com/a4zkn about FSM (finite state
> machine) on this list, which looks quite useful for my purposes. As
> this code was posted long time ago (November 1998) I would
Ron Griswold wrote:
> I'm getting the following error from my web server (httpd on linux):
> "malformed header from script. Bad header=: htmllib.cgi
> It gives the same complaint if I've got openDocument and/or openHead
> uncommented. The script is executing otherwise the error wouldn't show
> up
In case someone finds this - My own solution to this was to use a
wx.ListCtrl - it's a bit more work, but the mixin's are quite handy
for my purposes, also a right click causes selection for ListCtrl - so
it's nice and clean
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards <[EMAIL PROTECTED]> writes:
> > JVMs are all around also for ARM processors.
> With footprints in the 100K range?
For the JVM itself, that's no big deal (look at J2ME). JVM plus
Python runtime might be harder.
--
http://mail.python.org/mailman/listinfo/python-list
Jan Decaluwe wrote:
> I'm pleased to announce the release of MyHDL 0.5.
>
> MyHDL is an open-source package for using Python as a hardware
> description and verification language. Moreover, it can convert
> a design to Verilog. Thus, MyHDL provides a complete path
> from Python to silicon.
Jan,
Grant Edwards wrote:
> On 2006-01-19, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>
> >> Does anybody have advice? I am looking for any tricks, features I can
> >> disable, etc so I can get the python core to be a small as possible (<100k
> >> would be good).
> >
> > Have you thought about using a JVM
"Kay Schluehr" <[EMAIL PROTECTED]> writes:
> Yes, definitely. The smallest JVM I've seen was dedicated for an 8-Bit
> AVR with 8 KByte EEPROM ( or was it Flash? ) and a 768 byte sized heap.
That sounds like Javacard, which is a subset of a JVM (e.g. a minimal
Javacard implementation doesn't need g
Carl Banks wrote:
> Waguy wrote:
>> I am new to python and want to create a process to unzip large numbers of
>> zip files I get from a SOAP application. The files all have a ZIP extention
>> and can be unzipped using WinZip
>> Can anyone help with this? ...
>
> Another possibility is this:
hey fredrik,
i don't understand what you are saying
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > ok i found something that works. instead of using the def i did this:
> >
> > for incident in row('div', {'class': 'food' or 'drink' }):
> >
> > and it worked!
>
> 'food' or 'drink' doesn't
On Fri, 20 Jan 2006 10:27:58 +1300,
Carl Cerecke <[EMAIL PROTECTED]> wrote:
> Petr Jakes wrote:
[ a query regarding some 1998 python code that implements a finite state
machine ]
> Python has no goto.
Thank goodness!
> func = f_state_1 # start_state
> while func != None:
>func()
> We
Hmm, it's rather obvious that the first thing the eye should be attracted to
should be what the page is about. Something that represents the site.
Just like the first thing you see on a playboy mag is skin. The stories are
just added bonus.
By printing up different layout pages, and then flas
Hi Python fans,
Are any of you interested in pursing a Python Developer
opportunity in Campbell, CA? Please find the description of
this position below. If you do not meet ALL of the criterion, please
shoot me your resume just the same if you are interested. Python
developers are ver
Now that's definitely what I'm looking for! Thanks!
By the way, was this line
In [5]: C = repeat(B, [1,2,1], axis=-1)
supposed to have a positive 1 value for axis? It works either way, I
see. Is it like a lookup, where an index of -1 returns the last value?
If that were true, I supposed the eval
Kay Schluehr wrote:
> I want to manipulate a deeply nested list in a generic way at a
> determined place. Given a sequence of constant objects a1, a2, ..., aN
> and a variable x. Now construct a list from them recursively:
>
> L = [a1, [a2, [[aN, [x]]...]]
>
> The value of x is the only one t
<[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
> I have a regular expression that is approximately 100k bytes. (It is
> basically a list of all known norwegian postal numbers and the
> corresponding place with | in between. I know this is not the intended
> use for regular expre
On Fri, 20 Jan 2006 10:27:58 +1300 in comp.lang.python, Carl Cerecke
<[EMAIL PROTECTED]> wrote:
[...]
>
>Python has no goto.
+1
[...]
>
>We want a goto.
-1
Regards,
-=Dave
--
Change is inevitable, progress is not.
--
http://mail.python.org/mailman/lis
Carl Cerecke wrote:
> Python has no goto.
Not in the standard library. You have to download the module:
http://www.entrian.com/goto/
;)
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
Frithiof Andreas Jensen wrote:
> > I have a regular expression that is approximately 100k bytes. (It is
> > basically a list of all known norwegian postal numbers and the
> > corresponding place with | in between. I know this is not the intended
> > use for regular expressions, but it should nonet
Dave Hansen wrote:
> On Fri, 20 Jan 2006 10:27:58 +1300 in comp.lang.python, Carl Cerecke
> <[EMAIL PROTECTED]> wrote:
>
> [...]
>
>>Python has no goto.
>
>
> +1
>
> [...]
>
>>We want a goto.
>
>
> -1
I agree entirely. My (rather unclearly made) point was that, for the
particular applicat
Dan Sommers wrote:
> On Fri, 20 Jan 2006 10:27:58 +1300,
> Carl Cerecke <[EMAIL PROTECTED]> wrote:
>>... now you have a function-call overhead on each state transition ...
>
>
> Have you profiled your code and demonstrated that this particular
> function call consumes too much time?
Yes. For a
Hi,
I've experimented with regular expressions to solve my problems in the
past but I have seen so many comments about HTMLParser and sgmllib that
I thought I would try a different approach this time so I tried using
HTMLParser.
I want to search through my SGML file for various strings of text an
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> ncurses expects byte strings (although I'm uncertain as to what
> impact multi-byte encodings have in ncurses).
It depends on whether python's curses binding is linked with the wide-character
flavor (ncursesw) or the normal one. If it's linked with
Chris Lasher wrote:
> Now that's definitely what I'm looking for! Thanks!
>
> By the way, was this line
>
> In [5]: C = repeat(B, [1,2,1], axis=-1)
>
> supposed to have a positive 1 value for axis? It works either way, I
> see. Is it like a lookup, where an index of -1 returns the last value?
>
Thanks for your comments,
The mentioned "8 years old" code actually works somehow.
I am trying to solve very similar problem about FSM as the code in the
example does and I do not want to be overburden by the if/elif stuff or
by declaring state functions (which IMHO is very similar approach as
if/
This is yet another memoize decorator, it's meant to be resilient (and
fast enough):
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466320
Like most memoize decorators it stores the pairs of data-result in
cache dictionary, but Garrett Rooney says:
it could be better if it used the new w
When you declare a dictionary, Python puts it in a different order than
the way you declare it:
>>> stuff = {'\n':'', ':'\n'}
>>> print stuff
{'':'\n', '\n':''}
Is there a way to stop this behavior? I want to process this dictionary
in the order it's in, element by element. I'm running Python 2.3
"Chris" <[EMAIL PROTECTED]> writes:
> Is there a way to stop this behavior? I want to process this dictionary
> in the order it's in, element by element. I'm running Python 2.3, if
> that helps.
You want a list not a dictionary.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] (Alex Martelli) writes:
> I much prefer the current arrangement where dict(a=b,c=d) means {'a':b,
> 'c':d} -- it's much more congruent to how named arguments work for every
> other case. Would you force us to quote argument names in EVERY
> functioncall...?!
Ehh, ok. There coul
I've just released a draft (beta) version of a paper called
"Event-Driven Programming: Introduction, Tutorial, History".
It is available at
http://eventdrivenpgm.sourceforge.net/
A few years ago I was trying to learn event-driven programming. I
searched the Web for an introduction to the basic co
Steven Bethard wrote:
> Carl Cerecke wrote:
>
>> Python has no goto.
>
>
> Not in the standard library. You have to download the module:
> http://www.entrian.com/goto/
Haha! Sure. But have you seen how it's implemented? I don't think it
will win many performace prizes. Nifty hack though.
[EMAIL PROTECTED] wrote:
> hey fredrik,
>
> i don't understand what you are saying
Do what he showed in the Python interactive shell,
> Fredrik Lundh wrote:
> > 'food' or 'drink' doesn't do what you think it does:
> >
> > >>> 'food' or 'drink'
> > 'food'
> >
> > >>> {'class': 'food' o
Chris wrote:
> Is there a way to stop this behavior? I want to process this dictionary
> in the order it's in, element by element. I'm running Python 2.3, if
> that helps.
As said previously, you either want a list (which are ordered), or an
ordered-dictionary (not a Python native type, see
http:/
Anyone? Can setup.py uninstall a package or module
that it installed?
I've read the installing modules doc:
http://www.python.org/doc/2.4.2/inst/inst.html
but I didn't see anything about uninstalling what was
installed by using setup.py.
I also checked the wiki:
http://wiki.python.org/moin/DistUt
Using Tkinter, I have a Canvas with vertical Scrollbar attached. At
runtime, I dynamically create Checkboxes on the Canvas, each one on a
different row. When I add a lot of Checkboxes, instead of the
scrollbar kicking in, the Canvas resizes and subsequently, my
Application window resizes such tha
boxy440 wrote:
> Anyone? Can setup.py uninstall a package or module
> that it installed?
No.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
--
http://mail.python.org/mailman/listinfo/python-list
On 19 Jan 2006 15:53:54 -0800, Petr Jakes <[EMAIL PROTECTED]> wrote:
> Thanks for your comments,
> The mentioned "8 years old" code actually works somehow.
>
> I am trying to solve very similar problem about FSM as the code in the
> example does and I do not want to be overburden by the if/elif stu
On Thu, 19 Jan 2006 14:12:24 +0200, Juho Schultz <[EMAIL PROTECTED]> wrote:
>Anton Vredegoor wrote:
>>
>> Returning to the original book, why did they write a lot of it (at
>> least the first few pages until I gave up, after having trouble
>> understanding formulas about concepts I have no such t
Surely adopting the above method is much better than what i have
approached earlier . The main reason i did adopt this exercise was when
i have to marshal a 20 - 40 MB above test.py file to the disk , the
simple load of the test.py will sky rocket my virtual memory
consumption.
I was bit tro
On 19 Jan 2006 01:19:06 -0800, "Kay Schluehr" <[EMAIL PROTECTED]> wrote:
>I want to manipulate a deeply nested list in a generic way at a
>determined place. Given a sequence of constant objects a1, a2, ..., aN
>and a variable x. Now construct a list from them recursively:
>
>L = [a1, [a2, [[aN
Chris Mellon wrote:
> I'm not sure why nobody else in this thread said it, but the most
> common way of implementing state machines I've seen in Python (unless
> theres only a couple states you can manage with if/elif) is to use a
> dict to map states to callables.
Ah. Well, my post suggested, as
Carl Cerecke wrote:
> Chris Mellon wrote:
>
>> I'm not sure why nobody else in this thread said it, but the most
>> common way of implementing state machines I've seen in Python (unless
>> theres only a couple states you can manage with if/elif) is to use a
>> dict to map states to callables.
>
>
Hello,
I have a python CGI program. I would like to show a graph within a HTML plage. I would like to dynamically generate the graph using the python CGI script on the web server side and send it to the browser.
My question is how can I do this in python? Is there a free tool to do this? Can so
Carl Cerecke wrote:
> Carl Cerecke wrote:
>>Ah. Well, my post suggested, as one option, the callables call
>>each other directly.
>
> Doh! No I didn't. And they shouldn't. Otherwise the call stack
> gets out of hand. But I did suggest that each callable representing a
> state set a global variabl
On Thu, 19 Jan 2006 12:16:22 +0100, =?ISO-8859-1?Q?Gerhard_H=E4ring?= <[EMAIL
PROTECTED]> wrote:
[...]
>
>floating points are always imprecise, so you wouldn't want them as an
Please, floating point is not "always imprecise." In a double there are
64 bits, and most patterns represent exact ration
Petr> Hello, I am trying to study/understand OOP principles using
Petr> Python. I have found following code http://tinyurl.com/a4zkn about
Petr> FSM (finite state machine) on this list, which looks quite useful
Petr> for my purposes. As this code was posted long time ago (November
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-12-16_2005-12-31.html]
=
Announcements
=
QOTF: Quote of the Fortnight
Python-dev is in love with Python, though sometimes t
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-12-01_2005-12-15.html]
=
Announcements
=
-
Reminder: plain text documentation fixes are accepted
-
Alex Martelli wrote:
> S Borg <[EMAIL PROTECTED]> wrote:
>
>
>> Hello,
>>
>> I have been writing very simple Python programs that parse HTML and
>>such, mainly just to get
>>a better feel for the language. Here is my question: If I parsed an
>>HTML page into all of the image
>>files listed on tha
Tim Chase wrote:
> >> Additionally, you should be able to copy text from a
> >> read-only control, so ousting the focus may not be quite the
> >> right thing to do.
> >
> > Good point. Alternative approaches would be to trap
> > EVT_KEY_DOWN or EVT_TEXT to detect and block attempts to
> > modify t
Thomas Dickey wrote:
>>ncurses expects byte strings (although I'm uncertain as to what
>>impact multi-byte encodings have in ncurses).
>
>
> It depends on whether python's curses binding is linked with the
> wide-character
> flavor (ncursesw) or the normal one. If it's linked with ncursesw, str
Daniel Dittmar wrote:
> Robin Haswell wrote:
> > Ah I see.. sounds interesting. Is it possible to make any module variable
> > local to a thread, if set within the current thread?
>
> Not directly. The following class tries to simulate it (only in Python 2.4):
>
> import threading
>
> class Thread
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>Bengt Richter wrote:
>
>> Typos happen to all of us, but in case you hadn't realized what "it's"
>> is a contraction for ("it is"), now you do, and you can save yourself further
>> embarrassment (assuming you care ;-).
>> If your friends won't tell you,
Dominik Blystak <[EMAIL PROTECTED]> wrote:
>
>I am currently working on an AJAX upload progress bar written in python. The
>AJAX part is almost done but I noticed that progress data is only written if
>the entire file is transfered which makes the whole progress bar pointless.
>
>Is there any way
201 - 272 of 272 matches
Mail list logo