On Mar 4, 3:24 am, David Cournapeau wrote:
> On Wed, Mar 3, 2010 at 7:14 PM, geoffbache wrote:
> > Unfortunately, the location from PYTHONPATH ends up after the eggs in
> > sys.path so I can't persuade Python to import my version. The only way
> > I've found to fix it is to copy the main script
It is object of the class A, in conteiner's class tmpA. Not all method
from A are in the tmpA. So for exapmle:
A + B -- yes , tmpA + B no. I try to call method from A for tmpA. I
can to call simple method, such as change(), bit __add__ - don't
work. If to remove inheritance from object, the code
On Thu, Mar 4, 2010 at 12:25 AM, Андрей Симурзин wrote:
> It is object of the class A, in conteiner's class tmpA. Not all method
> from A are in the tmpA. So for exapmle:
> A + B -- yes , tmpA + B no. I try to call method from A for tmpA. I
> can to call simple method, such as change(), bit __add
On 4 мар, 11:38, Chris Rebert wrote:
> On Thu, Mar 4, 2010 at 12:25 AM, Андрей Симурзин wrote:
> > It is object of the class A, in conteiner's class tmpA. Not all method
> > from A are in the tmpA. So for exapmle:
> > A + B -- yes , tmpA + B no. I try to call method from A for tmpA. I
> > can to
mk writes:
> OK, but how? How would you make up e.g. for JSON's lack of comments?
Modify the JSON standard so that "JSON 2.0" allows comments.
> OTOH, if YAML produces net benefit for as few as, say, 200 people in
> real world, the effort to make it has been well worth it.
Not if 200,000 other
MRAB wrote:
Mk14 from Science of Cambridge, a kit with hex keypad and 7-segment
display, which I had to solder together, and also make my own power
supply. I had the extra RAM and the I/O chip, so that's 256B (including
the memory used by the monitor) + 256B additional RAM + 128B more in the
I/O
D'Arcy J.M. Cain wrote:
And that is why text files in MS-DOS and CP/M before it end with ^Z.
They needed a way to tell where the end of the information was. Why
they used ^Z (SUB - Substitute) instead of ^C (ETX - End of TeXt) or
even ^D (EOT - End Of Transmission) is anyone's guess.
Well, ^C
Richard Brodie wrote:
It goes back to ancient PDP operating systems, so may well
predate Unix, depending which exact OS was the first to use it.
Yes, I think it was used in RT-11, which also had
block-oriented disk files.
There were two kinds of devices in RT-11, character
and block, and the
Steve Holden wrote:
Puts me in mind of Mario Wolczko's early attempts to implement SmallTalk
on a VAX 11/750. The only bitmapped display we had available was a Three
Rivers PERQ, connected by a 9600bps serial line. We left it running at
seven o'clock one evening, and by nine am the next day it h
Am 03.03.2010 18:38, schrieb Tracubik:
Il Wed, 03 Mar 2010 09:39:54 +0100, Peter Otten ha scritto:
def loop():
count = 0
m = 0
lookup = {1: 1, 2: 10, 3: 100}
for iterations in range(20): # off by one
# ...
print "%2d %1d %3d" % (iterations, count, m) # ...
D'Arcy J.M. Cain wrote:
Did you ever play Star Trek with sound effects?
Not on that machine, but I played a version on an Apple II
that had normal speaker-generated sounds. I can still
remember the sound that a photon torpedo (a # character IIRC)
made as it lurched its way drunkenly across the
Steven D'Aprano wrote:
True, but one can look at "best practice", or even "standard practice".
For Python coders, using docstrings is standard practice if not best
practice. Using strings as comments is not.
In that particular case, yes, it would be possible to
objectively examine the code an
till i think i absolutely need to trade-off easier and less
complicated code, better db structure (from a relational perspective)
and generally less "head aches" for speed, i think i'll stick with the
joins for now!...;)
the thought of denormalization really doesnt appeal to me...
--
http://mail.
Roy Smith wrote:
The idea is I want to put in the beginning of the module:
declare('XYZ_FOO', 0, "The foo property")
declare('XYZ_BAR', 1, "The bar property")
declare('XYZ_BAZ', 2, "reserved for future use")
Okay, that seems like a passable excuse.
One thing to watch out for is that if your '
Floris Bruynooghe wrote:
I was just wondering if
other people ever missed the "q.put_at_front_of_queue()" method or if
it is just me.
Sounds like you don't want a queue, but a stack. Or
maybe a double-ended queue.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Wanderer wrote:
On Mar 3, 2:33 pm, Robert Kern wrote:
On 2010-03-03 11:39 AM, Wanderer wrote:
Pylint W0221 gives the warning
Argument number differs from overridden method.
Why is this a problem? I'm overriding the method to add additional
functionality.
There are exce
Dear group,
I am observing weird semi-erratic behaviour that involves Python 3 and
lxml, is extremely sensitive to changes in the input data, and only
occurs when I name a partial result. I would like some help with this,
please. (Python 3.1.1; GNU/Linux; how do I find lxml version?)
The test scr
Peter Otten wrote:
Something must be wrong with me today because I find the Pascal code /more/
readable...
Actually I don't find either of them very readable. The
control flow is pretty convoluted either way. It might
be better if it used real-life variable and function
names to give some cont
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is exited
via an exception." This is precisely what the try: finally: syntax is
for.
You'd have to nest it. That's ugly. And more importantly,
Eike Welk a écrit :
Bruno Desthuilliers wrote:
John Posner a écrit :
Done -- see http://wiki.python.org/moin/FromFunctionToMethod
Done and well done !-)
Thanks again for the good job John.
I like it too, thanks to both of you!
I have two small ideas for improvement:
- Swap the first two pa
Peter Billam wrote:
A very important thing about CPAN modules is the consistent
basic install method: perl Makefile.PL ; make ; make install
Well, we more or less have that with Python, too:
python setup.py install
It may not always work smoothly, but it's the
one obvious thing to try wh
2010/3/4 Gregory Ewing :
> Peter Billam wrote:
>
>> A very important thing about CPAN modules is the consistent
>> basic install method: perl Makefile.PL ; make ; make install
>
> Well, we more or less have that with Python, too:
>
> python setup.py install
>
> It may not always work smoothly, b
Steven D'Aprano wrote:
Groan. What is it with the Singleton design pattern? It is one of the
least useful design patterns, and yet it's *everywhere* in Java and C++
world.
It's useful when larking about in language internals for learning
purposes, for instance. I don't recall ever actually ha
Bruno Desthuilliers wrote:
mk a écrit :
Obviously, don't try this on low-memory machine:
a={}
for i in range(1000):
Note that in Python 2, this will build a list of 1000 int objects.
You may want to use xrange instead...
Huh? I was under impression that some time after 2.0 range w
Gregory Ewing writes:
> However, that's only a very small part of what goes to make good code.
> Much more important are questions like: Are the comments meaningful
> and helpful? Is the code reasonably self-explanatory outside of the
> comments? Is it well modularised, and common functionality f
Oren Elrad a écrit :
Howdy all, longtime appreciative user, first time mailer-inner.
I'm wondering if there is any support (tepid better than none) for the
following syntactic sugar:
silence:
block
->
try:
block
except:
pass
Hopefully not.
Hi all,
I want to use python to access to https server, like
"https://212.218.229.10/chinatest/";
If open it from IE, will see the pop-up login windows like this
I tried several ways but always only get page for" HTTP Error 401.2 -
Unauthorized" error. ( myusername and mypassword are all corr
Jonathan Gardner wrote:
When you are starting a new project and you don't have a definitive
picture of what the data is going to look like or how it is going to
be queried, SQL databases (like PostgreSQL) will help you quickly
formalize and understand what your data needs to do. In this role,
th
Steven D'Aprano wrote:
> On Wed, 03 Mar 2010 19:54:52 +0100, mk wrote:
>
>> Hello,
>>
>> So I set out to write generic singleton, i.e. the one that would do a
>> singleton with attributes of specified class. At first:
>
> Groan. What is it with the Singleton design pattern? It is one of the
>
mk wrote:
> Hm, apparently Python didn't spot that 'spam'*10 in a's values is really
> the same string, right?
If you want it to spot that then give it a hint that it should be looking
for identical strings:
>>> a={}
>>> for i in range(1000):
... a[i]=intern('spam'*10)
should reduc
Philip Semanchuk wrote:
Well OK, but that's a very different argument. Yes, joins can be
expensive. They're often still the best option, though. The first step
people usually take to get away from joins is denormalization which can
improve SELECT performance at the expense of slowing down INSER
Hi
We can call a function fn using
val = fn(*args, **kwargs)
I'm looking for a good name for the pair (args, kwargs). Any suggestions?
Here's my use case:
def doit(fn , wibble, expect):
args, kwargs = wibble
actual = fn(*args, **kwargs)
if actual != expect:
World's Cheapest Rate Hosting, 99.9% Uptime
US Based Dedicated Server, Fast Customer Service
Register Domain only at $1.99 per Year
3 Month Hosting Free with 1 year Package
http://hostwebspaces.com/
--
http://mail.python.org/mailman/listinfo/python-list
Am 04.03.2010 11:38, schrieb Karen Wang:
Hi all,
I want to use python to access to https server, like
"https://212.218.229.10/chinatest/";
If open it from IE, will see the pop-up login windows like this
I tried several ways but always only get page for" HTTP Error 401.2 -
Unauthorized" error
Jonathan Fine wrote:
We can call a function fn using
val = fn(*args, **kwargs)
I'm looking for a good name for the pair (args, kwargs). Any suggestions?
For now I'll use argpair, but if anyone has a better idea, I'll use it.
In the legacy of C and Java (okay, that doesn't carry _much_
You may also want to look into mechanize module.
On Thu, Mar 4, 2010 at 6:11 PM, Michael Rudolf wrote:
> Am 04.03.2010 11:38, schrieb Karen Wang:
>
> Hi all,
>>
>> I want to use python to access to https server, like
>> "https://212.218.229.10/chinatest/";
>>
>> If open it from IE, will see the
Avid Fan wrote:
> Jonathan Gardner wrote:
>
>>
>> I see it as a sign of maturity with sufficiently scaled software that
>> they no longer use an SQL database to manage their data. At some
point
>> in the project's lifetime, the data is understood well enough that
the
>> general nature of the
On Mar 3, 6:41 pm, Laszlo Nagy wrote:
> This is just an interesting code pattern that I have recently used:
>
> class CacheStorage(object):
> """Generic cache storage class."""
> @classmethod
> def get_factory(cls,*args,**kwargs):
> """Create factory for a given set of cache st
On 3/4/2010 5:59 AM, Bruno Desthuilliers wrote:
I have two small ideas for improvement: - Swap the first two
paragraphs. First say what it is, and then give the motivation.
Mmm... As far as I'm concerned, I like it the way its. John ?
I think it doesn't make very much difference. But in the
Hello!
I'm pleased to announce version 0.12.2, a bugfix release of branch 0.12
of SQLObject.
What is SQLObject
=
SQLObject is an object-relational mapper. Your database tables are described
as classes, and rows are instances of those classes. SQLObject is meant to be
easy to u
On Mar 4, 12:50 am, Zeeshan Quireshi
wrote:
> Hello, I'm using ctypes to wrap a library i wrote. I am trying to pass
> it a FILE *pointer, how do i open a file in Python and convert it to a
> FILE *pointer. Or do i have to call the C library using ctypes first,
> get the pointer and then pass it t
Hello!
I'm pleased to announce version 0.11.4, a minor bugfix release of 0.11 branch
of SQLObject.
What is SQLObject
=
SQLObject is an object-relational mapper. Your database tables are described
as classes, and rows are instances of those classes. SQLObject is meant to be
eas
Jonathan Fine writes:
> I'm looking for a good name for the pair (args, kwargs). Any suggestions?
>
> Here's my use case:
> def doit(fn , wibble, expect):
> args, kwargs = wibble
> actual = fn(*args, **kwargs)
I think this may have been broken in 3.x, but in 2.6 the compiler
On Mar 3, 4:55 pm, toby wrote:
> > where you have to store data and
>
> "relational data"
Data is neither relational nor unrelational. Data is data.
Relationships are an artifact, something we impose on the data.
Relations are for human convenience, not something inherent in the
data itself.
>
On Mar 3, 9:11 pm, John Bokma wrote:
> Philip Semanchuk writes:
>
> > In other words, if I was a Perl user under Ubuntu would I use
> > the pkg manager to add a Perl module, or CPAN, or would both work?
>
> Both would work, but I would make very sure to use a separate
> installation directory for
Duncan Booth wrote:
If you look at some of the uses of bigtable you may begin to understand
the tradeoffs that are made with sql. When you use bigtable you have
records with fields, and you have indices, but there are limitations on
the kinds of queries you can perform: in particular you canno
On Wed, 2010-03-03 at 20:39 +0100, mk wrote:
> Hello Tim,
>
> Pardon the questions but I haven't had the need to use denormalization
> yet, so:
> IOW you basically merged the tables like follows?
>
> CREATE TABLE projects (
> client_id BIGINT NOT NULL,
> project_id BIGINT NOT NULL,
>
On Wed, 2010-03-03 at 16:23 -0500, D'Arcy J.M. Cain wrote:
> On Wed, 03 Mar 2010 20:39:35 +0100
> mk wrote:
> > > If you denormalise the table, and update the first index to be on
> > > (client_id, project_id, date) it can end up running far more quickly -
>
> Maybe. Don't start with denormaliza
On 2010-03-03 18:49 PM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-03 15:35 PM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-03 13:32 PM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-03 11:18 AM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-03 09:56 AM, Alf P. Steinba
On Mar 3, 5:30 pm, Ben Finney wrote:
>
> Terry Reedy writes:
>
> > On 3/3/2010 12:05 PM, John Nagle wrote:
>
> > > CPAN enforces standard organization on packages. PyPi does not.
>
> This is, I think, something we don't need as much in Python; there is a
> fundamental difference between Perl's de
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is exited
via an exception." This is precisely what the try: finally: syntax is
for.
You'd have to nest it. That's u
[ {'vlan_or_intf': 'VLAN2021'},
{'vlan_or_intf': 'Interface'},
{'vlan_or_intf': 'Po1'},
{'vlan_or_intf': 'Po306'},
{'vlan_or_intf': 'VLAN2022'},
{'vlan_or_intf': 'Interface'},
{'vlan_or_intf': 'Gi7/33'},
{'vlan_or_intf': 'Po1'},
{'vlan_or_intf': 'Po306'},
{'vlan_or_intf': 'VLAN2051'},
{'v
On 2010-03-04 09:48 AM, Alf P. Steinbach wrote:
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is exited
via an exception." This is precisely what the try: finally: syn
Gregory Ewing wrote:
MRAB wrote:
Mk14 from Science of Cambridge, a kit with hex keypad and 7-segment
display, which I had to solder together, and also make my own power
supply. I had the extra RAM and the I/O chip, so that's 256B (including
the memory used by the monitor) + 256B additional RAM
Alf P. Steinbach wrote:
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is
exited via an exception." This is precisely what the try: finally:
syntax is for.
You'd
Karen Wang wrote:
> Hi all,
>
> I want to use python to access to https server, like
> “https://212.218.229.10/chinatest/”
>
> If open it from IE, will see the pop-up login windows like this
>
> I tried several ways but always only get page for” HTTP Error 401.2 –
> Unauthorized” error. ( myuser
Not to out do you guys, but over here in the states, I started out with
a Radio Shack 'computer' that consisted of 10 slideable switches and 10
flashlight bulbs. You ran wires betweens the slideable switches to
create 'programs'. Wish I could remember what this thing was called - my
google-fu fails
On 04/03/10 16:21, ccc31807 wrote:
> On Mar 3, 4:55 pm, toby wrote:
>>> where you have to store data and
>>
>> "relational data"
>
> Data is neither relational nor unrelational. Data is data.
> Relationships are an artifact, something we impose on the data.
> Relations are for human convenience,
Sneaky Wombat wrote:
I was going to write a def to loop through and look for certain pre-
compiled regexs, and then put them in a new dictionary and append to a
list,
regexes are overkill in this case I think.
[ 'VLAN4065',
'Interface',
'Gi9/6',
'Po2',
'Po3',
'Po306',
'VLAN4068',
'Int
* Robert Kern:
On 2010-03-03 18:49 PM, Alf P. Steinbach wrote:
* Robert Kern:
[snip]
can you
understand why we might think that you were saying that try: finally:
was wrong and that you were proposing that your code was equivalent to
some try: except: else: suite?
No, not really. His code d
On 2010-03-04 10:32 AM, Jean-Michel Pichavant wrote:
Alf P. Steinbach wrote:
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is
exited via an exception." This is precis
* Robert Kern:
On 2010-03-04 09:48 AM, Alf P. Steinbach wrote:
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is exited
via an exception." This is precisely what the t
On 2010-03-04 10:56 AM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-03 18:49 PM, Alf P. Steinbach wrote:
* Robert Kern:
[snip]
can you
understand why we might think that you were saying that try: finally:
was wrong and that you were proposing that your code was equivalent to
some try: e
On Mar 4, 12:24 pm, Duncan Booth wrote:
>
> >>> a={}
> >>> for i in range(1000):
> ... a[i]=intern('spam'*10)
>
"intern": another name borrowed from Lisp?
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-03-04 11:02 AM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-04 09:48 AM, Alf P. Steinbach wrote:
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is exite
On Mar 4, 10:55 am, mk wrote:
> Sneaky Wombat wrote:
> > I was going to write a def to loop through and look for certain pre-
> > compiled regexs, and then put them in a new dictionary and append to a
> > list,
>
> regexes are overkill in this case I think.
>
> > [ 'VLAN4065',
> > 'Interface',
>
On Thu, 04 Mar 2010 18:51:21 +0200, Juan Pedro Bolivar Puente
wrote:
>On 04/03/10 16:21, ccc31807 wrote:
>> On Mar 3, 4:55 pm, toby wrote:
where you have to store data and
>>>
>>> "relational data"
>>
>> Data is neither relational nor unrelational. Data is data.
>> Relationships are an ar
On Mar 4, 11:51 am, Juan Pedro Bolivar Puente
wrote:
> No, relations are data.
This depends on your definition of 'data.' I would say that
relationships is information gleaned from the data.
> "Data is data" says nothing. Data is
> information.
To me, data and information are not the same thing
Hi,
I'm pleased to announce the 0.1.3 release of psutil:
http://code.google.com/p/psutil
=== About ===
psutil is a module providing an interface for retrieving information
on running processes and system utilization (CPU, memory) in a
portable way by using Python, implementing many functionalitie
On Mar 4, 3:57 pm, Sneaky Wombat wrote:
> [ {'vlan_or_intf': 'VLAN2021'},
> {'vlan_or_intf': 'Interface'},
> {'vlan_or_intf': 'Po1'},
> {'vlan_or_intf': 'Po306'},
> {'vlan_or_intf': 'VLAN2022'},
> {'vlan_or_intf': 'Interface'},
> {'vlan_or_intf': 'Gi7/33'},
> {'vlan_or_intf': 'Po1'},
> {'v
On 3/4/2010 6:56 AM, mk wrote:
Bruno Desthuilliers wrote:
Huh? I was under impression that some time after 2.0 range was made to
work "under the covers" like xrange when used in a loop? Or is it 3.0
that does that?
3.0.
--
http://mail.python.org/mailman/listinfo/python-list
Am 04.03.2010 17:32, schrieb Jean-Michel Pichavant:
It looks like to me that 'with' statements are like decorators: overrated.
Oh no, you just insulted my favourite two python features, followed
immediately by generators, iterators and list comprehensions / generator
expressions :p
No, real
Am 04.03.2010 18:20, schrieb Robert Kern:
What I'm trying to explain is that the with: statement has a use even if
Cleanup doesn't. Arguing that Cleanup doesn't improve on try: finally:
does not mean that the with: statement doesn't improve on try: finally:.
Yes, the with-statement rocks :)
I
Duncan Booth wrote:
> mk wrote:
>
>> Hm, apparently Python didn't spot that 'spam'*10 in a's values is really
>> the same string, right?
>
> If you want it to spot that then give it a hint that it should be looking
> for identical strings:
>
> >>> a={}
> >>> for i in range(1000):
> ...
Ben Finney writes:
> Terry Reedy writes:
>
>> On 3/3/2010 12:05 PM, John Nagle wrote:
>> > CPAN is a repository. PyPi is an collection of links.
>>
>> As Ben said, PyPI currently is also a respository and not just links
>> to other repositories.
[..]
>> > CPAN enforces standard organization on
Jonathan Fine wrote:
> Hi
>
> We can call a function fn using
> val = fn(*args, **kwargs)
>
> I'm looking for a good name for the pair (args, kwargs). Any suggestions?
>
> Here's my use case:
> def doit(fn , wibble, expect):
> args, kwargs = wibble
> actual = fn(*args, *
Michael Rudolf wrote:
Am 04.03.2010 17:32, schrieb Jean-Michel Pichavant:
It looks like to me that 'with' statements are like decorators:
overrated.
Oh no, you just insulted my favourite two python features, followed
immediately by generators, iterators and list comprehensions /
generator ex
* Robert Kern:
On 2010-03-04 10:56 AM, Alf P. Steinbach wrote:
* Robert Kern:
On 2010-03-03 18:49 PM, Alf P. Steinbach wrote:
[snippety]
If you call the possibly failing operation "A", then that systematic
approach goes like this: if A fails, then it has cleaned up its own
mess, but if A su
I've written my first python program, and would love suggestions for
improvement.
I'm a perl programmer and used a perl version of this program to guide
me. So in that sense, the python is "perlesque"
This script parses /etc/hosts for hostnames, and based on terms given
on the command line (argv)
"'2+" writes:
> dev = ao.AudioDevice('alsa')
> dev.play(x)
>
> could launch me a semi realtime dj kinda sys
> luckily .. it does seem to be making the right sound
> but why?
> the default of the samplerate and that 16bit happened to match with my thing
> x?
Yes, that seems to be the case from h
Jussi Piitulainen, 04.03.2010 11:46:
I am observing weird semi-erratic behaviour that involves Python 3 and
lxml, is extremely sensitive to changes in the input data, and only
occurs when I name a partial result. I would like some help with this,
please. (Python 3.1.1; GNU/Linux; how do I find lx
mk wrote:
> Duncan Booth wrote:
>
>> If you look at some of the uses of bigtable you may begin to
>> understand the tradeoffs that are made with sql. When you use
>> bigtable you have records with fields, and you have indices, but
>> there are limitations on the kinds of queries you can perform:
lbolla wrote:
> On Mar 4, 3:57 pm, Sneaky Wombat wrote:
> > [ {'vlan_or_intf': 'VLAN2021'},
> > {'vlan_or_intf': 'Interface'},
> > {'vlan_or_intf': 'Po1'},
> > {'vlan_or_intf': 'Po306'},
> > {'vlan_or_intf': 'VLAN2022'},
> > {'vlan_or_intf': 'Interface'},
> > {'vlan_or_intf': 'Gi7/33'},
>
Duncan Booth writes:
> It is also *everywhere* in the Python world. Unlike Java and C++, Python
> even has its own built-in type for singletons.
>
> If you want a singleton in Python use a module.
>
> So the OP's original examples become:
>
> --- file singleton.py ---
> foo = {}
> bar = []
>
> -
Pete Emerson wrote:
I've written my first python program, and would love suggestions for
improvement.
I'm a perl programmer and used a perl version of this program to guide
me. So in that sense, the python is "perlesque"
This script parses /etc/hosts for hostnames, and based on terms given
on t
On Mar 4, 2:30 pm, MRAB wrote:
> Pete Emerson wrote:
> > I've written my first python program, and would love suggestions for
> > improvement.
>
> > I'm a perl programmer and used a perl version of this program to guide
> > me. So in that sense, the python is "perlesque"
>
> > This script parses /
Introduction
-
Exscript is a Python module and template processor for automating
Telnet or SSH sessions. Exscript supports a wide range of features,
such as parallelization, AAA authentication methods, TACACS, and a
very simple template language. Please refer to the project page for
upd
On Mar 3, 10:56 am, "Alf P. Steinbach" wrote:
> * Mike Kent:
>
> > What's the compelling use case for this vs. a simple try/finally?
>
> if you thought about it you would mean a simple "try/else". "finally" is
> always
> executed. which is incorrect for cleanup
>
> by the way, that's one advantag
On Mar 4, 5:45 am, Jean-Michel Pichavant
wrote:
> Wanderer wrote:
> > On Mar 3, 2:33 pm, Robert Kern wrote:
>
> >> On 2010-03-03 11:39 AM, Wanderer wrote:
>
> >>> Pylint W0221 gives the warning
> >>> Argument number differs from overridden method.
>
> >>> Why is this a problem? I'm overriding the
Man, deja-vu, I could have sworn I read this thread months ago...
On Thu, Mar 4, 2010 at 2:18 PM, nn wrote:
>
>
> lbolla wrote:
> > On Mar 4, 3:57 pm, Sneaky Wombat wrote:
> > > [ {'vlan_or_intf': 'VLAN2021'},
> > > {'vlan_or_intf': 'Interface'},
> > > {'vlan_or_intf': 'Po1'},
> > > {'vlan_o
On Mar 4, 12:30 pm, Robert Kern wrote:
> He's ignorant of the use cases of the with: statement, true.
Ouch! Ignorant of the use cases of the with statement, am I?
Odd, I use it all the time.
> Given only your
> example of the with: statement, it is hard to fault him for thinking that try:
>
On 3/3/2010 6:56 PM, John Posner wrote:
... I was thinking
today about "doing a Bruno", and producing similar pieces on:
* properties created with the @property decorator
* the descriptor protocol
I'll try to produce something over the next couple of days.
Starting to think about a writeup
On Mar 3, 12:00 pm, Robert Kern wrote:
> On 2010-03-03 09:39 AM, Mike Kent wrote:
>
> > What's the compelling use case for this vs. a simple try/finally?
>
> > original_dir = os.getcwd()
> > try:
> > os.chdir(somewhere)
> > # Do other stuff
> > finally:
> > os.c
Hi,
I habe administrator privilege on a window host and would like to write
a script setting some registry entries for other users.
There are potentially at least two wo ways of doing this:
1.) start a subprocess as other user and change the regitrey for
CURRENT_USER
However I don't know ho
Stefan Behnel writes:
> Jussi Piitulainen, 04.03.2010 11:46:
> > I am observing weird semi-erratic behaviour that involves Python 3
> > and lxml, is extremely sensitive to changes in the input data, and
> > only occurs when I name a partial result. I would like some help
> > with this, please. (Pyt
Am 04.03.10 06:23, schrieb yamamoto:
Hi,
I tried to make a simple script with SUD library for caching torrent
files. it doenst work!
[versions]
suds: 0.4, python: 2.6.4
[code]
from suds.client import Client
import base64
path = 'sample.torrent'
doc = open(path, 'rb').read()
encoded_doc = base6
This is the full data file on which my regress/Tribug exhibits the
behaviour that I find incomprehensible, described in the first post in
this thread. The comment in the beginning of the file below was
written before I commented out some records in the data, so the actual
numbers now are not ten ex
On Thu, Mar 4, 2010 at 10:39 AM, Pete Emerson wrote:
>
> #!/usr/bin/python
>
More common:
#!/usr/bin/env python
> import sys, fileinput, re, os
>
> filename = '/etc/hosts'
>
> hosts = []
>
> for line in open(filename, 'r'):
> match = re.search('\d+\.\d+\.\d+\.\d+\s+(\S+)', line)
>
On Mar 4, 3:24 pm, News123 wrote:
> Hi,
>
> I habe administrator privilege on a window host and would like to write
> a script setting some registry entries for other users.
Why? Are you writing a virus?
>
> There are potentially at least two wo ways of doing this:
>
> 1.) start a subprocess as
Hi All,
Pydev 1.5.5 has been released
Details on Pydev: http://pydev.org
Details on its development: http://pydev.blogspot.com
Release Highlights:
---
* Predefined completions available for code completion:
* Predefined completions may be created for use when so
1 - 100 of 141 matches
Mail list logo