On 18 Apr, 22:38, Daniel Kluev dan.kl...@gmail.com wrote:
Isn't it better to use subprocess.Popen and read stdout/stderr
directly? Should be much more convenient than temporary files.
--
With best regards,
Daniel Kluev
Thanks Daniel, your solution is far better WKR! Aldo
--
On Tue, Apr 19, 2011 at 7:09 AM, Christian Heimes li...@cheimes.de wrote:
Am 18.04.2011 21:58, schrieb John Nagle:
This is typical for languages which backed into a bool type,
rather than having one designed in. The usual result is a boolean
type with numerical semantics, like
True +
On Tue, Apr 19, 2011 at 4:23 PM, Kushal Kumaran
kushal.kumaran+pyt...@gmail.com wrote:
if a + b + c + d != 1:
raise ValueError(Exactly one of a, b, c or d must be true.)
Unless you're sure all of a, b, c, and d are boolean values, an int
with a negative value slipping in could result in
Gregory Ewing writes:
Chris Angelico wrote:
Question: How many factorial functions are implemented because a
program needs to know what n! is, and how many are implemented to
demonstrate recursion (or to demonstrate the difference between
iteration and recursion)? :)
(I can't get to
On Tue, Apr 19, 2011 at 4:42 PM, Jussi Piitulainen
jpiit...@ling.helsinki.fi wrote:
Factorials become an interesting demonstration of recursion when done
well. There's a paper by Richard J. Fateman, citing Peter Luschny:
http://www.cs.berkeley.edu/~fateman/papers/factorial.pdf
Hey Ian,
On Mon, Apr 18, 2011 at 01:07:58PM -0600, Ian Kelly wrote:
In the simple case, just store the state on the wrapper function itself:
def call_counts(function):
@functools.wraps(function)
def wrapper(*args, **kwargs):
wrapper.num_calls += 1
return function(*args,
On 4/19/2011 12:05 AM, harrismh777 wrote:
Are bug reports wanted here, or just in issue tracker?
If one is somewhat experienced with Python and is sure about having
identified a bug, and is willing to search the tracker for existing
reports and respond to questions, then report on the
Hey Wayne,
On Mon, Apr 18, 2011 at 04:04:15PM -0700, Wayne Witzel III wrote:
Going with the object approach, you could use Borg to give yourself the state
between instances you mentioned. And since you are using an object, you'll
have access to the data without needing to return it from the
1. Are you sure you want to use python because threading is not
good due
to the Global Lock (GIL)? Is this really an issue for multi-threaded
web services as seems to be indicated by the articles from a Google
search? If not, how do you avoid this issue in a multi-threaded process
to take
On Apr 19, 6:35 am, Disc Magnet discmag...@gmail.com wrote:
I couldn't find this mentioned in the documentation at:
http://docs.python.org/library/logging.config.html#configuration-file...
Could you please tell me where this is documented?
It's documented here:
On Tue, 19 Apr 2011 16:26:50 +1000, Chris Angelico wrote:
On Tue, Apr 19, 2011 at 4:23 PM, Kushal Kumaran
kushal.kumaran+pyt...@gmail.com wrote:
if a + b + c + d != 1:
raise ValueError(Exactly one of a, b, c or d must be true.)
Unless you're sure all of a, b, c, and d are boolean
Martin v. Löwis mar...@v.loewis.de writes:
On behalf of the Python development team and the Python community, I'm
happy to announce the release candidate 1 of Python 2.5.6.
This is a source-only release that only includes security fixes.
Thanks Martin, I'm glad these older releases are still
On Tue, Apr 19, 2011 at 6:43 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
but I don't see how
(arbitrary expression) + (another expression) + ... + (last expression)
can have any guarantees applied. I mean, you can't even guarantee that
they won't raise an exception. Can
2011/4/19 Alec Taylor alec.tayl...@gmail.com:
SPE looks good, however I couldn't get it running (svn'd it). Do you
know if there's an installer?
--
http://mail.python.org/mailman/listinfo/python-list
There are source archives
I'm in python 2.6.5, and have Firefox 3.6.13. I would like to download
some html from a site and scrape it programatically. The site requires
a cookie, which I have in Firefox.
Is there a simple python recipe I can use to read the contents of a
url and say just use the cookie that I have in
On Tue, Apr 19, 2011 at 4:44 AM, Mark Carter alt.mcar...@gmail.com wrote:
I'm in python 2.6.5, and have Firefox 3.6.13. I would like to download
some html from a site and scrape it programatically. The site requires
a cookie, which I have in Firefox.
Is there a simple python recipe I can use
On Apr 19, 12:44 pm, Mark Carter alt.mcar...@gmail.com wrote:
url and say just use the cookie that I have in Firefox?
mechanize looks kinda like what I want, but i still can't get it to
work properly. So far I have:
import cookielib
import mechanize
cookiefile =
On Tue, Apr 19, 2011 at 5:48 AM, Mark Carter alt.mcar...@gmail.com wrote:
On Apr 19, 12:44 pm, Mark Carter alt.mcar...@gmail.com wrote:
url and say just use the cookie that I have in Firefox?
mechanize looks kinda like what I want, but i still can't get it to
work properly. So far I have:
On Tue, 2011-04-19 at 19:00 +1000, Chris Angelico wrote:
On Tue, Apr 19, 2011 at 6:43 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
but I don't see how
(arbitrary expression) + (another expression) + ... + (last expression)
can have any guarantees applied. I mean, you
I do not have a DLLs folder.
I created this installation of Python myself since I needed it built
with Visual Studio 2005.
I followed instructions under PC\readme.txt
This file mentioned nothing about a DLLs folder.
From PC\readme.txt .
The best installation strategy is to put the
On Tue, Apr 19, 2011 at 1:12 AM, Timo Schmiade the_...@gmx.de wrote:
Just one question remains now: What is a Borg in this context?
http://code.activestate.com/recipes/66531/
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 19, 2011 at 7:09 AM, Christian Heimes li...@cheimes.de wrote:
Am 18.04.2011 21:58, schrieb John Nagle:
?? ?? This is typical for languages which backed into a bool type,
rather than having one designed in. ??The usual result is a boolean
type with numerical semantics, like
??
Hello,
I am trying to get an installer built with distutils to recognize
multiple installations.
The installer currently finds my installation at C:\Python27
I have a custom Python27 built myself with Visual Studio sitting
somewhere else, say C:\MyPython27.
I looked at PC/bdist_wininst/install.c
Ethan -- I'm just getting back to this question. If you recall, you asked:
[snip]
8
script with possible name clashes
eggs = 'scrambled eggs'
meat = 'steak'
class Breakfast():
meat = 'spam'
def serve(self):
print(Here's
On Tue, Apr 19, 2011 at 08:20:05AM -0600, Ian Kelly wrote:
On Tue, Apr 19, 2011 at 1:12 AM, Timo Schmiade the_...@gmx.de wrote:
Just one question remains now: What is a Borg in this context?
http://code.activestate.com/recipes/66531/
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
I'm new to Python, and trying to get python 3.2 installed on Centos 5.6. When I
run 'make test', I receive several errors. The readme states that you can
generally ignore messages about skipped tests, but as you can see below, some
of the tests failed and a number were 'unexpected
Hello,
I am trying to run a python based program on MacOSX, which needs following
packages
numpy
PIL
matplotlib
I can successfully import all 3 using python2.5 (only using /sw64/bin/python
or /sw64/bin/python2.5) , although i have python2.6 and 2.7 installed. I get
following error when in run
On Apr 19, 10:23 am, Grant Edwards inva...@invalid.invalid wrote:
On Tue, Apr 19, 2011 at 7:09 AM, Christian Heimes li...@cheimes.de wrote:
Am 18.04.2011 21:58, schrieb John Nagle:
?? ?? This is typical for languages which backed into a bool type,
rather than having one designed in. ??The
In article banlktimr2goozgoxstobjf5jur+3cxg...@mail.gmail.com,
Yogesh Gupta yogesh.gupt...@gmail.com wrote:
I am trying to run a python based program on MacOSX, which needs following
packages
numpy
PIL
matplotlib
I can successfully import all 3 using python2.5 (only using
Gerald Britton wrote:
I now understand the Python does
not consider a class definition as a separate namespace as it does for
function definitions. That is a helpful understanding.
That is not correct. Classes are separate namespaces -- they just
aren't automatically searched. The only
I have a great solution : stop using reload. It often dangerous and more
often silly.
On Apr 7, 2011 5:44 AM, harrismh777 harrismh...@charter.net wrote:
All right... somebody is sacked (er, fired) !
Who moved reload()?
This kinda stuff is driving me bonkers... there was no need to move
Gerald Britton wrote:
I now understand the Python does
not consider a class definition as a separate namespace as it does for
function definitions. That is a helpful understanding.
That is not correct. Classes are separate namespaces -- they just
aren't automatically searched. The only
On 4/19/2011 10:55 AM, Rob McGillivray wrote:
I'm new to Python, and trying to get python 3.2 installed on Centos
5.6. When I run 'make test', I receive several errors.
Welcome to Python.
Newbie lesson 1: write an informative subject line that will catch the
attention of people who can
On Tue, Apr 19, 2011 at 10:31 AM, Ethan Furman et...@stoneleaf.us wrote:
Gerald Britton wrote:
I now understand the Python does
not consider a class definition as a separate namespace as it does for
function definitions. That is a helpful understanding.
That is not correct. Classes are
What breaks if I remove lib/python2.7/test/* ? What purpose does it serve?
It is 26MB for me.
I am trying to trim my Python install for good reason.
Thanks for any info!
--
http://mail.python.org/mailman/listinfo/python-list
On 4/19/2011 10:58 AM, Gerald Britton wrote:
serve method unless it is qualified. I now understand the Python does
not consider a class definition as a separate namespace as it does for
function definitions.
Class namespaces are separate namespaces but not in the same way as for
functions.
On 4/19/2011 1:06 PM, cjblaine wrote:
What breaks if I remove lib/python2.7/test/* ? What purpose does it serve?
It allows you to run the test suite. Some people like to run it when
they install. Or they may run a module test if they have a problem with
a specific module or edit the Python
Hi Terry,
Much appreciate the pointers! :-)
I am trying to install from an RPM downloaded from python.org. I'm pretty new
to Linux etc (very pleased to be finally getting into the wide world of OSS),
so I'm double-challenged on a number of fronts right now.
I will run the failed tests in
Is there a way to make distutils use --install-layout=deb
but only on systems where that makes sense?
I just noticed that if someone installs without that switch,
my app will not be able to find its data files, because
sys.prefix = /usr but the installation is actually in to
/usr/local
I
Hi,
I'm trying to understand how to pickle Python objects over a TCP
socket.
In the example below (based on code from Foundations of Python Network
Programming), a client creates a dictionary (lines 34-38) and uses
pickle.dump at line 42 to write the pickled object using file handle
make from a
On 4/19/2011 1:33 PM, Rob McGillivray wrote:
I am trying to install from an RPM downloaded from python.org.
That puzzles me. For *nix, I do not see .rpm, just tarballs, on
http://python.org/download/releases/3.2/
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 19, 2011 at 7:55 AM, Rob McGillivray
r...@motornostixusa.com wrote:
Hi All,
I'm new to Python, and trying to get python 3.2 installed on Centos 5.6. When
I run 'make test', I receive several errors. The readme states that you can
generally ignore messages about skipped tests,
On Tue, Apr 19, 2011 at 11:53 AM, Roger Alexander rtalexan...@mac.com wrote:
Hi,
I'm trying to understand how to pickle Python objects over a TCP
socket.
In the example below (based on code from Foundations of Python Network
Programming), a client creates a dictionary (lines 34-38) and uses
On Wed, Apr 20, 2011 at 4:53 AM, Roger Alexander rtalexan...@mac.com wrote:
Hi,
I'm trying to understand how to pickle Python objects over a TCP
socket.
In the example below (based on code from Foundations of Python Network
Programming), a client creates a dictionary (lines 34-38) and uses
On Tue, Apr 19, 2011 at 11:53 AM, Roger Alexander rtalexan...@mac.com wrote:
Hi,
I'm trying to understand how to pickle Python objects over a TCP
socket.
In the example below (based on code from Foundations of Python Network
Programming), a client creates a dictionary (lines 34-38) and uses
On Wed, Apr 20, 2011 at 5:30 AM, Dan Stromberg drsali...@gmail.com wrote:
I played around with it until something worked, and ended up with the
below. The most significant change was probably using sc.makefile
instead of s.makefile in the server...
Oh! I didn't notice that in the OP. Yep,
Yes, Dan is right, it looked for the sources, and you have only binaries on
your system. Look in your distribution repositories for the *-devel or alike
for the 5 that failed and try again.
2011/4/19 Dan Stromberg drsali...@gmail.com
On Tue, Apr 19, 2011 at 7:55 AM, Rob McGillivray
So, I'm using optparse as follows:
Command line:
python expense.py $100 -f ~/desktop/test.txt
['00']
In Main:
desc = ''
p = optparse.OptionParser(description=desc)
utilities = optparse.OptionGroup(p, 'Utility Options')
utilities.add_option('--file', '-f', dest=file, help=Define the
In f315a5f9-b11a-48e8-b5ce-1e72dcabc...@glegroupsg2000goo.googlegroups.com
tazz_ben b...@wbpsystems.com writes:
So, any ideas? Why is including a $ eating both the dollar signa and the 1?
Unix command lines tend to assume any $ inside double-quotes is a shell
variable name. Try enclosing in
tazz_ben wrote:
So, I'm using optparse as follows:
Command line:
python expense.py $100 -f ~/desktop/test.txt
['00']
In Main:
desc = ''
p = optparse.OptionParser(description=desc)
utilities = optparse.OptionGroup(p, 'Utility Options')
utilities.add_option('--file', '-f',
Try this on your *nix command line: echo $100
On a *nix command line, the '$1' part of $100 will be seen as 'give me the
value of the shell variable 1', and since it has no value, will result in an
empty string. So it's not optparse, or Python, because the literal string you
intend to pass as
Announcing
--
The 2.8.12.0 release of wxPython is now available for download at
http://wxpython.org/download.php. This release has no major new
features or enhancements, but there have been plenty of bug fixes
since the last stable release.
Source code is available as a tarball, and
On 19-4-2011 19:06, cjblaine wrote:
What breaks if I remove lib/python2.7/test/* ? What purpose does it serve?
It is 26MB for me.
I am trying to trim my Python install for good reason.
Thanks for any info!
Terry answered what it is for. Personally, I also once used some functions from
Thanks Martin, I'm glad these older releases are still getting important
fixes.
I notice http://www.python.org/download/releases/2.5.6/NEWS.txt says the
release date was 17 Apr 2010. Presumably that should have said 2011.
Thanks for pointing it out. I fixed it in the repository, so it
I tried to create another 2.7 key but regedit wouldn't let me.
So, if I can only have one 2.7 key, it would seem that the routine
GetPythonVersions will only ever get 1 version of 2.7.
Does this mean that it is unsupported to have more than one Python 2.7
installation on Windows?
Exactly so
On Tue, 19 Apr 2011 17:47:40 +0100, Gerald Britton
gerald.brit...@gmail.com wrote:
Gerald Britton wrote:
I now understand the Python does
not consider a class definition as a separate namespace as it does for
function definitions. That is a helpful understanding.
That is not correct.
On Wed, Apr 20, 2011 at 8:00 AM, Rhodri James
rho...@wildebst.demon.co.uk wrote:
Language abuse: it's not just Python. A donation of just $5 will keep a
programmer in prepositions for a month. $50 will supply enough articles to
keep a small company understandable for over a year. With your
I'm have problems figuring out how to receive UDP broadcast packets on
Linux.
Here's the receiving code:
--receive.py---
#!/usr/bin/python
import socket
host = ''
port = 5010
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Thanks everybody, got it working.
I appreciate the help!
Roger.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am planning to teach Python to a group of high school students, who have
in-depth interest in programming, hacking etc.
I am looking for some good material, what I could use as a basic guide when
preparing the classes plan for the course - website or book, what would roll
out the
On Tue, Apr 19, 2011 at 3:42 PM, Passiday passi...@gmail.com wrote:
Hello,
I am planning to teach Python to a group of high school students, who have
in-depth interest in programming, hacking etc.
I am looking for some good material, what I could use as a basic guide when
preparing the
On 20-4-2011 0:21, Grant Edwards wrote:
I'm have problems figuring out how to receive UDP broadcast packets on
Linux.
[...]
Here's the sending code:
send.py---
#!/usr/bin/python
import sys,socket,time
host = sys.argv[1]
On Tue, Apr 19, 2011 at 4:03 PM, geremy condra debat...@gmail.com wrote:
On Tue, Apr 19, 2011 at 3:42 PM, Passiday passi...@gmail.com wrote:
Hello,
I am planning to teach Python to a group of high school students, who have
in-depth interest in programming, hacking etc.
I am looking for
On 2011-04-19, Irmen de Jong irmen.nos...@xs4all.nl wrote:
On 20-4-2011 0:21, Grant Edwards wrote:
I'm have problems figuring out how to receive UDP broadcast packets on
Linux.
[...]
Here's the sending code:
send.py---
On Tue, Apr 19, 2011 at 3:42 PM, Passiday passi...@gmail.com wrote:
Hello,
I am planning to teach Python to a group of high school students, who have
in-depth interest in programming, hacking etc.
I am looking for some good material, what I could use as a basic guide when
preparing the
On Tue, Apr 19, 2011 at 4:24 PM, Dan Stromberg drsali...@gmail.com wrote:
On Tue, Apr 19, 2011 at 4:03 PM, geremy condra debat...@gmail.com wrote:
On Tue, Apr 19, 2011 at 3:42 PM, Passiday passi...@gmail.com wrote:
Hello,
I am planning to teach Python to a group of high school students, who
Rhodri James rho...@wildebst.demon.co.uk writes:
Language abuse: it's not just Python. A donation of just $5 will keep
a programmer in prepositions for a month. $50 will supply enough
articles to keep a small company understandable for over a year. With
your generous help, we can beat this
On Tue, Apr 19, 2011 at 3:21 PM, Grant Edwards invalid@invalid.invalid wrote:
I'm have problems figuring out how to receive UDP broadcast packets on
Linux.
Here's the receiving code:
--receive.py---
But, the receiving Python program
On 20-4-2011 1:21, Grant Edwards wrote:
If I don't call bind(), then the broadcast packets go out the wrong
interface on the sending machine.
Fair enough.
Next issue then: as far as I know, broadcast packets are by default not routed
across
subnets by gateways. Which is a good thing.
We have been teaching game programming using python in my school district for a
few years now. We started out using python programming for the absolute
beginner. It was good, but didn't use pygame and was mostly text based until
the
last 2 chapters. Another book for reference is Game
On Tue, Apr 19, 2011 at 4:40 PM, Irmen de Jong irmen.nos...@xs4all.nl wrote:
On 20-4-2011 1:21, Grant Edwards wrote:
If I don't call bind(), then the broadcast packets go out the wrong
interface on the sending machine.
Fair enough.
Next issue then: as far as I know, broadcast packets are
How about this. http://inventwithpython.com/
thanks,
Allan
On Tue, Apr 19, 2011 at 7:35 PM, geremy condra debat...@gmail.com wrote:
On Tue, Apr 19, 2011 at 4:24 PM, Dan Stromberg drsali...@gmail.com
wrote:
On Tue, Apr 19, 2011 at 4:03 PM, geremy condra debat...@gmail.com
wrote:
On Tue,
Hi,
I've been staring at this problem, in various forms, all day. Am I missing
something obvious, or is there some strange hardwiring of isinstance? This is
with Python 3.2.
class A(metaclass=ABCMeta):
@classmethod
def __instancecheck__(cls, instance): return
On 2011-04-19, Irmen de Jong irmen.nos...@xs4all.nl wrote:
On 20-4-2011 1:21, Grant Edwards wrote:
If I don't call bind(), then the broadcast packets go out the wrong
interface on the sending machine.
Fair enough.
Next issue then: as far as I know, broadcast packets are by default
not
Also, there's something strange about the number of arguments (they're not
consistent between the two examples - the A to __instancecheck__ should not
be needed). Yet it compiles and runs like that. Very confused :o(
--
http://mail.python.org/mailman/listinfo/python-list
Jean-Paul Calderone wrote:
Also boolean xor is the same as !=.
Only if you have booleans. Even without short circuiting,
a boolean xor operator could provide the service of
automatically booling things for you (is that a word?).
Jean-Paul
--
On 2011-04-19, Dan Stromberg drsali...@gmail.com wrote:
On Tue, Apr 19, 2011 at 3:21 PM, Grant Edwards invalid@invalid.invalid
wrote:
I'm have problems figuring out how to receive UDP broadcast packets on
Linux.
Here's the receiving code:
Dan Stromberg drsali...@gmail.com writes:
On Tue, Apr 19, 2011 at 4:03 PM, geremy condra debat...@gmail.com wrote:
When you say 'hacking', you mean ?
Presumably he meant the real meaning of the word, not what the press
made up and ran with.
To be fair, the press already had its own
On 2011-04-19, Dan Stromberg drsali...@gmail.com wrote:
On Tue, Apr 19, 2011 at 4:40 PM, Irmen de Jong irmen.nos...@xs4all.nl wrote:
On 20-4-2011 1:21, Grant Edwards wrote:
If I don't call bind(), then the broadcast packets go out the wrong
interface on the sending machine.
Fair enough.
OK, sorry, I see the mistake. I'm confusing __class__ on the instance and on
te class (the latter being the metaclass). Sorry again, Andrew
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 20, 2011 at 10:00 AM, Grant Edwards invalid@invalid.invalid wrote:
If I send a packet to ff:ff:ff:ff:ff:ff--255.255.255.255, it's because
I want everybody on the Ethernet segment to receive it. If I wanted
only people on a particular subnet (e.g. 10.0.0.0/8) to receive it, I
would
On Tue, Apr 19, 2011 at 4:52 PM, andrew cooke and...@acooke.org wrote:
Hi,
I've been staring at this problem, in various forms, all day. Am I missing
something obvious, or is there some strange hardwiring of isinstance? This
is with Python 3.2.
class A(metaclass=ABCMeta):
On Wed, Apr 20, 2011 at 10:09 AM, Grant Edwards invalid@invalid.invalid wrote:
The management program can then send another broadcast packet to
configure the IP address of a device. After that, the management
program switches over to normal unicast TCP and UDP protocols (HTTP,
TFTP, etc.) to
I wonder if there is a solution to provide remote connections between
two computers similar to Remote Desktop. The difference I am looking
for is to be able to deliver speech/audio from the local machine to
the remote machine which will process the audio via Dragon Naturally
Speaking.
As an
On 2011-04-20, Chris Angelico ros...@gmail.com wrote:
On Wed, Apr 20, 2011 at 10:09 AM, Grant Edwards invalid@invalid.invalid
wrote:
The management program can then send another broadcast packet to
configure the IP address of a device. After that, the management
program switches over to
On Tue, Apr 19, 2011 at 6:04 PM, ray r...@aarden.us wrote:
I wonder if there is a solution to provide remote connections between
two computers similar to Remote Desktop. The difference I am looking
for is to be able to deliver speech/audio from the local machine to
the remote machine which
On Wed, Apr 20, 2011 at 11:15 AM, Grant Edwards invalid@invalid.invalid wrote:
Or can you simply use a stupid netmask like /1 that picks up all the
IP ranges? That way, the source-IP check wouldn't fail.
That would require that the device somehow knows that it's not
configured correctly and
Passiday passi...@gmail.com writes:
Hello,
I am planning to teach Python to a group of high school students, who
have in-depth interest in programming, hacking etc.
I am looking for some good material, what I could use as a basic guide
when preparing the classes plan for the course -
Author
Series
Lectures Slides/Documentation
Assignments
Difficulty
MIT
A Gentle Introduction to Programming Using Python
on iTunes U
http://itunes.apple.com/us/itunes-u/introduction-to-computer-science/id341597455
http://stuff.mit.edu/iap/python/
Hi all,
Is there a compatible way to use meteclasses
in both Python 2.x (2.6 to 2.7) and Python 3.x
(3.0 to 3.2).
Python 2.x:
class Foo(object):
__meteclass__ = MyMetaClass
Python 3.x:
class Foo(metaclass=MyMetaClass):
pass
Thanks,
cheers
James
--
-- James Mills
--
-- Problems are
Here are a few tutorials which may be helpful for notes etc:
Author,Series,Lectures,Slides/Documentation,Assignments,Difficulty
MIT,A Gentle Introduction to Programming Using Python,on iTunes
On Apr 19, 6:27 pm, Roger Alexander rtalexan...@mac.com wrote:
Thanks everybody, got it working.
I appreciate the help!
Roger.
It's too bad none of the other respondents pointed out to you that you
_shouldn't do this_! Pickle is not suitable for use over the network
like this. Your server
On 01/-10/-28163 02:59 PM, Ben Finney wrote:
Rhodri Jamesrho...@wildebst.demon.co.uk writes:
Language abuse: it's not just Python. A donation of just $5 will keep
a programmer in prepositions for a month. $50 will supply enough
articles to keep a small company understandable for over a year.
On 2011-04-20, Chris Angelico ros...@gmail.com wrote:
On Wed, Apr 20, 2011 at 11:15 AM, Grant Edwards invalid@invalid.invalid
wrote:
Or can you simply use a stupid netmask like /1 that picks up all the
IP ranges? That way, the source-IP check wouldn't fail.
That would require that the
Context: Embedded Python interpreter, version 2.6.6
I have a list of dictionaries, where each dictionary has a type
element which is a string. I want to reduce the list to just the
dictionaries which have the same type as the first one.
lst=[{type:calc,...},{type:fixed,...},{type:calc,...},...]
On Tue, Apr 19, 2011 at 6:15 PM, Grant Edwards invalid@invalid.invalid wrote:
Or can you simply use a stupid netmask like /1 that picks up all the
IP ranges? That way, the source-IP check wouldn't fail.
That would require that the device somehow knows that it's not
configured correctly and
On Tue, Apr 19, 2011 at 8:12 PM, Dan Stromberg drsali...@gmail.com wrote:
I agree though that you're kind of pushing IP in a direction it wasn't
intended to go.
It just occurred to me: You might get some additional mileage out of
popping the network adapter into promiscuous mode. In fact, it
On Wed, Apr 20, 2011 at 1:10 PM, Chris Angelico ros...@gmail.com wrote:
type=lst[0][type].lower()
lst=filter(lambda x: x[type].lower()==type,lst) # Restrict to that one type
After posting, I realised that type is a built-in identifier, and
did a quick variable name change to posttype which
On Tue, Apr 19, 2011 at 8:10 PM, Chris Angelico ros...@gmail.com wrote:
snip
type=lst[0][type].lower()
Tangent: Don't call it type; you're shadowing the built-in class of
the same name.
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 20, 2011 at 1:22 PM, Chris Rebert c...@rebertia.com wrote:
On Tue, Apr 19, 2011 at 8:10 PM, Chris Angelico ros...@gmail.com wrote:
snip
type=lst[0][type].lower()
Tangent: Don't call it type; you're shadowing the built-in class of
the same name.
By shadowing you mean that the
1 - 100 of 248 matches
Mail list logo