Paul Rubin wrote:
>> Send e-mail to [EMAIL PROTECTED] -- actually, you can have commit
>> privs if you want.
>
> I think I'm going to enter an SF bug on the issue if there isn't
> already one. It's not obvious to me whether a reasonable fix is
> possible, but at least it should be tracked. The c
On Fri, May 20, 2005 at 08:42:54AM +0200, F. GEIGER wrote:
> In my wxPython-app a part of it gathers data, when a button is pressed, and
> stores it into a db.
>
> The GUI part should display the stuff being stored in the db.
>
> When both parts work on the same connection, I get "SQL statements
*** WARNING **
This message has been scanned by MDaemon AntiVirus and was found to
contain infected attachment(s). Please review the list below.
AttachmentVirus name Action taken
--
That would be nice if something could be added to the distribution.
In general, what needs to be done is as follows:
#1: Connect to proxy host:port
#2: Send "CONNECT" request with host:443 of secure url you want to
"tunnel" to. Additional headers can be added depending on authorization
needed f
On 19 May 2005 17:27:05 -0700, rh0dium <[EMAIL PROTECTED]> wrote:
> HI all,
>
> I am looking to parse a unix tool called lshw (
> http://ezix.sourceforge.net/software/lshw.html ). Now this provides a
> nice XML output which looks similar to the bottom of this message..
That doesn't appear to be
> That doesn't appear to be well-formed XML, which isn't a good start...
Indeed. rh0dium, you can't have two s elements at root level.
If you use an enclosing element around the two s, your XML
becomes well formed. Like this:
...
...
Regards, Adriano.
--
http://mail.
Leonard J. Reder wrote:
> I am using PIL to annotate some images with lines. I could not
> find anyway to make the line that is drawn from the ImageDraw object
> thicker. Does anyone have a suggestion or solution for solving this
> without to much hacking?
if you have 1.1.5, you can use the wid
Hello,
I think the answer is basically correct but shift-jis is not a standard
part of
Python 2.3. You will either need to use Python 2.4 where the cjkcodes
are integrated or install them under Python 2.3. The link is
http://cjkpython.i18n.org/
You then also need:
import cjkcodecs.aliases
Richard
PyTJ wrote:
> I need to convert a Japanese Shift-JIS CSV file to Unicode UTF-8.
>
> My machine is a Windows 98 english computer with Python 2.3.4
>
> Any hints?.
>
First, you need to install codecs to support japanese encodings.
Python 2.3.* does not support SJIS by default.
I'll give you two
Hi,
I try to write unicode strings to a MySQL database via MySQLdb.
According to the documentation I should pass 'utf-8' as keyword
parameter to the connect method. But then I get the following error:
Traceback (most recent call last):
File "C:\develop\SyynX\unicode_test.py", line 7, in ?
Achim Domma (Procoders) wrote:
> Hi,
>
> I try to write unicode strings to a MySQL database via MySQLdb.
> According to the documentation I should pass 'utf-8' as keyword
> parameter to the connect method. But then I get the following error:
>
(...)
>
>
> I'm using version 1.2 of MySQLdb. Any
J. W. McCall wrote:
> I'm not sure if this is off-topic, since it doesn't deal with Python
> itself, but here goes:
>
> I'm messing around with writing a simple "game" where the player (a
> crudely drawn smiley face) moves by rotating and moving back or forward
> (think Resident Evil, but from
Hi all,
I am new to Tk, or Python GUI programming and I seem to be stuck. I
have looked about for help with Tk GUIs, but everything seems so terse
or incomplete?? I have been mostly using the "Introduction to Tkinter"
by Fredrik Lundh
(http://www.pythonware.com/library/tkinter/introduction/index.
flupke wrote:
I finally succeeded in making a proper mci.dll that works. I will
document what i did in the coming days and place it here. I developed
the dll with DevC++.
Anyway, it all works :)
Benedict
--
http://mail.python.org/mailman/listinfo/python-list
Dave Benjamin wrote:
> [EMAIL PROTECTED] wrote:
> > Now suppose I set "expression2 = Sum([a,-a])" and Sum.simplify()
> > recognises that the two terms cancel and the Sum has value 0.
> >
> > Can I make "expression2.simplify()" transform expression2 from an
> > instance of Sum to an instance of Numb
Hi,
''%([]) doesn't raise exception
but
''%('') does
Can anyone explain me why??
rgds
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
I have read about parrot. How is that progressing?
Stelios Xanthakis wrote:
> Hi.
>
> pyvm is a program which can run python 2.4 bytecode (the .pyc files).
> A demo pre-release is available at:
> http://students.ceid.upatras.gr/~sxanth/pyvm/
>
>
> Facts about pyvm:
> - It's FAST. According
On 20 May 2005 04:09:26 GMT, [EMAIL PROTECTED] (Patrick TJ McPhee)
wrote:
>In article <[EMAIL PROTECTED]>,
>John Machin <[EMAIL PROTECTED]> wrote:
>
>% None of the other approaches make the mistake of preserving the first
>% letter -- this alone is almost enough reason for jettisoning soundex.
>
michelle wrote:
> What I am trying to do is add cascading menus to a Tk menu widget like:
>
> File
> New...
> ---> Router
> ---> Firewall
> Open
>
> Exit
Just add the submenu with the "Router" and "Firewall" entries to the
filemenu in the same way you added the submenu with the "New", "Open
[EMAIL PROTECTED] wrote:
> ''%([]) doesn't raise exception
> but
> ''%('') does
>
> Can anyone explain me why??
That is a side-effect of duck-typing. The duck-type of an empty list is
indistinguishable from that of an empty dictionary. Not testing the exact
type here achieves consistency with th
alex23 wrote:
> You know, there _are_ valid reasons for libraries et.al. 'locking
down'
> public terminals other than fascism...
Maybe, but in this case I can run only IE, word, excel and powerpoint.
Do you think there is a rational reason for that? Like Tim Peters
showing up, explaining that it
André Roberge wrote:
> Version 0.8.6a is now available.
You might see a bit more interest if you briefly explain what RUR-PLE
is, and where to find it.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
michelle wrote:
> Hi all,
>
> I am new to Tk, or Python GUI programming and I seem to be stuck. I
> have looked about for help with Tk GUIs, but everything seems so terse
> or incomplete?? I have been mostly using the "Introduction to Tkinter"
> by Fredrik Lundh
> (http://www.pythonware.com/libra
Investigating a query about the python path I see that my win32 installation
has
c:/windows/system32/python24.zip (which is non existent) second on sys.path
before the actual python24/lib etc etc.
Firstly should python start up with non-existent entries on the path?
Secondly is this entry be th
Er, yes! It's REALLY ugly! I was joking (though it works)! I retract it
from the code universe. (But patent pending nr. 4040404.)
Here's how I really would convert your (row_from_zero, col_from_zero)
tuple to spreadsheet "A1" coords, in very simple and easy to read code.
##def tuple2coord(tupl):
Sorry, scratch that "P.S."! The act of hitting Send seems to be a great
way of realising one's mistakes.
Of course you need colnr - m for those times when m is set to 26.
Remembered that when I wrote it, forgot it 2 paragraphs later!
--
http://mail.python.org/mailman/listinfo/python-list
>>> p.sub('','a\nbc')
'abc'
>>> p.sub('','%s') % "a\nbc"
'a\nbc'
is it anyone got some idea why it happen?
--
http://mail.python.org/mailman/listinfo/python-list
cheng wrote:
>>>p.sub('','%s') % "a\nbc"
>>>
>>>
>'a\nbc'
>
>is it anyone got some idea why it happen?
>
Make that
p.sub('','%s' % "a\nbc")
Regards
/Mikael Olofsson
Universitetslektor (Senior Lecturer [BrE], Associate Professor [AmE])
Linköpings universitet
--
"cheng" <[EMAIL PROTECTED]> wrote:
> >>> p.sub('','a\nbc')
> 'abc'
> >>> p.sub('','%s') % "a\nbc"
> 'a\nbc'
>
> is it anyone got some idea why it happen?
>>> p.sub('', 'a\nbc')
Traceback (most recent call last):
File "", line 1, in ?
NameError: name 'p' is not defined
>>> import re
>>> p = re.
thx for help :)
--
http://mail.python.org/mailman/listinfo/python-list
I'm working with a large code base that I'm slowly trying to fix
"unpythonic" features of.
One feature I'm trying to fix is the use of:
# how things are now
sys.path.append('/general/path/aaa/bbb') # lots of lines like this to
specific dirs
import foo
Insead I'd rather have PYTHONPATH already in
Hi all,
In Python, some functions can be assigned to variables like this:
length=len
Why is it that print cannot be assigned to a variable like this? (A
syntax error is declared.)
Thanks,
Vaibhav
--
http://mail.python.org/mailman/listinfo/python-list
print is a statement, not a function.
Read Guido's words on that:
http://www.python.org/search/hypermail/python-1992/0112.html
Regards.
Adriano.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am trying to fill a packet with source and destination mac address.
The first 6 bytes hold the destination mac address and the next six
bytes hold the source mac address. In the code i am filling in the
first six bytes to broadcast address for the destination.
# fill in the destination ad
Jason Drew wrote:
> ##def tuple2coord(tupl):
[snip]
> ##rowfromzero, colfromzero = tupl
Just a side note here that if you want a better function signature, you
might consider writing this as:
tuple2coord((rowfromzero, colfromzero)):
...
Note that the docstrings are nicer this way:
py>
Michael Hoffman wrote:
> André Roberge wrote:
>
>>Version 0.8.6a is now available.
>
>
> You might see a bit more interest if you briefly explain what RUR-PLE
> is, and where to find it.
Oops.. sorry about that.
RUR - a Python Learning Environment.
Its purpose is to provide an environment wher
Martin Franklin wrote:
> michelle wrote:
>
>> Hi all,
>>
>> I am new to Tk, or Python GUI programming and I seem to be stuck. I
>> have looked about for help with Tk GUIs, but everything seems so terse
>> or incomplete?? I have been mostly using the "Introduction to Tkinter"
>> by Fredrik Lundh
>
Paul Rubin wrote:
> Jp Calderone <[EMAIL PROTECTED]> writes:
>> Distributing load across multiple machines scales better than
>> distributing it over multiple CPUs in a single machine. If you have
>> serious scalability requirements, SMP is a minor step in the wrong
>> direction (unless you're
Thanks for the response again. The solution is pretty close but not yet
complete
This is what I observed.
a) I tried to use the delay mechanism as suggested below
ie.
ie.Navigate('www.google.com')
while ie.ReadyState !- 4
time.sleep(0.5)
d=win32com.client.DispatchWithEvents(ie.Document, Doc
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Leonard J. Reder wrote:
>
>> I am using PIL to annotate some images with lines. I could not
>> find anyway to make the line that is drawn from the ImageDraw
>> object thicker. Does anyone have a suggestion or solution for
>
Robin Becker wrote:
> Firstly should python start up with non-existent entries on the path?
Yes, this is by design.
> Secondly is this entry be the default for some other kind of python
> installation?
Yes. People can package everything they want in python24.zip (including
site.py). This can onl
[EMAIL PROTECTED] wrote:
> So I thought I'd just add the necessary __init__.py files and then
> things would just work. Unfortunately trying this exposed a large
> number of circular imports which now cause the files to fail to load.
You didn't describe you you created the necessary __init__.py f
On 2005-05-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> How do i fill in a command line passed mac address for source mac
> address. The first six bytes of data[i] should contain destination mac
> and the next six bytes of data[i] should contain the source mac
> address.
Use the struct modu
Thank You Adriano. You were a huge help.
Vaibhav
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I need to embed an user-supplied python function body in a C program.
That is, the user has no control over the function definition:
def afunction():
Now, the problem is that I can't just append the supplied string,
because I need to properly indent it which isn't trivial - just adding
a
Hey, that's good. Thanks Steve. Hadn't seen it before. One to use.
Funny that Pythonwin's argument-prompter (or whatever that feature is
called) doesn't seem to like it.
E.g. if I have
def f(tupl):
print tupl
Then at the Pythonwin prompt when I type
f(
I correctly get "(tupl)" in the argumen
All of the __init__.py files are empty and I don't know of any
overlapping of names. Like I said this is code that works fine, I'm
just trying to clean up some things as I go. Here are my working
examples:
x1.py
==
# how things work in our code now:
# called with home/dlee/test/module python
Is there a limitation with python's zipfile utility that limits the
size of a file that can be extracted? I'm currently trying to extract
125MB zip files with files that are uncompressed to > 1GB and am
receiving memory errors. Indeed my ram gets maxed during extraction and
then the script quits. I
[EMAIL PROTECTED] wrote:
> Dave Benjamin wrote:
>
>>I think it's much better for simplify() to return a new object
>>and leave the original object unmodified. You can still write:
>>expression2 = expression2.simplify()
>
> A belated thank-you message for your reply to my posting. I took your
> ad
On 20 May 2005 10:07:55 -0700, Jason Drew <[EMAIL PROTECTED]> wrote:
> Hey, that's good. Thanks Steve. Hadn't seen it before. One to use.
>
> Funny that Pythonwin's argument-prompter (or whatever that feature is
> called) doesn't seem to like it.
>
> E.g. if I have
> def f(tupl):
> print tupl
Sure it does not. As well as C, unless you instaead of malloc use low
level os-dependant APIs.
--
http://mail.python.org/mailman/listinfo/python-list
"""
> Most examples in the book do not include such a declaration and yet
are
> properly rendered by Internet Explorer.
> Is it mandatory and why is it that Expat crashes on it?
It's not mandatory but it's probably good practice to make the document
self-contained. The xlink prefix is defined in
Dennis Lee Bieber wrote:
> On Wed, 18 May 2005 20:03:53 -0500, Ed Morton <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>
>>Fantastic test data set. I know how to pronounce McPherson but I'd never
>>have guessed that Mousaferiadis sounds like it. I suppose non-Celts
>>p
[EMAIL PROTECTED] wrote:
> All of the __init__.py files are empty and I don't know of any
> overlapping of names. Like I said this is code that works fine, I'm
> just trying to clean up some things as I go.
I see. The problem is that a module in a package is entered into
the parent package only
Chris Croughton wrote:
> On Thu, 19 May 2005 06:38:59 +1000, John Machin
><[EMAIL PROTECTED]> wrote:
>
>
>>On Wed, 18 May 2005 15:06:53 -0500, Ed Morton <[EMAIL PROTECTED]>
>>wrote:
>>
>>
>>>William Park wrote:
>>>
>>>
How do you compare 2 strings, and determine how much they are "close"
Hello,
buffer_info is giving the following error:
AttributeError: 'str' object has not attribute 'buffer_info'
Here's the code snippet...
dest = ''
src = '0123'
data = array('B', '\0' * 256)
data1 = ''.join([dest, src]
print data1
>>0123
print data.buff
[EMAIL PROTECTED] wrote:
> I'm working with a large code base that I'm slowly trying to fix
> "unpythonic" features of.
[...]
> Insead I'd rather have PYTHONPATH already include '/general/path/'
> and then just use:
One option you might not have considered, which I find more "pythonic"
than envir
I know how to setup an empty list and loop thru something... appending
to the list on each loop... how does this work with dicts?
I'm looping thru a list of files and I want to put the file's name and
its sha hash into a dict on each loop.
Many thanks,
rbt
--
http://mail.python.org/mailman/li
Hello,
I have python installed under a different directory
(/images/QA/QATools12/lib/python2.1), and I'm now trying to install PyXml. It
gives me the following error:
-> python setup.py buildTraceback (most recent call last):
File "setup.py", line 127, in ? config_h_vars =
parse_conf
[EMAIL PROTECTED] wrote:
> data = array('B', '\0' * 256)
> data1 = ''.join([dest, src]
>
> print data.buffer_info()[0]... works
> print data1.buffer_info()[0]error
>
> This output is a string and hence i believe i get the above error. Any
> ideas?
Yes, you are entirely correct. (Integers do
rbt wrote:
> I know how to setup an empty list and loop thru something... appending
> to the list on each loop... how does this work with dicts?
>
> I'm looping thru a list of files and I want to put the file's name and
> its sha hash into a dict on each loop.
Whereas with a list you would call
Dave Brueck <[EMAIL PROTECTED]> writes:
> One thing from your experience that did resonate with me is that,
> except for ftplib and occasionally urllib (for basic, one-shot GETs),
> we don't use any of the standard library's "protocol" modules - partly
> because we had to implement our own HTTP lib
rbt wrote:
> I know how to setup an empty list and loop thru something... appending
> to the list on each loop... how does this work with dicts?
>
> I'm looping thru a list of files and I want to put the file's name and
> its sha hash into a dict on each loop.
Like so:
d = {}
for filename in f
Steve> (is this the same as 'Conchobar'?)
No, that's a trendy pub in Key West...
Skip
--
http://mail.python.org/mailman/listinfo/python-list
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> this has been reported before, and it won't get fixed (unless you're
> volunteering to add Python-compatible garbage collection to Tk, that is).
Yeah, I think I understand what the issue is. I can think of some
kludgy possible fixes but I assume they'
i am filling in a packet with source and destination address and using
the buffer_info call to pass on the address to an underlying low level
call.
The src and dest are strings, but buffer_info expects an array. How do
i deal with this?
--
http://mail.python.org/mailman/listinfo/python-list
On Friday 20 May 2005 01:04 pm, rbt wrote:
> I know how to setup an empty list and loop thru something... appending
> to the list on each loop... how does this work with dicts?
>
> I'm looping thru a list of files and I want to put the file's name and
> its sha hash into a dict on each loop.
>
> Ma
Hi,
I wrote a trace function using the profiling and tracing hooks
provided by the python interpreter.
The Python interpreter reports the calls occuring in the source
program to my trace function.
How can I know whether the call happened is a function call or method
call and if it is a method ca
On 2005-05-20, J. W. McCall <[EMAIL PROTECTED]> wrote:
> I'm not sure if this is off-topic, since it doesn't deal with Python
> itself, but here goes:
>
> I'm messing around with writing a simple "game" where the player (a
> crudely drawn smiley face) moves by rotating and moving back or forward
On 20 May 2005 13:18:33 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>i am filling in a packet with source and destination address and using
>the buffer_info call to pass on the address to an underlying low level
>call.
>
>The src and dest are strings, but buffer_info expects an array. How
rbt <[EMAIL PROTECTED]> wrote:
>I know how to setup an empty list and loop thru something... appending
>to the list on each loop... how does this work with dicts?
>
>I'm looping thru a list of files and I want to put the file's name and
>its sha hash into a dict on each loop.
You just assign va
Paul Rubin wrote:
> Dave Brueck <[EMAIL PROTECTED]> writes:
>
>>One thing from your experience that did resonate with me is that,
>>except for ftplib and occasionally urllib (for basic, one-shot GETs),
>>we don't use any of the standard library's "protocol" modules - partly
>>because we had to imp
gsteff wrote:
>Hey, I'm working on a Python program that will launch some other
>non-Python process using os.spawn (in the os.P_NOWAIT mode) and then
>basically wait for it to finish (while doing some other stuff in the
>interim). Normally, the new process will signal that it's done by
>writing t
C programs also can be disassembled. Serious people do not consider
braking the machine code harder byte-code.
--
http://mail.python.org/mailman/listinfo/python-list
Welcome to PyPy 0.6
*The PyPy Development Team is happy to announce the first
public release of PyPy after two years of spare-time and
half a year of EU funded development. The 0.6 release
is eminently a preview release.*
What it is and where to start
---
import sys
try:
arg1 = sys.argv[1]
except IndexError:
print "This script takes an argument, you boob!"
sys.exit(1)
OR, way better: See the optparse module.
On Friday 20 May 2005 03:26 pm, Jeff Elkins wrote:
> I'm sure this is obvious, but how the heck do pass an argument(s) to a
> python
holger krekel wrote:
> Welcome to PyPy 0.6
>
>
> *The PyPy Development Team is happy to announce the first
> public release of PyPy after two years of spare-time and
> half a year of EU funded development. The 0.6 release
> is eminently a preview release.*
Congratulation to
On 20 May 2005 15:35:10 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> Is there a better way to code nested for loops as far as performance is
> concerned.
>
> what better way can we write to improve the speed.
> for example:
> N=1
> for i in range(N):
>for j in range(N):
>d
On Friday 20 May 2005 06:46 pm, James Stroud wrote:
> import sys
>
> try:
> arg1 = sys.argv[1]
> except IndexError:
> print "This script takes an argument, you boob!"
> sys.exit(1)
>
> OR, way better: See the optparse module.
>
> On Friday 20 May 2005 03:26 pm, Jeff Elkins wrote:
> > I'm sure
Since the .encoding attribute of file objects are read-only, what is the
proper way to process large utf-8 text files?
I need "bulk" processing (i.e. in blocks - the file is ~ 1GB), but
reading it in fixed blocks is bound to result in partially-read utf-8
characters at block boundaries.
--
ht
Ivan Voras wrote:
> Since the .encoding attribute of file objects are read-only, what is the
> proper way to process large utf-8 text files?
You should use codecs.open, or codecs.getreader to get a StreamReader
for UTF-8.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
An even better way would be to use the optparse module.-- Daniel Bickettdbickett at gmail.comhttp://heureusement.org/
--
http://mail.python.org/mailman/listinfo/python-list
I have a seemingly tough assignment for my Senior Project. I need to
develop an Intrusion Detection System.
My approach is to parse the bash_history file of each user into a mysql
database, assign a threshold for commands or sequences of commands and
then alert the admin of nethin fishy is found.
You can use xrange(N) that way Python doesn't have
to build the 1 item lists 2 times. Other than
that one would need to know why you would call do_job1
and do_job2 1 times each inside a 1 iteration
loop. Most VERY large performance gains are due to
better algorithms not code optim
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for the response again. The solution is pretty close but not yet
> complete
> This is what I observed.
> a) I tried to use the delay mechanism as suggested below
> ie.
> ie.Navigate('www.google.com')
> while ie.ReadyState !- 4
>
This is a minor bugfix release.
Wiki, bugtracker, downloads at http://pysqlite.org/
If you missed 2.0.1, it fixed a bug that could happen if user-defined
functions/aggregates were getting out of scope. It's a fatal bug that
will crash your application if you encounter it.
- Code changes to allow
Ok, I'm not sure if this helps any, but in debugging it a bit I see the
script stalls on:
newFile.write (zf.read (zfilename))
The memory error generated references line 357 of the zipfile.py
program at the point of decompression:
elif zinfo.compress_type == ZIP_DEFLATED:
if not zlib:
r
Hi,
I'm trying to create a program similar to that of Google's desktop that
will crawl through the hard drive and index files. I have written the
program and as of now I just put the thread to sleep for 1 second after
indexing a couple of files.
I'm wondering if anyone knows of a way that I coul
--- [EMAIL PROTECTED]:
> Send Python-list mailing list submissions to
> python-list@python.org
>
> To subscribe or unsubscribe via the World Wide Web,
> visit
> http://mail.python.org/mailman/listinfo/python-list
> or, via email, send a message with subject or body
> 'help' to
>
James Stroud wrote:
> import sys
>
> try:
> arg1 = sys.argv[1]
> except IndexError:
> print "This script takes an argument, you boob!"
> sys.exit(1)
Also possible, to guarantee that exactly one argument was given:
try:
arg1, = sys.argv
except ValueError:
print "This script takes an a
Dave Brueck <[EMAIL PROTECTED]> writes:
> > What do you use for HTTPS?
>
> m2crypto (plus some patches to make asynchronous SSL do what we needed).
That seems to be a nice piece of code, but it's still at version 0.13;
if something goes wrong, are you sure you want to explain that you
were using
I assume that there's a better way than this to count the files in a
directory recursively. Is there???
def count_em(valid_path):
x = 0
for root, dirs, files in os.walk(valid_path):
for f in files:
x = x+1
print "There are", x, "files in this directory."
Peter Hansen wrote:
> rbt wrote:
>
>> I know how to setup an empty list and loop thru something... appending
>> to the list on each loop... how does this work with dicts?
>>
>> I'm looping thru a list of files and I want to put the file's name and
>> its sha hash into a dict on each loop.
>
>
If you have a custom COM dll, you should just register it as normal.
I'm not sure why you would want to register it as a python COM
server. Unless you've duplicated the whole framework that allows
com servers to be written in python ?
Roger
"ÒÊÃÉɽÈË" <[EMAIL PROTECTED]> wrote in mess
On Friday 20 May 2005 07:12 pm, rbt wrote:
> I assume that there's a better way than this to count the files in a
> directory recursively. Is there???
>
> def count_em(valid_path):
> x = 0
> for root, dirs, files in os.walk(valid_path):
> for f in files:
> x = x+1
>
Come to think of it
file_count = len(os.walk(valid_path)[2])
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have a seemingly tough assignment for my Senior Project. I need to
> develop an Intrusion Detection System.
>
> My approach is to parse the bash_history file of each user into a mysql
> database, assign a threshold for commands or sequences of commands and
> then alert
[EMAIL PROTECTED] wrote:
> Kay Schluehr wrote:
>
>>holger krekel wrote:
>>
>>>Welcome to PyPy 0.6
>>>
>>>
>>>*The PyPy Development Team is happy to announce the first
>>>public release of PyPy after two years of spare-time and
>>>half a year of EU funded development. The 0.6
Sorry, I've never used os.walk and didn't realize that it is a generator.
This will work for your purposes (and seems pretty fast compared to the
alternative):
file_count = len(os.walk(valid_path).next()[2])
The alternative is:
import os
import os.path
file_count = len([f for f in os.listdi
Christian Tismer <[EMAIL PROTECTED]> writes:
> PyPy is just a completely new approach to interpreted languages,
> almost based upon known compiler technology, but applying this in a
> consequent manner, that has no comparable prior example.
Is there a web page describing what's new? Compile-and-g
1 - 100 of 109 matches
Mail list logo