On 11 Aug., 07:24, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Kay Schluehr <[EMAIL PROTECTED]> writes:
> > On 11 Aug., 04:43, "SPE - Stani's Python Editor"
> > <[EMAIL PROTECTED]> wrote:
> > > As an open source project please be kind to Linux users and provide
> > > also your screencasts in open sourc
On Aug 11, 6:40 am, Mensanator <[EMAIL PROTECTED]> wrote:
> On Aug 10, 11:18 pm, ssecorp <[EMAIL PROTECTED]> wrote:
>
> > Is there a syntax for looping through 2 iterables at the same time?
>
> > for x in y:
> > for a in b:
>
> > is not what I want.
>
> > I want:
> > for x in y and for a in b:
>
>
Kay Schluehr <[EMAIL PROTECTED]> writes:
> On 11 Aug., 04:43, "SPE - Stani's Python Editor"
> <[EMAIL PROTECTED]> wrote:
> > As an open source project please be kind to Linux users and provide
> > also your screencasts in open source video standards such (as ogg
> > video) instead of only mov and
On 11 Aug., 04:43, "SPE - Stani's Python Editor"
<[EMAIL PROTECTED]> wrote:
> On 10 aug, 04:54, Heikki Toivonen <[EMAIL PROTECTED]> wrote:
> > The Chandler Project is pleased to announce the release of Chandler
> > Desktop 1.0!
> Congratulations!
>
> > The Chandler Project is an open source, standa
On Aug 10, 11:10 pm, ssecorp <[EMAIL PROTECTED]> wrote:
> If I have an expression like "bob marley" and I want to match
> everything with one letter wrong, how would I do?
> so "bob narely" and "vob marley" should match etc.
At first, I was going to suggest the brute force solution:
".ob marley|b
I'm looking for a version of Python for Blackberry mobile phones
- has anyone heard of such a thing? I've been googling this topic
without success.
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 10, 11:18�pm, ssecorp <[EMAIL PROTECTED]> wrote:
> Is there a syntax for looping through 2 iterables at the same time?
>
> for x in y:
> � � for a in b:
>
> is not what I want.
>
> I want:
> for x in y and for a in b:
Something like this?
>>> a = ['a','b','c']
>>> b = [1,2,3]
>>> zip(a,b)
Hi all,
I'm looking for a python library that lets me execute shell commands
on remote machines.
I've tried a few SSH utilities so far: paramiko, PySSH and pssh;
unfortunately all been unreliable, and repeated questions on their
respective mailing lists haven't been answered...
It seems like the
Is there a syntax for looping through 2 iterables at the same time?
for x in y:
for a in b:
is not what I want.
I want:
for x in y and for a in b:
--
http://mail.python.org/mailman/listinfo/python-list
If I have an expression like "bob marley" and I want to match
everything with one letter wrong, how would I do?
so "bob narely" and "vob marley" should match etc.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
My shared host provides python 2.3. Since it is a shared hosting, he
is not willing to upgrade to a newer version.
I am looking for option to upload 2.5 on my own. Is this possible and
if so, can anyone please provide a pointer to how this can be
achieved?
Thank you,
Joseph
http://www.jju
On Aug 9, 10:54 pm, Heikki Toivonen wrote:
> The Chandler Project is pleased to announce the release of Chandler
> Desktop 1.0!
>
> The Chandler Project is an open source, standards-based information
> manager designed for personal use and small group collaboration.
>
> For more information on the
On Aug 10, 6:42 pm, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Duncan Booth schrieb:
>
> > There is no currently recommended way to make such annotations, so how
> > could the PEP mention it?
>
> Then it could mention the fact that there is currently no recommended
> way (and maybe make some
On 10 aug, 04:54, Heikki Toivonen wrote:
> The Chandler Project is pleased to announce the release of Chandler
> Desktop 1.0!
Congratulations!
>
> The Chandler Project is an open source, standards-based information
> manager designed for personal use and small group collaboration.
As an open sourc
On 10 aug, 20:42, [EMAIL PROTECTED] wrote:
> Hello,
>
> I've installed Eclipse, Python 2.5 and wxPython on Ubuntu 8.04. The
> problem is that I can't get code completion for wx module. I don't
> know if it occurs the same with other libraries outside the python
> "core".
>
> If I compile/run my cod
Thanks all for your responses, especially Paul McGuire for the
excellent example usage of pyparsing.
I'm off to check out pyparsing.
Thanks,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
One of the problems with Ubuntu's repositories is that they are not always
kept up to date. The version of eclipse is 2 years old, and PyDev is 24
updates behind. The newer versions handle code completion better.
Download eclipse from www.eclipse.org (its already compiled, just unzip and
run) and
In article <[EMAIL PROTECTED]>,
Heikki Toivonen <[EMAIL PROTECTED]> wrote:
>
>The Chandler Project is pleased to announce the release of Chandler
>Desktop 1.0!
Congrats! It's been a long, strange road
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
Adopt A Pro
Diez B. Roggisch wrote:
Kris Kennaway schrieb:
I would like to MIME encode a message from a large file without first
loading the file into memory. Assume the file has been pre-encoded on
disk (actually I am using encode_7or8bit, so the encoding should be
null). Is there a way to construct th
Duncan Booth schrieb:
There is no currently recommended way to make such annotations, so how
could the PEP mention it?
Then it could mention the fact that there is currently no recommended
way (and maybe make some suggestions, like those given by you).
--
http://mail.python.org/mailman/listin
Kris Kennaway schrieb:
I would like to MIME encode a message from a large file without first
loading the file into memory. Assume the file has been pre-encoded on
disk (actually I am using encode_7or8bit, so the encoding should be
null). Is there a way to construct the flattened MIME message
Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> But maybe the PEP should then at least mention what's the currently
> recommended way to make annotations about thrown exceptions.
>
There is no currently recommended way to make such annotations, so how
could the PEP mention it?
I think the pro
Dear Pythonistas,
How many times have we seen posts recently along the lines of "why is
it that 0.1 appears as 0.10001 in python?" that lead to
posters being sent to the definition of the IEEE 754 standard and the
decimal.py module? I am teaching an introductory numerical analysis
clas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Stefan,
Stefan Behnel wrote:
| BTW, if you want to write XML handling code that lets you understand
what you
| are doing, try ElementTree or lxml. lxml also has support for XML
Schema, in
| case you want to do more than parsing with it.
|
| Stefan
On Mon, 11 Aug 2008 00:47:14 +0530, "Suresh V." <[EMAIL PROTECTED]> wrote:
class A:
def add(self, x, y):
return x+y
class B:
pass
B.add = A.add
print B().add(1, 2) <- gives TypeError: unbound method add() must
be called with A instance as first ar
Calvin Spealman wrote:
dont quote me but i do think this check is being removed.
No, the check hasn't been removed - technically speaking. In Python 3.0
the behavior of the method descriptor has been changed.
aclass.somemethod doesn't give you an instancemethod wrapper any more.
It's a plain
Suresh V. wrote:
> class A:
> def add(self, x, y):
> return x+y
>
> class B:
> pass
>
> B.add = A.add
>
> print B().add(1, 2) <- gives TypeError: unbound method add() must
>be called with A instance as first argument
Works for me:
Python 3.0b2
WP wrote:
> I solved it, I rewrote __cmp__ to:
> def __cmp__(self, other):
> if self.score == other.score:
> return cmp(self.name, other.name)
> else:
> return cmp(other.score, self.score)
You can simplify that to
def __cmp__(self, other):
return cmp(other.score, self.s
dont quote me but i do think this check is being removed.
On Sun, Aug 10, 2008 at 3:42 PM, Patrick Mullen <[EMAIL PROTECTED]> wrote:
> How about:
>
> class A:
>def add(self,x,y):
>return x+y
>
> class B(A):
>pass
>
> print B().add(1, 2)
>
>
>
> This also works:
>
> class A:
> def
How about:
class A:
def add(self,x,y):
return x+y
class B(A):
pass
print B().add(1, 2)
This also works:
class A:
def add(self, x, y):
return x+y
class B:
pass
B.add = A.add.im_func
print B().add(1, 2)
--
http://mail.python.org/mailman/listinfo/python-list
class A:
def add(self, x, y):
return x+y
class B:
pass
B.add = A.add
print B().add(1, 2) <- gives TypeError: unbound method add() must
be called with A instance as first argument
--
http://mail.python.org/mailman/listinfo/python-list
Dnia Sun, 10 Aug 2008 20:26:51 +0200, WP napisa�(a):
Hi,
> Hello, here are some new things I've problems with. I've made a program
...
> def __cmp__(self, other):
> print "in __cmp__"
> return self.score >= other.score
Check this out: http://docs.python.org/ref/customiza
WP wrote:
Hello, here are some new things I've problems with. I've made a program
that opens and reads a text file. Each line in the file contains a name
and a score. I'm assuming the file has the correct format. Each
name-score pair is used to instantiate a class Score I've written. This
work
WP wrote:
Solved the problem, see below...
Hello, here are some new things I've problems with. I've made a program
that opens and reads a text file. Each line in the file contains a name
and a score. I'm assuming the file has the correct format. Each
name-score pair is used to instantiate a cl
Mathieu Prevot schrieb:
Hi,
I have a multithreaded script that mainly creates several wget
processes to download files. I would like to check/see and eventually
limit the bandwidth of the pool of processes. One way to do this is to
change the number of wget instances, but it's a workaround.
Wh
Hello,
I've installed Eclipse, Python 2.5 and wxPython on Ubuntu 8.04. The
problem is that I can't get code completion for wx module. I don't
know if it occurs the same with other libraries outside the python
"core".
If I compile/run my code containing the wx library, I get an
application running
Kless wrote:
On 10 ago, 15:03, Paddy <[EMAIL PROTECTED]> wrote:
If you just want the absense of _foo to raise an exception then why to
just reference self._foo and leave the hard work to ptyhon? Something
like:
self._foo
If it is present then fine, if it is not then an exception is raised.
Hello, here are some new things I've problems with. I've made a program
that opens and reads a text file. Each line in the file contains a name
and a score. I'm assuming the file has the correct format. Each
name-score pair is used to instantiate a class Score I've written. This
works fine, but
Wojtek Walczak wrote:
[snip]
Thanks for all your help. I've incorporated your suggestions and moved
on to my next program. See new thread. :)
- Eric (WP)
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 10, 1:14 am, Stef Mientki <[EMAIL PROTECTED]> wrote:
> hello,
>
> I want to investigate on a regular base the flow of my Python (most of
> them using wxPython) programs.
> So I want to have some log facilty, that logs things like
> - every time a function / method is called
> - the time spen
In article <[EMAIL PROTECTED]>,
Paul Rudin <[EMAIL PROTECTED]> wrote:
>Laszlo Nagy <[EMAIL PROTECTED]> writes:
>>
>> Permature optimalization is the root of all evil. (Who said that?)
>
>Knuth I think.
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare (often misatt
jlist wrote:
I think what makes more sense is to compare the code one most
typically writes. In my case, I always use range() and never use psyco.
But I guess for most of my work with Python performance hasn't been
a issue. I haven't got to write any large systems with Python yet, where
performan
Angel Gutierrez wrote:
Steven D'Aprano wrote:
On Thu, 07 Aug 2008 00:44:14 -0700, alex23 wrote:
Steven D'Aprano wrote:
In other words, about 20% of the time he measures is the time taken to
print junk to the screen.
Which makes his claim that "all the console outputs have been removed so
th
Ouray Viney wrote:
> In your example you show:
>
> ib.text = calculate_new_value(ib.text)
>
> I don't know what calculate_new_value() represents.
It's meant as pseudo-code. Just take the function name literally and replace
it by something that gives you the value you want to assign (as you alrea
On Aug 10, 9:01 am, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Ouray Viney wrote:
> > Is there an easy way to replace the node value of ? Perhaps I am
> > trying to use the wrong python XML library?
>
> Looks like it. Try ElementTree.
>
> from xml.etree import ElementTree
> tree = ElementT
On 10 ago, 15:03, Paddy <[EMAIL PROTECTED]> wrote:
> If you just want the absense of _foo to raise an exception then why to
> just reference self._foo and leave the hard work to ptyhon? Something
> like:
>
> self._foo
>
> If it is present then fine, if it is not then an exception is raised.
It on
On Aug 10, 7:56 am, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Aug 10, 2:30 pm, [EMAIL PROTECTED] wrote:
>
> > I'm trying to use regular expressions to help me quickly extract the
> > contents of messages that my application will receive.
>
> Don't use regexps for parsing complex data; they're lim
Hi,
Is there any way to convert from DocBook to html in Python? Thanks!
BR
Younger Wang
--
http://mail.python.org/mailman/listinfo/python-list
Dnia Sun, 10 Aug 2008 15:52:37 +0200, WP napisa�(a):
Hi,
> import re
>
> def calculate_sum_1(str):
^^^
this word is reserved, better use some other name
> for c in str:
> if c.isdigit() == False and c != ' ':
> # That we assign to t
if its *NOT* an exercise in re, and if input is a bunch of lines within '{'
and '}' and each line is key="value" pairs, I would not go near re. instead
simply parse keys and array of values into a dictionary, and process them from
the dictionary as below, and the key option correctly has 2 entr
> I have a multithreaded script that mainly creates several wget
> processes to download files. I would like to check/see and eventually
> limit the bandwidth of the pool of processes. One way to do this is to
> change the number of wget instances, but it's a workaround.
>
> What do you recommend
On Aug 10, 9:13 am, Kless <[EMAIL PROTECTED]> wrote:
> Which is the best mode for validation of parameters? I'm using the
> next way but it is not well testable.
>
> -
> if not self._foo:
> try:
> raise ValueError('ValueError: foo not found')
> except Val
Hello, below is my very first python program. I have some questions
regarding it and would like comments in general. I won't be able to get
my hands on a good python book until tomorrow at the earliest. The
program takes a string and sums all numbers inside it. I'm testing with
the following st
Hi,
quite a lengthy mail for four lines of content. I guess there was no space
left to say "hi"?
Spitfire wrote:
> I'm trying to use xml.dom.minidom parser to parse a XML schema file.
> And, when I invoke 'childNodes' on the root element (schema) I get all
> the nodes defined under it, instead of
Ouray Viney wrote:
> Is there an easy way to replace the node value of ? Perhaps I am
> trying to use the wrong python XML library?
Looks like it. Try ElementTree.
from xml.etree import ElementTree
tree = ElementTree.parse("yourfile.xml")
for ib in tree.findall("//ib"):
ib.te
On Aug 10, 2:30 pm, [EMAIL PROTECTED] wrote:
> I'm trying to use regular expressions to help me quickly extract the
> contents of messages that my application will receive.
Don't use regexps for parsing complex data; they're limited,
completely unreadable, and hugely difficult to debug. Your code
Hi,
I have a multithreaded script that mainly creates several wget
processes to download files. I would like to check/see and eventually
limit the bandwidth of the pool of processes. One way to do this is to
change the number of wget instances, but it's a workaround.
What do you recommend to do
Hi list,
I'm trying to use regular expressions to help me quickly extract the
contents of messages that my application will receive. I have worked
out most of the regex but the last section of the message has me
stumped. This is mostly because I want to pull the content out into
regex groups that
Duncan Booth wrote:
If you really want this then you can use a decorator to insert a 'raise'
key into the annotations:
Well, yes, but wasn't the whole point of PEP 3107 to get rid of such
decorators and provide a single standard way of specifying this kind of
info instead?
I don't know how
Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> That would be possible. But I still think it makes sense to separate
> them, like so:
>
> def foo(a: "a info", b: "b info") -> "ret info" raise "exc info":
> return "hello world"
>
> And then the annotation dictionary would contain another k
Ouray Viney wrote:
Xml
8.4.27.5
python
from xml.dom import minidom
xmldoc = minidom.parse('C:\TestProfile.xml')
xmldoc
ibNodeList = xmldoc.getElementsByTagName("ib")
firstChild = xmldoc.firstChild
for node in xmldoc.getElementsByTagName('ib'): # visit every node
print node.toxml()
Stef Mientki schrieb:
hello,
I want to investigate on a regular base the flow of my Python (most of
them using wxPython) programs.
So I want to have some log facilty, that logs things like
- every time a function / method is called
- the time spent in that function / method (or even better sta
Matimus schrieb:
The expr in that "raises" clause should be a list of Exceptions.
You are clearly confusing the annotation feature with a possible
application of the annotation feature. Annotation could be used for
many different applications besides type safety.
Sorry, I wanted to say "*coul
I think it is a right place to ask my query...
I wrote the following code for signing and verifying some message using
Public-Private Key Encyption but it has a problem. It is giving me a 'Bad
Signature' error at line 27. I don't know what wrong am i doing as to me the
signature is looking fine. I
I was doing something very similar on my windows XP machine a year ago
(with python 2.4) and used Mayukh Bose's Internet Explorer controller
(see http://www.mayukhbose.com/python/IEC/index.php for details/
download). It worked very nicely for my needs and was rather
intuitive (generally much easie
Which is the best mode for validation of parameters? I'm using the
next way but it is not well testable.
-
if not self._foo:
try:
raise ValueError('ValueError: foo not found')
except ValueError, err:
print (err.message)
print("Valid value
Hello All,
I Need some tips/help/ideas debugging segmentation fault ...
I'm trying to debug Python running embedded inside a Verilog
Simulator (as a SystemVerilog DPI application). (on SUSE LINUX
Enterprise Server 9 (i586))
The Embedded python loads two SWIG wrapped modules (written in C and C
Xml
8.4.27.5
python
from xml.dom import minidom
xmldoc = minidom.parse('C:\TestProfile.xml')
xmldoc
ibNodeList = xmldoc.getElementsByTagName("ib")
firstChild = xmldoc.firstChild
for node in xmldoc.getElementsByTagName('ib'): # visit every node
print node.toxml()
node.replaceChild("8.
Thanks a lot for all of everyones help, I am really looking forward to
learning the ins and ous of python or my first programming language.
--
http://mail.python.org/mailman/listinfo/python-list
The best thing I've found until now is XRCed. It has it's quirks and
pitfalls, but it fits the bill. Personally I prefer the previous version
(the one that comes with wxPython 2.8.6) and don't really like what's been
done with it lately, but that's a matter of taste really.
It seems like a really
70 matches
Mail list logo