On Aug 7, 2009, at 9:29 AM, pedro wrote:
On my machine (a Mac), os.listdir does include files that begin with
"." Having the while loop timeout after 10 or 20 times through as
was suggested a couple posts back will work fine for my particular
situation.
Thanks
Yes, it does include files
On Oct 27, 2007, at 12:52 PM, Dick Moores wrote:
> At 08:39 AM 10/27/2007, Aditya Lal wrote:
>> Hence if type(n) is already long it does not have to get converted
>> to int to accommodate something small.
>
> And that's not a bug?
There is no need for a type change to represent zero, so, no, that
On Nov 1, 2007, at 3:04 PM, Alan Gauld wrote:
> Where does the if/else syntax come from? It doesn't
> seem to work on my Python 2.4. Is it a new feature in 2.5?
Yes, it's a new feature in 2.5.
- Jeff Younker - [EMAIL PROTECTED]
__
(It will do a lot more, but
it's really
easy to get started to with turbogears.)
- Jeff Younker - [EMAIL PROTECTED]
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Append modifies the array as a side effect. It has no
meaningful return value.
>>> x = [1, 2, 3]
>>> x.append(4)
>>> print x
[1, 2, 3, 4]
- Jeff Younker - [EMAIL PROTECTED] - 510.798.5804 -
On Nov 11, 2007, at 8:21 PM, Ryan Hughes wrote:
Hello,
Why does the fo
it__.py file
in them?
- Jeff Younker - [EMAIL PROTECTED] -
On Nov 25, 2007, at 9:00 PM, [EMAIL PROTECTED] wrote:
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
tarts with FI',
changeCallback= lambda x: self.fpCallback('fp2', x)
)
[snip]
def fpCallback(self, controlID, evt):
print evt.__dict__
print help(evt)
value = evt.GetString()
[snip]
- Jeff Younker - [EMAIL PROTECTED] -
line = cmd.before
print '[main]', line
except pexpect.TIMEOUT:
print "No output received for ten seconds"
except pexpect.EOF:
pass
finally:
cmd.close()
if __name__ == '__main__':
main()
- Jeff Younker - [EMAIL PR
On Dec 13, 2007, at 8:32 PM, chinni wrote:
> Hi which editor for python on Mac os x platform is best with color
> syntax compiler etc...
I'm pretty happy with Eclipse + Pydev.
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillis
The procesar function is complicated. It tries to do several things
that that are better done elsewhere. It needs to be broken up into
several functions and methods. This also clarifies and isolates the
exception handling.
> def procesar(mensaje):
>try :
The enclosing try block isn't need
>
> Maybe it is my poor understanding of exception handling. My intention
> here is to open the first file, if error then report in logging and
> finish normally, else open the 2nd file, if error then report in
> logging
> close the 1st file and finish normally. If no error then process.
>
Right
> Your meta-mission is to propose ideas, state assumptions and ask
> questions.
Is the track infinite in the sense that it resides on an infinite
plane, or is it infinite
in the sense that it is circular, wrapping around the entire planet
and meeting with
itself?
-jeff
_
- Jeff Younker - [EMAIL PROTECTED] -
On Jan 27, 2008, at 3:01 PM, Rob Stevenson wrote:
I'm working at a certain website's puzzles using pythonin order to
learn the language, but am stuck understanding what is going on in
my code (ie why it doesn't do as expected)
the in
Here is a strict translation of your code. The algorithm remains the
same, but
it has been cleaned up a bit. Duplications have been removed, and the
various
logical bits have been broken down into separate functions.
I suspect you don't know about random.randint(low, high). It
generates
> What's the path to ssh under windows vista? Paramiko is a pure
> python implementation of the SSH protocol, so it should run on any
> platform.
Paramiko rocks. I have a deployment system that works on linux, osx,
and windows without a hitch. If you're writing a custom SSH server or
doing
1, 2] # new list
>>> b = list(a) # make a copy of the list in b
>>> a == b # the original and copy are equal
True
>>> a is b # but they are not the same list
False
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
4) The typical knee-jerk reaction to this 'oddity' is "what a pain,
how stupid" etc, but I'm sure there is a good explanation. Can
someone explain why python acts this way? faster processing?
preserve memory? etc?
This comes down (largely) to a philosophical choice. Does
the language
get this finished). As I advance more in Python, a design
> change might happen :)
Telling us your goal might allow us to recommend a better
and faster way of accomplishing it.
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
uage and to use those,
but
developing fluency is much harder, and it takes a much longer time.
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
OMMAND')
cmd.expect('# ') # the prompt
cmd.sendline('A COMMAND')
cmd.expect('# ') # wait for the prompt again
output = cmd.before # the stuff before the prompt
cmd.sendline('exit')
cmd.close()
- Jeff Younker - [EMAIL PROTECTED] -
r or so.) I has a feature set that
no other
python IDE has at this point. (Let me qualify that: I haven't looked
at the Iron
Python tools on windows, and they might be better, but I don't do much
in
the windows world so I haven't looked at it yet.)
- Jeff Younker - [EMAI
On Apr 15, 2008, at 11:33 PM, Alan Gauld wrote:
> Have you considered driving Word instead of OOo?
> That way you leave the documents in their original format
> and make the mods using COM from Python.
I've used this approach before, and I whole heartedly suggest
that you look into it. The Win3
On Apr 21, 2008, at 6:40 AM, Stephen Nelson-Smith wrote:
> On 4/21/08, Andreas Kostyrka <[EMAIL PROTECTED]> wrote:
> I want to stick with standard library.
>
> How do you capture elements?
from xml.etree import ElementTree
document = """
foo and bar
foo
However I suspect any attempt to improve performance
here needs a new algorithm and probably a clever data
structure to minimise brute force tests.
If I knew of one, I would have used it :)
I'd suggest googling for 'trie'. Tries are method of
indexing sets of strings by prefix.
As I recall
completes. Try looking at the SocketServer module. It takes
care of a lot of the details for you.
- Jeff Younker - [EMAIL PROTECTED] -
On Apr 26, 2008, at 5:56 PM, James Duffy wrote:
I have a problem w/ a file transfer receiver. They way it works is
it binds a port for incoming transfer , whe
I followed the advice on this page:
http://mail.python.org/pipermail/python-list/2006-December/417208.html
and the problem is now gone.
There are two pieces of advice on that page. Which did you follow?
- Jeff Younker - [EMAIL PROTECTED
On May 21, 2008, at 6:42 AM, Kinuthia Muchane wrote:
st = "String"
print "%s " %st*3
String String String
Does this help?
Another approach is to use dictionaries for string
replacement.
>>> subst = {'some': 'thing'}
>>> print "%(some)s%(some)s%(some)s" % subst
thingthingthing
-jeff
___
On Jun 9, 2008, at 8:51 AM, W W wrote:
Originally I was planning to use urllib to post/retrieve
the data, but as far as I can tell, the bank uses several variables
and some javascript to authenticate everything, and it seems overly
complicated to try and manually figure it all out.
Raw urllib i
editing via SQLExplorer plugin
- HTML/XML/Javascript development plugins
- Run external tools from within the IDE
- To do lists
- Multi-language development
- etc.
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillist - Tutor@python.org
http://ma
more growing
room, and that this is well worth the initial investment. The
documentation
for SQLAlchemy tends to be better too. (That said I work primarily with
SQLObject, and the addition of a revision system will keep me from
switching our product to SQLAlchemy for a while longer.)
- Jeff Yo
ges.
If you have pages which are no longer referenced from any root
pages then a spider won't find them. These dangling pages
are precisely the sort of thing you're trying to remove. Consider
other options such as looking through the filesy
On Jun 26, 2008, at 2:59 PM, Shrutarshi Basu wrote:
self.modules.append(DisplayModule(self.img_map,
(self.xOrigin, self.yOrigin), self.rows, self.columns, gram,
self.type))
...
As you can see, not only do I delete gram, I also blank out everything
that should be cleared. I have to ma
Hmm. I don't understand the LSP to make any requirements on the
constructors. It says that instances of a subclass should be
substitutable for instances of the base class, it doesn't say anthing
how the instances are created.
Constructors as a separate language entity is an idea born of C++,
Jav
On Jul 14, 2008, at 12:29 AM, nibudh wrote:
Hi List,
I'm looking for some support libraries that will help me to parse
sendmail logs.
I'm confused about whether i need a "parser" per se, and if i do
which parser to use. I found this website http://nedbatchelder.com/text/python-parsers.htm
If you run a pipeline chain from within subprocess every part of the
chain will be a separate process, thats a lot of overhead. Thats why
admins tend to prefer writing utilities in Perl rather than bash
these days.
...
Nobody I know uses perl for systems administration because it doesn't
have
or more details check out the project's page at:
http://wwwsearch.sourceforge.net/mechanize/
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Aug 18, 2008, at 9:13 AM, Adrian Greyling wrote:
def MainToSecond(self, event): # wxGlade:
MyMainFrame.
MySecondFrame(self).Show()
MySecondFrame.text_ctrl_2.SetValue("This text was generated
from the 'MainFrame' window")
The expression MySecondFrame(self) creates a n
I'm assuming you do that so that you don't confuse what a Python
built-in method (or function) is,
compared to methods (or functions) that you've authored.
It's done more to distinguish classes from methods and attributes. I
can't claim
any credit though. It's part of the python coding con
ormat = "this is a %s"
subst = 'test'
print format % subst
FYI: You shouldn't reply to a message when you have a new
question. That attaches it to the previous topic.
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor mail
ten the whole program. Instead of passing around
arrays or urls and results you can pass around the queues directly.
In addition you can run the report function as another thread. It prints
the jobs from the result pool as they're completed. These will make
the code more elegant, but the
On Sep 12, 2008, at 3:30 PM, Patrick wrote:
I like SQLite, it's really easy to work with. I would like to model my
database in it natively but I am having quite a bit of trouble mapping
the variables in the SQLIte database via PySQLite. It appears that
this
sort of thing is SQLalchemy's strong
rtual
machine on whatever flavor of unix you're using.
- Jeff Younker - [EMAIL PROTECTED] -
--
Spencer Parker
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
ed quite a bit for
performing
functional testing from Python.
- Jeff Younker - [EMAIL PROTECTED] -
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
43 matches
Mail list logo