On Mon, Mar 30, 2009 at 9:40 AM, jfager wrote:
> I've written a short post on including support for configuration down
> at the language level, including a small preliminary half-functional
> example of what this might look like in Python, available at
> http://jasonfager.com/?p=440.
>
> The basic
On Mar 30, 9:41 pm, "Martin P. Hellwig"
wrote:
> Rustom Mody wrote:
>
> The essence of your program is that you only want information, that is
> great! Since that makes it all a bit simpler.
>
> How about writing a cronjob that outputs the require information into a
> file and then write a separa
This might be a better link.
http://code.google.com/p/dragonfly/
After getting it to work, at first, it seems excellent for continuous
command recognition (with speech activated scripting) in Windows. Yes!
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 30, 9:31 pm, "Rhodri James"
wrote:
> On Mon, 30 Mar 2009 16:59:12 +0100, jfager wrote:
> > It's the configuration problem. Right now you would use something
> > like ConfigParser or optparse to populate some configuration object,
> > which you would then pass around and extract values fro
On 31 Mar, 01:16, Dale Amon wrote:
> I wonder if someone could point me at documentation
> on how to debug some of the standard Unix type things
> in Idle. I cannot seem to figure out how to set my
> argument line for the program I am debugging in an Idle
> window. for example:
>
> vlmdeck
There has got to be a better way of doing this:
I'm reading in a file that has a lot of garbage, but eventually has
something that looks similar to:
(some lines of garbage)
dip/dir.
(some more lines of garbage)
55/158
(some more lines of garbage)
33/156
etc.
and I'm stripping out the 55/158 value
Hello all,
I've a requirement where I need to create around 1000
files under a given folder with each file size of around 1GB. The
constraints here are each file should have random data and no two
files should be unique even if I run the same script multiple times.
Moreover the filename
Hi,
I'm writing a new PyTypeObject that is base type, supports cyclic GC,
and has a tp_dictoffset. If my type is sub-typed by a python class,
what exactly are the rules for how I'm supposed to treat my PyDict
object with regards to cyclic GC? Do I still visit it in my traverse
() function if I'm
On Mar 31, 2:25 pm, Mensanator wrote:
> Thanks, I'll try that next time (when the Winzip 45 day
> trial expires).
Better still, grab the freec 7-Zip: http://www.7-zip.org/
Supported formats:
* Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR
* Unpacking only: ARJ, CAB, CHM, CPIO, DEB,
On Mar 31, 1:13 pm, "Nick" wrote:
> I want to add a "pedigree" function to Animal so that I can have:
>
> >>> h = Human()
> >>> h.pedigree()
>
> human < primate < mammal < animal
class Animal(object):
@classmethod
def pedigree(cls):
return [c.__name__ for c in cls.mro() if c is no
On Mar 30, 8:49�pm, "drobi...@gmail.com" wrote:
> On Mar 30, 7:10�pm, Mensanator wrote:
>
> > I'm looking for the Turtle Graphics Demos (apparently not included in
> > the Windows install).
>
> > So I downloaded the bzipped source tarball.
>
> > I've got Cygwin installed and assume it has the nee
En Tue, 31 Mar 2009 00:13:44 -0300, Nick
escribió:
I've got a collection of classes describing animals, part of which looks
like:
class Animal(object):
def __init__(self):
self.pet = False
self.edible = False
self.legs = 0
self.sound = None
self.
Hi Python-list -
Has anyone figured this out from Rebecca:
Hi, I am having trouble with win32com for python. I get the following
error when I try to issue any command after using Dispatch.
>>> xl=win32com.client.Dispatch("Excel.Application")
>>> xl.Visible=0
Traceback (most recent call last):
Hi,
Following is the in-function cursor object.
Code:import pgdb
__metaclass__=type
class addbook:
conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')
curs=conn.cursor()
def addBook(self):
*infunction_curs=self.curs**
*
Hi,
Following is the in-function cursor object.
Code:import pgdb
__metaclass__=type
class addbook:
conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')
curs=conn.cursor()
def addBook(self):
*infunction_curs=self.curs**
*
I've got a collection of classes describing animals, part of which looks
like:
class Animal(object):
def __init__(self):
self.pet = False
self.edible = False
self.legs = 0
self.sound = None
self.name = self.__class__.__name__.lower()
class Mammal(Animal):
On Mon, Mar 30, 2009 at 09:47:24PM -0500, Dave Angel wrote:
> See http://docs.python.org/library/idle.html and search for command line
>
> According to that page (for Python 2.6.1), you can set those parameters
> on the command line that starts IDLE itself.
>
> I haven't tried it yet, as I'm u
On Mar 30, 12:27 pm, pataphor wrote:
> On Mon, 30 Mar 2009 03:30:04 -0500
>
> Nick Craig-Wood wrote:
> > >>> class Node(object):
> > ... __slots__ = ["prev", "next", "this"]
> > ... def __init__(self, prev, next, this):
> > ... self.prev = prev
> > ... self.next = next
> >
http://www.python.org/dev/peps/pep-3117/
Found it uber-funny! enjoy!
It would have been cool if they actually accepted this!
--
Armin Moradi
--
http://mail.python.org/mailman/listinfo/python-list
En Mon, 30 Mar 2009 23:47:24 -0300, Dave Angel
escribió:
See http://docs.python.org/library/idle.html and search for command
line
According to that page (for Python 2.6.1), you can set those parameters
on the command line that starts IDLE itself.
Well, that's not terribly useful, I'
En Mon, 30 Mar 2009 21:15:59 -0300, Aahz escribió:
In article ,
Gabriel Genellina wrote:
I'd recommend the oposite - use relative (intra-package) imports when
possible. Explicit is better than implicit - and starting with 2.7 -when
"absolute" import semantics will be enabled by default- you'
See http://docs.python.org/library/idle.html and search for command line
According to that page (for Python 2.6.1), you can set those parameters
on the command line that starts IDLE itself.
I haven't tried it yet, as I'm using Komodo.
Dale Amon wrote:
On Mon, Mar 30, 2009 at 08:11:10PM -0
I've emabedded Python(2.6) in my C++ application and using on Solaris
5.10.
When the application calls Py_Eval, it causes an abort & application
core dumps. But this is at random times & no pattern for this. Crash
is as below:
Can you please help to know, what can cause this abort in PyFrame_New?
Hi all,
I am interested in detecting usb mass storage devices, r there any scripts
in python to do so. Thanks in advance.
Regards
Prakash
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
En Mon, 30 Mar 2009 22:21:12 -0300, Dale Amon escribió:
vlmdeckcheck.py --strict --debug file.dat
There must be a way to tell it what the command line args
are for the test run but I can't find it so far.
The line above represent what I want to emulate within id
En Mon, 30 Mar 2009 22:21:12 -0300, Dale Amon escribió:
vlmdeckcheck.py --strict --debug file.dat
There must be a way to tell it what the command line args
are for the test run but I can't find it so far.
The line above represent what I want to emulate within idle.
If you run idle, s
Hello,
I have a strange problem with pexpect:
$ cat test.py
#!/usr/bin/python
import pexpect
child = pexpect.spawn("./test.pl")
while True:
try:
line = raw_input()
except EOFError:
break
child.sendline(line)
print child.readline().rstrip("\r\n")
child.close()
On Mar 30, 7:10 pm, Mensanator wrote:
> I'm looking for the Turtle Graphics Demos (apparently not included in
> the Windows install).
>
> So I downloaded the bzipped source tarball.
>
> I've got Cygwin installed and assume it has the needed utilities.
>
> What would I type at the Cygwin prompt to
On Mar 30, 6:34 pm, "Gabriel Genellina"
wrote:
> En Mon, 30 Mar 2009 20:10:28 -0300, Mensanator
> escribió:
>
> > I'm looking for the Turtle Graphics Demos (apparently not included in
> > the Windows install).
>
> > So I downloaded the bzipped source tarball.
>
> > I've got Cygwin installed and
"Gabriel Genellina" wrote:
> You should thank Aaron Brady who wrote the original function. I just
> smoothed some edges and glued it with your own code.
Ah, Aaron Brady is castironpi... Well, thank you both then. (-:
AK
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 30 Mar 2009 16:59:12 +0100, jfager wrote:
It's the configuration problem. Right now you would use something
like ConfigParser or optparse to populate some configuration object,
which you would then pass around and extract values from. This would
provide two advantages over these appro
On Mon, Mar 30, 2009 at 08:11:10PM -0500, Dave Angel wrote:
> I don't know what Idle has to do with it. sys.args contains the command
> line arguments used to start a script.
>
> Dale Amon wrote:
>> I wonder if someone could point me at documentation on how to debug
>> some of the standard Unix
let run-cmd be used why go for IDLE
2009/3/31 Dale Amon
> I wonder if someone could point me at documentation
> on how to debug some of the standard Unix type things
> in Idle. I cannot seem to figure out how to set my
> argument line for the program I am debugging in an Idle
> window. for examp
I don't know what Idle has to do with it. sys.args contains the command
line arguments used to start a script.
Dale Amon wrote:
I wonder if someone could point me at documentation
on how to debug some of the standard Unix type things
in Idle. I cannot seem to figure out how to set my
argume
Just as feedback, I went back to the __init__ style routine, weeded
out a few things, installed python 2.6.1, and it works great. Thanks
for all your help. Now I've got to convince 1000 people at my company
to switch. That's going to be the tough part.
--
http://mail.python.org/mailman/listinfo
JonathanB wrote:
Ok, I'm sure this is really simple, but I cannot for the life of me
get any print statements from any of my python scripts to actually
print when I call them from the windows command line. What am I doing
wrong?
hello.py:
print "Hello World!"
command line:
E:\Python\dev>python
i understand that you get request token,and you need to get Access
tokens after that,
my question is about Access tokens:which mechanism do u use to tore
access tokens for future use
I'm sorry, I have no idea what you're talking about or how it relates
to bad indent levels. What *exactly* (inc
On Mon, 30 Mar 2009 18:57:01 +0100, wrote:
Thanks Scott. I think you are saying don't try to subclass from type
long, because it is immutable (cannot be changed). If I subclass from
type object, then the value can be changed, but I still can't print
without explicitely casting back to long in
In article ,
Gabriel Genellina wrote:
>
>I'd recommend the oposite - use relative (intra-package) imports when
>possible. Explicit is better than implicit - and starting with 2.7 -when
>"absolute" import semantics will be enabled by default- you'll *have* to
>use relative imports inside a pa
I wonder if someone could point me at documentation
on how to debug some of the standard Unix type things
in Idle. I cannot seem to figure out how to set my
argument line for the program I am debugging in an Idle
window. for example:
vlmdeckcheck.py --strict --debug file.dat
There must b
En Mon, 30 Mar 2009 20:10:28 -0300, Mensanator
escribió:
I'm looking for the Turtle Graphics Demos (apparently not included in
the Windows install).
So I downloaded the bzipped source tarball.
I've got Cygwin installed and assume it has the needed utilities.
What would I type at the Cygwin
Hi Larry
I actually feel this is a bad idea, (that is making list() a method of
all iterators)
because quite often iterators are created that don't end.
What happens then, is you have a method that will intentionally cause
you to run out of memory
or you exclude it from such iterators (creating i
I'm looking for the Turtle Graphics Demos (apparently not included in
the Windows install).
So I downloaded the bzipped source tarball.
I've got Cygwin installed and assume it has the needed utilities.
What would I type at the Cygwin prompt to unpack this puppy?
--
http://mail.python.org/mailman
#This is pyFind, a python replacement for find(1)
import os, sys, re, fnmatch
from os.path import join
from optparse import OptionParser
usage = "usage: %prog --name [directory1 directory2]"
parser = OptionParser(usage=usage)
parser.add_option("--regex", dest="regex",
help="REGEX MATCHING DOES NO
En Mon, 30 Mar 2009 17:34:32 -0300, Alia K
escribió:
Thanks Gabriel. Your solution works like a charm. (-:
You should thank Aaron Brady who wrote the original function. I just
smoothed some edges and glued it with your own code.
--
Gabriel Genellina
--
http://mail.python.org/mailman/li
On Mar 30, 6:28 pm, John Machin wrote:
> On Mar 31, 8:37 am, Irmen de Jong wrote:
> > Does just typing:
>
> > python
Yes, just typing python takes me to my interactive prompt
> > Or do you have a module in your E:\Python\dev directory called 'os', 'sys'
> > or something
> > else that may cl
On Mar 31, 8:37 am, Irmen de Jong wrote:
> JonathanB wrote:
> > Ok, I'm sure this is really simple, but I cannot for the life of me
> > get any print statements from any of my python scripts to actually
> > print when I call them from the windows command line. What am I doing
> > wrong?
>
> > hell
Sorry, I meant I took out the stuff *before* the definition of class
myclass, and also those things that referred to it. I didn't want to
import ctypes, because it couldn't have any effect on the problem at hand.
Since then I see that you've succeeded with the __int__() method call,
and your
I see list(x.f()) as like x.f().iter().list(), where "list()"
is a method of all "iterator" objects, and "iter()" is a method
of all "iterable" objects, and whatever object is returned by
x.f() is of a type which conforms to the "iterable" interface.
I am not saying this is the way things /should/
On Mar 31, 3:07 am, 7stud wrote:
> On Mar 3, 4:01 am, Graham Dumpleton
> wrote:
>
>
>
> > On Mar 3, 8:53 am, Rey Bango wrote:
>
> > > Hi,
>
> > > I'd like to upgrade the installed version of Python that came standard
> > > on OS X (Leopard) with either 2.6.1 or 3.0.1. Before I stick my foot
> >
JonathanB wrote:
Ok, I'm sure this is really simple, but I cannot for the life of me
get any print statements from any of my python scripts to actually
print when I call them from the windows command line. What am I doing
wrong?
hello.py:
print "Hello World!"
command line:
E:\Python\dev>python
On Mar 30, 4:13 pm, dj wrote:
> I am trying to create a log level called userinfo for the pythonlogging. I
> read the source code and tried to register the level to theloggingnamespace
> with the following source:
>
> fromloggingimport Logger
>
> # create th
On Mar 30, 6:57 am, Gabriel Genellina wrote:
> Gabriel Genellina yahoo.com.ar> writes:
>
>
>
> > En Sat, 28 Mar 2009 06:03:33 -0300, geoffbache
> jeppesen.com>
> > escribió:
>
> > > Well yes, but the point is surely that the standard output of the
> > > background sleeping process is pointed t
On Mar 30, 12:05 pm, mark.sea...@gmail.com wrote:
> On Mar 30, 12:01 pm, mark.sea...@gmail.com wrote:
>
>
>
>
>
> > On Mar 30, 11:53 am, Dave Angel wrote:
>
> > > After taking out the class myclass stuff, the code worked for me in
> > > Python 2.6.1, through the cat line. Could you please tell u
Ok, I'm sure this is really simple, but I cannot for the life of me
get any print statements from any of my python scripts to actually
print when I call them from the windows command line. What am I doing
wrong?
hello.py:
print "Hello World!"
command line:
E:\Python\dev>python hello.py
E:\Python
prueba...@latinmail.com writes:
[...]
> I myself asked about how to write a library to efficiently do union
> and intersection of sets containing time intervals some time ago on
> this list and got little to no answers. It is a tricky problem. Since
> I was getting paid I got an O(n*n) solution wor
> Most such problems are caused by mixing tabs and spaces in the same file.
> Pick one style and be consistent, and you'll be in good shape.
>
> My approach is to always expand tabs. My tab key simply gets me to a
> convenient column, there never are any tabs in my source files.
>
> (I don't use
>>> IDLE (3.1a1) accepts
>>>
>>> a,*b = re.split(str,pattern)
>>>
>>> and does the right thing ('a' gets the first result and 'b' gets
>>> the rest).
>>>
>>> pydev configured to use the exact same Python 3.1a1 runtime doesn't
>>> like this syntax (in my source, column 23 is the asterisk):
>>>
>>
Thanks Gabriel. Your solution works like a charm. (-:
AK
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 30, 12:01 pm, mark.sea...@gmail.com wrote:
> On Mar 30, 11:53 am, Dave Angel wrote:
>
> > After taking out the class myclass stuff, the code worked for me in
> > Python 2.6.1, through the cat line. Could you please tell us what
> > version of Python you're running this on?
>
> > import sy
On Mon, Mar 30, 2009 at 2:23 PM, Jim Garrison wrote:
> Jim Garrison wrote:
>
>> IDLE (3.1a1) accepts
>>
>>a,*b = re.split(str,pattern)
>>
>> and does the right thing ('a' gets the first result and 'b' gets
>> the rest).
>>
>> pydev configured to use the exact same Python 3.1a1 runtime doesn't
On Mar 30, 11:53 am, Dave Angel wrote:
> After taking out the class myclass stuff, the code worked for me in
> Python 2.6.1, through the cat line. Could you please tell us what
> version of Python you're running this on?
>
> import sys
> print "Python version: ", sys.version
>
> yielded (on my m
Johan Compen wrote:
> If Python doesn't include the _d.lib file, then why does the header
> file reference it? I would prefer manual control over which lib file
> to use. (And I don't want to disable _DEBUG for other reasons).
>
> Could the header file be changed so it alwas uses the release lib?
After taking out the class myclass stuff, the code worked for me in
Python 2.6.1, through the cat line. Could you please tell us what
version of Python you're running this on?
import sys
print "Python version: ", sys.version
yielded (on my machine)
Python version: 2.6.1 (r261:67517, Dec 4
Jim Garrison wrote:
IDLE (3.1a1) accepts
a,*b = re.split(str,pattern)
and does the right thing ('a' gets the first result and 'b' gets
the rest).
pydev configured to use the exact same Python 3.1a1 runtime doesn't
like this syntax (in my source, column 23 is the asterisk):
Encountered "*"
If I cast it long then it prints fine, but I was hoping there would be
a slicker way (to accomplish this in the class itself).
print 'bird val = 0x%016X' % long(bird)
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 30, 12:40 pm, Jim Garrison wrote:
> IDLE (3.1a1) accepts
>
> a,*b = re.split(str,pattern)
>
> and does the right thing ('a' gets the first result and 'b' gets
> the rest).
>
> pydev configured to use the exact same Python 3.1a1 runtime doesn't
> like this syntax (in my source, colum
On Sat, Mar 28, 2009 at 1:17 AM, Mark Hammond wrote:
>> Please note: I want to build my own code in Debug mode for debugging.
>> I don't want to build or use the debug version of Python. I also can't
>
> Python does this on purpose so you don't accidentally mix different versions
> of the C runtim
On Mar 30, 10:53 am, David Bolen wrote:
> mark.sea...@gmail.com writes:
> > class myclass(object):
> > #
> > # def __new__(class_, init_val, size, reg_info):
> > def __init__(self, init_val, size, reg_info):
>
> > # self = object.__new__(class_)
> > self.reg_info = reg_info
On Mar 30, 9:40 am, Scott David Daniels wrote:
> mark.sea...@gmail.com wrote:
> > ...
> > It seems like there's no way to do what I'm trying. I am confined to
> > Python 2.5.3 for business reasons.
>
> > So I want a class ShadowRegister, which just has a value that I can do
> > get/set bit sel an
mark.sea...@gmail.com writes:
> class myclass(object):
> #
> # def __new__(class_, init_val, size, reg_info):
> def __init__(self, init_val, size, reg_info):
>
> # self = object.__new__(class_)
> self.reg_info = reg_info
> print self.reg_info.message
> self.
IDLE (3.1a1) accepts
a,*b = re.split(str,pattern)
and does the right thing ('a' gets the first result and 'b' gets
the rest).
pydev configured to use the exact same Python 3.1a1 runtime doesn't
like this syntax (in my source, column 23 is the asterisk):
Encountered "*" at line 32, colu
prakash jp gmail.com> writes:
> Hi all,
>
> In windows environment, how to send email from one gmail address to another
gmail (or another mail) addrress
>
>
Gmail requires SSL smtp support which is missing in Python stdlib. However, you
can look at this example (http://www.example-code.com/p
ryan wrote:
I am facing problems running python25 on vista . i was able to
successfully install it but when i try to run it then,
its throws errors saying Firewall issues ..
I tried disabling the firewall but no go..
Yes, we believe you. Read "smart questions"
http://www.catb.org/~esr/fa
Rustom Mody wrote:
I don't think this is necessary a python problem but a generic, SUID
scripts considered dangerous, problem.
The essence of your program is that you only want information, that is
great! Since that makes it all a bit simpler.
How about writing a cronjob that outputs the re
mark.sea...@gmail.com wrote:
...
It seems like there's no way to do what I'm trying. I am confined to
Python 2.5.3 for business reasons.
So I want a class ShadowRegister, which just has a value that I can do
get/set bit sel and slice ops. I got that working with __init__. It
was subclass from
On Mar 30, 6:47 pm, bieff...@gmail.com wrote:
> On Mar 30, 1:16 pm, Rustom Mody wrote:
>
>
>
> > Ben Finney wrote
>
> > > The key thing to realise is that, having relinquished privilege, the same
> > > process can't get it back again as easily. So if you need to
> > > do some tasks as a privilege
On Mon, 30 Mar 2009 03:30:04 -0500
Nick Craig-Wood wrote:
> >>> class Node(object):
> ... __slots__ = ["prev", "next", "this"]
> ... def __init__(self, prev, next, this):
> ... self.prev = prev
> ... self.next = next
> ... self.this = this
[...]
> So the Node cla
On Mon, 2009-03-30 at 11:05 -0500, Zach Goscha wrote:
> Hi,
>
> I am trying to call an unbound method (Map.Background) but getting the
> following error:
> TypeError: unbound method background() must be called with Map
> instance as first argument (got nothing instead)
>
> Here is some of the
mark.sea...@gmail.com wrote:
Here again is example:
from ctypes import *
class REG_INFO(Structure):
_fields_ = [
('address', c_ubyte),
('message', c_char * 256),
('size', c_ubyte)
]
class myclass(object):
#
# def __new__(class_, init_val, size, reg_info
Eric Brunel said:
>> The Tk instance is registered in a hidden variable in the
>> Tkinter module. When
>> you don't specify a master, it'll use the latest created Tk
>> instance one by
>> default. BTW, the latest should be the only one: it is
>> quite unsafe to create
>> several Tk insta
Adrian Dziubek wrote:
> Could you explain your high level goal for this? It looks like a very
> wicked way of doing things. Have You tried to read the list methods'
> documentation? Maybe there you find something you need (like
> list.index)?
Hello,
I have a "disambiguation" function that modifi
2009/3/30 Zach Goscha :
> Hi,
>
> I am trying to call an unbound method (Map.Background) but getting the
> following error:
> TypeError: unbound method background() must be called with Map instance as
> first argument (got nothing instead)
>
> Here is some of the code(not completed)
>
> Thanks in
Alia Khouri yahoo.com> writes:
> Given the following class:
>
> class Node(object):
> def __init__(self, name, children=[], parent=None):
> self.name = name
> self.level = ''
> self.children = children
> self.parent = parent
>
> def __repr__(self):
>
On Mar 3, 4:01 am, Graham Dumpleton
wrote:
> On Mar 3, 8:53 am, Rey Bango wrote:
>
> > Hi,
>
> > I'd like to upgrade the installed version of Python that came standard
> > on OS X (Leopard) with either 2.6.1 or 3.0.1. Before I stick my foot
> > in it, I just wanted to get a better understanding o
Hi,
I am trying to call an unbound method (Map.Background) but getting the
following error:
TypeError: unbound method background() must be called with Map instance as
first argument (got nothing instead)
Here is some of the code(not completed)
Thanks in Advance
- Zach
Code:
class Knight(g
Here again is example:
from ctypes import *
class REG_INFO(Structure):
_fields_ = [
('address', c_ubyte),
('message', c_char * 256),
('size', c_ubyte)
]
class myclass(object):
#
# def __new__(class_, init_val, size, reg_info):
def __init__(self, init_
On Mar 30, 11:17 am, Steven D'Aprano wrote:
> On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote:
> > I've written a short post on including support for configuration down at
> > the language level, including a small preliminary half-functional
> > example of what this might look like in Python, ava
On Mon, 30 Mar 2009 07:50:49 -0700, pruebauno wrote:
> I myself asked about how to write a library to efficiently do union and
> intersection of sets containing time intervals some time ago on this
> list and got little to no answers. It is a tricky problem.
With all the confidence of somebody w
I'm trying to compile the wrappers for ANN (Approximate Nearest Neighbor) from
http://scipy.org/scipy/scikits/wiki/AnnWrapper, either the main one (scikits) or
the attachment in the main page.
However, the command "python setup.py build" produces the exception:
"ImportError: No module named nu
On Mar 30, 10:33 am, Mike Driscoll wrote:
> Hi,
>
> This is just a reminder that we have a Pyowa meeting this week. It
> will be held at Durham Center in Ames, IA on the ISU campus from 7-9
> p.m. Directions are on the website (www.pyowa.org). Topics include the
> following:
>
> 1) What PyCon atte
On Mon, 30 Mar 2009 08:14:55 -0700, CinnamonDonkey wrote:
> My understanding was that rmtree removes a whole tree not just the empty
> directories?
So it seems:
>>> os.mkdir('die-die-die')
>>> os.mkdir('die-die-die/stuff')
>>> shutil.rmtree('die-die-die')
>>>
Hi,
This is just a reminder that we have a Pyowa meeting this week. It
will be held at Durham Center in Ames, IA on the ISU campus from 7-9
p.m. Directions are on the website (www.pyowa.org). Topics include the
following:
1) What PyCon attendees thought of PyCon (likes, dislikes, etc)
2) Code sni
Hi,
Here my problem description:
Given the following class:
class Node(object):
def __init__(self, name, children=[], parent=None):
self.name = name
self.level = ''
self.children = children
self.parent = parent
def __repr__(self):
name = self.__cl
On Mar 27, 11:29 am, a...@pythoncraft.com (Aahz) wrote:
> [posted & e-mailed, please respond to newsgroup]
>
> In article ,
>
>
>
> cassiope wrote:
>
> >In attempting to diagnose the cause, I tried directly executing the
> >lines inside the python2.5 interpreter:
>
> > import smtplib
> >
On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote:
> I've written a short post on including support for configuration down at
> the language level, including a small preliminary half-functional
> example of what this might look like in Python, available at
> http://jasonfager.com/?p=440.
>
> The b
Revised:
root
+ Dir1
+ Dir2
+ Dir3
+ NotEmptyDir
File1
File2
Result:
Root
+ NotEmptyDir
File1
File2
---
import os
import shutil
def isDirEmpty( path ):
if not os.path.isdir( path ):
return False
contents = os.listdir( path )
i
My understanding was that rmtree removes a whole tree not just the
empty directories?
eg.
root
- file1
- file2
- dir1
- dir2
- file3
- dir3
I would expect; dir1 and dir3 to be deleted and nothing else touched.
My attempt came up with:
import os
import shutil
def isDirEmpty( path ):
Hi,
I'm work on a testing framework for Python. Until now I have
implemented the main features of PyUnit and JUnit 4.x. I like the
annotation syntax of JUnit 4.x and it's theory concept is great
therefore you can imagine how my framework will be.
I plan a lot of additionally features which are n
CinnamonDonkey wrote:
> Hi All,
>
> I've been scratching my head all afternoon trying to work out the best/
> quickest way is to delete empty directories within a tree (Windows).
>
> I've looked at os.walk() but it seems to traverse the directory tree
> in the wrong order (is it possible to reverse
1 - 100 of 156 matches
Mail list logo