On Apr 11, 6:55 am, "John Machin" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 8:03 pm, "7stud" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > Thanks for the response.
>
> > On Apr 11, 12:49 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
>
> > > __file__ corresponds to the filename used to locat
On Apr 12, 6:24 am, "Sean Davis" <[EMAIL PROTECTED]> wrote:
> In the past, I have put together web applications that process tasks
> serially, either with short algorithms to manipulate user-submitted
> data or to return database queries. However, now I am faced with the
> task of having a long-ru
On Apr 11, 11:50 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 11 Apr 2007 23:14:01 -0300, Qilong Ren <[EMAIL PROTECTED]>
> escribió:
>
> > Thanks for reply. That actually is not what I want. Strings I am dealing
> > with may look like this:
> > s = 'a = 4.5 b = 'h' 'd' c =
On Apr 11, 9:50 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 11 Apr 2007 23:14:01 -0300, Qilong Ren <[EMAIL PROTECTED]>
> escribió:
>
> > Thanks for reply. That actually is not what I want. Strings I am dealing
> > with may look like this:
> > s = 'a = 4.5 b = 'h' 'd' c = 4.5
On Apr 11, 10:50 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 11 Apr 2007 23:14:01 -0300, Qilong Ren <[EMAIL PROTECTED]>
> escribió:
>
> > Thanks for reply. That actually is not what I want. Strings I am dealing
> > with may look like this:
> > s = 'a = 4.5 b = 'h' 'd' c =
Hi,
I don't quite understand the regular expression:
re.compile("[a-z]+.*?(?=[a-z]|$)" )
and I tried. In some cases it works. But if the string looks like:
s = 'a = 3.4 b = 4.5 5.6 c = "h","d"'
it failed.
What I came up with is :
names = re.compile(r'(\w+)\s*=').findall(s)
the corr
En Thu, 12 Apr 2007 01:23:08 -0300, Steven D'Aprano
<[EMAIL PROTECTED]> escribió:
> On Thu, 12 Apr 2007 00:32:32 -0300, Gabriel Genellina wrote:
>
>> First I want to say that __getitem__ should raise IndexError, not
>> KeyError, to indicate "not found"
>
> How do you know the Original Poster's c
En Wed, 11 Apr 2007 23:14:01 -0300, Qilong Ren <[EMAIL PROTECTED]>
escribió:
> Thanks for reply. That actually is not what I want. Strings I am dealing
> with may look like this:
> s = 'a = 4.5 b = 'h' 'd' c = 4.5 3.5'
> What I want is
> a = 4.5
> b = 'h' 'd'
> c = 4.5 3.5
BTW, there's an update on the Pythonware.com/daily list again today,
April 11th. Yay!
S
--
http://mail.python.org/mailman/listinfo/python-list
>
> I assume the pythonware folk are busy. I notice that Fredrik Lundh
> hasn't blogged for some time either.
yeah, but Fredrik isn't the maintainer of that list, it's Hamish
Lawson.
Anyone needing a daily Python fix can get similar info from a couple
of other sources:
Cheeseshop: http://cheesesh
Steven D'Aprano wrote:
> On Wed, 11 Apr 2007 16:37:35 -0700, rconradharris wrote:
> ...
> Here are the results under Python 2.5:
>
tester(10)
> Checking index 0...
> Checking index 0...
> Checking index 0...
> Checking index 0...
> Checking index 0...
> [False, 'KeyError', False, 'KeyError',
On Thu, 12 Apr 2007 00:32:32 -0300, Gabriel Genellina wrote:
> First I want to say that __getitem__ should raise IndexError, not
> KeyError, to indicate "not found"
How do you know the Original Poster's class was meant to be a sequence
rather than a mapping?
--
Steven.
--
http://mail.python
Carl Banks wrote:
> On Apr 11, 3:10 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> > On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > As said before I'm new to programming, and I need in depth explaination to
> > > understand everything the way I want to know it, call it a person
En Wed, 11 Apr 2007 11:43:19 -0300, Robert Rawlins - Think Blue
<[EMAIL PROTECTED]> escribió:
> I'm trying to write an application that will log to an XML file, that'll
> be
> later parsed by another application.
> Can anyone offer any advice on how best to get started with this kind of
> thi
En Thu, 12 Apr 2007 00:23:36 -0300, i3dmaster <[EMAIL PROTECTED]>
escribió:
> Ok no problem. Back to my original question, should this be considered
> a bug (didn't see a bug reported though) ? Do you know if the
> developer is considering fixing it in the future?
I have no idea! The bug was re
On Wed, 11 Apr 2007 16:37:35 -0700, rconradharris wrote:
> A co-worker of mine came across some interesting behavior in the
> Python interpreter today and I'm hoping someone more knowledgeable in
> Python internals can explain this to me.
>
> First, we create an instance of an Old-Style class wit
En Wed, 11 Apr 2007 20:37:35 -0300, <[EMAIL PROTECTED]> escribió:
> First, we create an instance of an Old-Style class without defining a
> __contains__ but instead define a __getitem__ method in which we raise
> KeyError. Next we repeatedly use the 'in' operator to test to see
> whether something
Hello guys,
Newbie here.
I wish to study an example where python is being embedded in C#. I have
gone through Python for .NET intro website, but I think a simple example
can help me visualize stuff better.
All help is deeply appreciated.
Thanks
Vipin
image001.gif
Descrip
On Apr 11, 7:41 pm, liupeng <[EMAIL PROTECTED]> wrote:
> pattern = re.compile(r'\w+\s*=\s*[0-9]*.[0-9]*\s*')
> lists = pattern.findall(s)
> print lists
> ['a=4 ', 'b=3.4 ', 'c=4.5']
>
> On Wed, Apr 11, 2007 at 06:10:07PM -0700, Qilong Ren wrote:
> > Hi, everyone,
>
> > I am extracting some informat
Drew wrote:
> I recently saw this website: http://www.norvig.com/spell-correct.html
>
> All the code makes sense to me save one line:
>
> def known_edits2(word):
> return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in
> NWORDS)
This is the same as:
result = set()
for
On Apr 11, 12:01 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 11 Apr 2007 14:07:15 -0300, i3dmaster <[EMAIL PROTECTED]>
> escribió:
>
> > Hmm... well I don't know if I made my question clear then or you might
> > have misread it?... Anyway, the namespace handling wasn't the issue
>
On Apr 12, 4:15 am, Jon Crump <[EMAIL PROTECTED]> wrote:
> Is it possible to feed findAll() a list of tags WITH attributes?
>>> BeautifulSoup.__version__
'3.0.3'
>>> s = '''\nboo\nhello\n>> a="bar">boo\nhi\n'''
>>> soup = BeautifulSoup.BeautifulSoup(s)
>>> def func(tag):
... if tag.name not i
En Wed, 11 Apr 2007 19:26:27 -0300, Erik Johnson <[EMAIL PROTECTED]>
escribió:
> The documentation for these two modules says that they were disabled
> in
> Python 2.3 due to security holes not easily fixable. I have not worked
> with
> them, but I can still import them under Python 2.4
I recently saw this website: http://www.norvig.com/spell-correct.html
All the code makes sense to me save one line:
def known_edits2(word):
return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in
NWORDS)
I understand (from seeing a ruby version of the code) that the goal
here is t
Hi,
Thanks for reply. That actually is not what I want. Strings I am dealing with
may look like this:
s = 'a = 4.5 b = 'h' 'd' c = 4.5 3.5'
What I want is
a = 4.5
b = 'h' 'd'
c = 4.5 3.5
- Original Message
From: liupeng <[EMAIL PROTECTED]>
To: python-list@python.or
On Apr 11, 7:28 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 7:01 pm, "7stud" <[EMAIL PROTECTED]> wrote:
>
> > On Apr 11, 2:57 pm, Bruno Desthuilliers
>
> > <[EMAIL PROTECTED]> wrote:
> > > IamIan a écrit :
>
> > > yearTotals = dict([(year, dict.fromkeys(months, 0)) for year in years])
>
> >
pattern = re.compile(r'\w+\s*=\s*[0-9]*.[0-9]*\s*')
lists = pattern.findall(s)
print lists
['a=4 ', 'b=3.4 ', 'c=4.5']
On Wed, Apr 11, 2007 at 06:10:07PM -0700, Qilong Ren wrote:
> Hi, everyone,
>
> I am extracting some information from a given string using python RE. The
> string is ,for example,
I'm happy to announce v1.4.6 of pyparsing has been released.
This latest version of pyparsing has a few minor bug-fixes and
enhancements, and another performance improvement for recursive
grammars (those that use the Forward class).
The salient features of this new release are:
Simplified the Par
On Apr 11, 7:01 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 2:57 pm, Bruno Desthuilliers
>
> <[EMAIL PROTECTED]> wrote:
> > IamIan a écrit :
>
> > yearTotals = dict([(year, dict.fromkeys(months, 0)) for year in years])
>
> > HTH
>
> List comprehensions without a list? What? Where? How?
Oo
In the past, I have put together web applications that process tasks
serially, either with short algorithms to manipulate user-submitted
data or to return database queries. However, now I am faced with the
task of having a long-running process being started by a web
submission. I want to process
Hi, everyone,
I am extracting some information from a given string using python RE. The
string is ,for example,
s = 'a = 4 b =3.4 5.4 c = 4.5'
What I want is :
a = 4
b = 3.4 5.4
c = 4.5
Right now I use :
pattern = re.compile(r'\w+\s*=\s*.*?\s+')
lists = pattern.findall(s)
It
On Apr 11, 2:57 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> IamIan a écrit :
>
> yearTotals = dict([(year, dict.fromkeys(months, 0)) for year in years])
>
> HTH
List comprehensions without a list? What? Where? How?
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 3:10 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
>
>
>
> > As said before I'm new to programming, and I need in depth explaination to
> > understand everything the way I want to know it, call it a personality quirk
> > ;p.
>
> > With p
"Collin Stocks" <[EMAIL PROTECTED]> wrote:
> --=_Part_19087_21002019.1176329323968
> I tried it, and when checking it using a proxy, saw that it
> didn't really work, at least in the version that I have (urllib
> v1.17 and urllib2 v2.5). It just added that header onto the end,
> therefore maki
On Apr 11, 3:26 pm, "Clarence" <[EMAIL PROTECTED]> wrote:
> No, there is no circularity. The problem is coming about in the JPype
> application. It creates a Python class to proxy any Java class or Java
> interface that the program uses (directly or indirectly). As far as
> the
> Java proxies go, w
A co-worker of mine came across some interesting behavior in the
Python interpreter today and I'm hoping someone more knowledgeable in
Python internals can explain this to me.
First, we create an instance of an Old-Style class without defining a
__contains__ but instead define a __getitem__ method
Thank you everyone for the helpful replies. Some of the solutions were
new to me, but the script now runs successfully. I'm still learning to
ride the snake but I love this language!
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 11 Apr 2007 21:03:20 +0200, Bruno Desthuilliers wrote:
> Greg Corradini a écrit :
>> Hello All,
>> I'm attempting to create multiple dictionaries at once, each with unique
>> variable names. The number of dictionaries i need to create depends on the
>> length of a list, which was returned
> You should read the file PCBuild/readme.txt.
> It explains how to build python from source, and has long explanations
> about the same list of modules you are asking for.
>
> And it works: I regularly use the debug build of python for my own
> projects.
Also, as of Python 2.5, you don't have to
> I guess I am a little confused on the directions for the vsextcomp. I
> don't see an IDE for the vsextcomp. Do you know of any explicit
> directions on how to do this build?
Can you please explicitly say what step you did and at what precise
step you failed?
0. Install VS 2003
1. Install vsextc
I've started learninhg Python and have developed a small Python app
that imports Excel data into an Access mdb/jet database. This
application has dependencies on the following:
XLRD - http://cheeseshop.python.org/pypi/xlrd/0.5.2 - (to read Excel
files)
Python windows extensions - http://starship
Jeff McNeil schrieb:
> I apologize for not giving you a Python specific answer, but for the
> XMLRPC services I've deployed, I front them with Apache and proxy back
> to localhost:8080.
>
> I do all of the encryption and authentication from within the Apache
> proper and rely on mod_proxy to forwa
I mean, of course, rexec (not recec) and Bastion
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> The installation of Python 2.5 comes with a bunch of built-in
> extension modules (.pyd files) under the DLLs directory. I've
> downloaded the Python source code and am trying to build the debug
> versions of all of these files. However, some of the projects won't
> bu
Hello world,
Is it possible to feed findAll() a list of tags WITH attributes? This
psuedocode obviously doesn't work, but it reflects what I want to do:
soup.findAll([('td', {'class':'foobar'}), ('li', {'class':'baz'}), ('a',
{'name' : re.compile('^it.*$')})])
Any clues, examples, or suggestio
The documentation for these two modules says that they were disabled in
Python 2.3 due to security holes not easily fixable. I have not worked with
them, but I can still import them under Python 2.4, so I'm not clear on
whether the security problems were fixed in Python itself, or whether the
And yes, I do have two email addresses that I use for Python-List
On 4/11/07, Collin Stocks <[EMAIL PROTECTED]> wrote:
I tried it, and when checking it using a proxy, saw that it didn't really
work, at least in the version that I have (urllib v1.17 and urllib2 v2.5).
It just added that header o
[EMAIL PROTECTED] (John J. Lee) writes:
> Kenneth McDonald <[EMAIL PROTECTED]> writes:
>
> > I know that there's some work out there to let Python make use of
> > Javascript (Spidermonkey) via (I assume) some sort of bridging C/C++
> > code. Anyone know of efforts to allow the reverse? I'd really
The installation of Python 2.5 comes with a bunch of built-in
extension modules (.pyd files) under the DLLs directory. I've
downloaded the Python source code and am trying to build the debug
versions of all of these files. However, some of the projects won't
build because they are looking for heade
I tried it, and when checking it using a proxy, saw that it didn't really
work, at least in the version that I have (urllib v1.17 and urllib2 v2.5).
It just added that header onto the end, therefore making there two
User-Agent headers, each with different values. I might add that my script
IS able
king kikapu wrote:
> Ο/Η Robert Kern έγραψε:
>> It's a bit more complicated than that. There are good resources for
>> understanding the implications of the GPL on the FSF's site which other
>> people
>> have pointed out.
>
>>From what i can understand, you can sell your product and you have to
>
Dag a écrit :
> I have an application which works with lists of tuples of the form
> (id_nr,'text','more text',1 or 0). I'll have maybe 20-50 or so of these
> lists containing anywhere from 3 to over 3 tuples. The actions I
> need to do is either append a new tuple to the end of the list, di
On Apr 11, 5:40 pm, Dag <[EMAIL PROTECTED]> wrote:
> I have an application which works with lists of tuples of the form
> (id_nr,'text','more text',1 or 0). I'll have maybe 20-50 or so of these
> lists containing anywhere from 3 to over 3 tuples. The actions I
> need to do is either append a
"Chris Lasher" <[EMAIL PROTECTED]> writes:
> I recently heard someone argue that shebangs were only appropriate
> for Python code intended to be executable (i.e., run from the
> command line).
Since that's the purpose of putting in a shebang line, that's what I'd
argue also; specifically:
- Mo
Chris Lasher a écrit :
> Should a Python module not intended to be executed have shebang/
> hashbang (e.g., "#!/usr/bin/env python") or not?
The shebang is only useful for files that you want to make directly
executable on a *n*x system. They are useless on Windows, and not
technically required
Laszlo Nagy a écrit :
(snip)
> Try this instead:
>
> lineno = 0
> for values in csvreader:
>try:
> lineno += 1
Laszlo, may I suggest using enumerate() here instead ?-)
for lineno, row in enumerate(csvreader):
print "line %s" % lineno+1 # want 1-based numbering
--
http://mail.python
Jorge Godoy wrote:
> Robert Kern <[EMAIL PROTECTED]> writes:
>
>> I don't recommend it. You are talking to their salesman, not your lawyer. You
>> are being given a sales pitch, not legal advice.
>
> On the other hand, he's stating Trolltech's policies and agreeing /
> disagreeing on your underst
John Machin a écrit :
(snip)
> ... and a few more cents:
>
> There are *two* relations/tables involved (at least): a "tuple" table
> and a "list" table.
Mmm... From a purely technical POV, not necessarily. If there's no need
for anything else than distinguishing between different lists, a singl
After playing a little with Alex's function, I got to:
import os, cPickle
def run_in_separate_process_2(f, *args, **kwds):
pread, pwrite = os.pipe()
pid = os.fork()
if pid > 0:
os.close(pwrite)
with os.fdopen(pread, 'rb') as f:
status, result = cPickle.load(
Ο/Η Robert Kern έγραψε:
> It's a bit more complicated than that. There are good resources for
> understanding the implications of the GPL on the FSF's site which other people
> have pointed out.
>From what i can understand, you can sell your product and you have to
give the source. Also you must
Robert Kern <[EMAIL PROTECTED]> writes:
> I don't recommend it. You are talking to their salesman, not your lawyer. You
> are being given a sales pitch, not legal advice.
On the other hand, he's stating Trolltech's policies and agreeing /
disagreeing on your understanding of their license. He's
On Apr 12, 7:09 am, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Dag a écrit :
>
>
>
> > I have an application which works with lists of tuples of the form
> > (id_nr,'text','more text',1 or 0). I'll have maybe 20-50 or so of these
> > lists containing anywhere from 3 to over 3 tuples. Th
IamIan wrote:
> Hello,
>
> I'm writing a simple FTP log parser that sums file sizes as it runs. I
> have a yearTotals dictionary with year keys and the monthTotals
> dictionary as its values. The monthTotals dictionary has month keys
> and file size values. The script works except the results are
After playing with Alex's implementation, and adding some support for
exceptions, this is what I came up with. I hope I am not getting too
clever for my needs:
import os, cPickle
def run_in_separate_process_2(f, *args, **kwds):
pread, pwrite = os.pipe()
pid = os.fork()
if pid > 0:
"campos" <[EMAIL PROTECTED]> writes:
> Hi all,
>
> Last time I installed Python 2.5 by default, it didn't support SSL.
> When I tried to use HTTPS, the following error occured:
> AttributeError: 'module' object has no attribute 'ssl'
ISTR that the sunfreeware.com 2.5 build supports that, if you
1) You have this setup:
logMonths = {"Jan":"01", "Feb":"02",...}
yearTotals = {
"2005":{"01":0, "02":0, }
"2006":
"2007":
}
Then when you get a value such as "Jan", you look up the "Jan" in the
logMonths dictionary to get "01". Then you use "01" and the ye
James Stroud <[EMAIL PROTECTED]> writes:
> Hello All,
>
> The built-in mac osx vecLib is segfaulting in some cases--A very fun
> fact to find out the hard way over two nights of work. I also spent an
> embarrassing amount of time figuring out just where. Although I'm in
> quite a self-congratulat
Kevin Walzer wrote:
> Hello,
>
> I am seeking to update this wiki page, which lists Mac OS X applications
> using Python in a significant way:
>
> http://wiki.python.org/moin/MacPython/MacSoftwareUsingPython
>
> This query is directed at developers of cross-platform Python
> applications who p
> > Ok, i see...So i can use Qt OS edition and earn money from this as
> > long as i explicitly say (is a reference to a GPL in a readme text
> > file enough for this ?) that this software is under the GPL lisence
> > and i have the obligation to give the source code with it.
>
> It's a bit more c
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Chris Mellon
> Sent: Wednesday, April 11, 2007 9:12 AM
> To: python-list@python.org
> Subject: Re: tuples, index method, Python's design
>
>
> So, when you have a) a third party module that you c
Kenneth McDonald <[EMAIL PROTECTED]> writes:
> I know that there's some work out there to let Python make use of
> Javascript (Spidermonkey) via (I assume) some sort of bridging C/C++
> code. Anyone know of efforts to allow the reverse? I'd really like to
> make use of Python when doing Mozilla DO
Dag a écrit :
> I have an application which works with lists of tuples of the form
> (id_nr,'text','more text',1 or 0). I'll have maybe 20-50 or so of these
> lists containing anywhere from 3 to over 3 tuples. The actions I
> need to do is either append a new tuple to the end of the list, di
On Wed, 11 Apr 2007 10:57:19 -0500, Chris Mellon <[EMAIL PROTECTED]> wrote:
>
> The primary use case for index on tuple is because people use them as
> immutable lists. That's fine as far as it goes, but I want to know
> what the justification is for using an immutable list, and if you have
>
You guys have given me some great ideas, I am going to try them all
out and let you guys know how it turns out.
On a side note, thanks for nto bashing a noob like me who isn't the
greatest pythonista around. I am trying to learn and you guys are how
I learn my mistakes. Well you, and the fact the
"7stud" <[EMAIL PROTECTED]> writes:
[...]
> Also, the book is brand new, yet the cover has completely separated
> from the spine of the book, and now the cover is only attached to the
> first and last pages with a bit of glue.
I think they used to advertise that as a feature -- "stay-flat
binding"
En Wed, 11 Apr 2007 17:15:48 -0300, <[EMAIL PROTECTED]> escribió:
> The file contents have leading whitespace, then a number:
> 123456 \n
> I expect to return '123456'
And nothing following the number?
py> line = " 123456 \n"
py> print line.strip()
123456
--
Gabriel Genell
IamIan a écrit :
> Hello,
>
> I'm writing a simple FTP log parser that sums file sizes as it runs. I
> have a yearTotals dictionary with year keys and the monthTotals
> dictionary as its values. The monthTotals dictionary has month keys
> and file size values. The script works except the results a
On Apr 11, 4:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 11 Apr 2007 16:13:42 -0300, <[EMAIL PROTECTED]> escribió:
>
>
>
>
>
> > Hi folks,
> > I am trying to read the first occurence of non-whitespace in a file,
> > within a zipfile. Here is my code:
>
> > zipnames = glob.glob("
king kikapu wrote:
> On Apr 11, 10:56 am, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Others have given good answers. I would only like to clarify what I think is
>> the
>> source of confusion here. While the FSF and many open source advocates make a
>> distinction between the words "commercial" (me
On Apr 12, 5:28 am, "fscked" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 10:26 am, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
>
>
>
> > fscked írta:> Trying to use CSV to read in a line with 11 fields and I keep
> > getting
> > > this error. I have googled a bit and have been unable to figure it out.
>
>
En Wed, 11 Apr 2007 16:13:42 -0300, <[EMAIL PROTECTED]> escribió:
> Hi folks,
> I am trying to read the first occurence of non-whitespace in a file,
> within a zipfile. Here is my code:
>
> zipnames = glob.glob("*")
> for zipname in zipnames:
> z = zipfile.ZipFile(zipname, "r")
> for filename
Greg Corradini a écrit :
> Bruno,
> Your help is much appreciated.
Then give thanks to Dennis too !-)
> I will give this a try tomorrow morning and
> get back on how it works.
Don't worry, it just works - and it's the idiomatic solution to the
problem you described.
--
http://mail.python.org
Bruno,
Your help is much appreciated. I will give this a try tomorrow morning and
get back on how it works.
Bruno Desthuilliers wrote:
>
> Greg Corradini a écrit :
>> Hello All,
>> I'm attempting to create multiple dictionaries at once, each with unique
>> variable names. The number of diction
[EMAIL PROTECTED] wrote:
> Hi folks,
> I am trying to read the first occurence of non-whitespace in a file,
> within a zipfile. Here is my code:
>
> zipnames = glob.glob("*")
> for zipname in zipnames:
> z = zipfile.ZipFile(zipname, "r")
> for filename in z.namelist():
> count = len(z.read
En Wed, 11 Apr 2007 16:28:08 -0300, fscked <[EMAIL PROTECTED]>
escribió:
>> Trying to use CSV to read in a line with 11 fields and I keep getting
>> this error. I have googled a bit and have been unable to figure it
>
> myfile = open('ClientsXMLUpdate.csv')
> csvreader = csv.reader(myfile)
>
> f
> Hmm, well I have counted the fields in the CSV and verified there are
> only 11. Here is the offending code:
>
>
Try this instead:
lineno = 0
for values in csvreader:
try:
lineno += 1
boxid, mac, activated, hw_ver, sw_ver, heartbeat, name,
address,phone, country, ci
"IamIan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hello,
|
| I'm writing a simple FTP log parser that sums file sizes as it runs. I
| have a yearTotals dictionary with year keys and the monthTotals
| dictionary as its values. The monthTotals dictionary has month keys
| and fi
Nanjundi a écrit :
> On Apr 10, 10:23 am, "Lucas Malor" <[EMAIL PROTECTED]> wrote:
>
>> Thank you. Do you know also if I can do a similar operation with
>> functions? I want to select with a string a certain get() function
>> of ConfigParser:
>>
>> if type == "int" : funcname = "getint" elif t
En Wed, 11 Apr 2007 11:29:28 -0300, Martin Maney <[EMAIL PROTECTED]>
escribió:
> Simple asyncore application where I wanted to use an explicit map (1)
> rather than the automagic default. Worked fine until I tried to use
> asynchat to handle an interactive status and control connection (3) and
On Apr 11, 4:36 pm, [EMAIL PROTECTED] wrote:
[...]
> .. And I avoided pickle at the time
> because I had a structure that was unpicklable (grown by me using a
> mixture of python, C, ctypes and pyrex at the time). The structure is
> improved now, and I will go for the more standard approach..
Sorr
Eric Mahurin a écrit :
> Is there a standard way to get a descriptor object for an arbitrary
> object attribute - independent of whether it uses the descriptor/
> property protocol or not. I want some kind of handle/reference/
> pointer to an attribute.
I'm not sure to understand what you want
On Apr 11, 10:26 am, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> fscked írta:> Trying to use CSV to read in a line with 11 fields and I keep
> getting
> > this error. I have googled a bit and have been unable to figure it out.
>
> Probably you have more than 11 values in some (or all) of the rows in
On Apr 11, 12:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Without wishing to lay claim to genius, I'd suggest that you don;'t
> write programs relying on multiple inheritance until you have a thorough
> understanding of its principles.
>
> The inability of the interpreter to create a consisten
En Wed, 11 Apr 2007 15:57:56 -0300, IamIan <[EMAIL PROTECTED]> escribió:
> I'm writing a simple FTP log parser that sums file sizes as it runs. I
> have a yearTotals dictionary with year keys and the monthTotals
> dictionary as its values. The monthTotals dictionary has month keys
> and file size
Hi
I don't know if someone is familiar with Java JUNG, framework for data
visualization (http://jung.sourceforge.net/), I am interested is there
anything lik JUNG for Python?
--
Greatest shits:
http://www.net.hr/vijesti/page/2007/03/30/0030006.html
--
http://mail.python.org/mailman/listinfo/p
Hi folks,
I am trying to read the first occurence of non-whitespace in a file,
within a zipfile. Here is my code:
zipnames = glob.glob("*")
for zipname in zipnames:
z = zipfile.ZipFile(zipname, "r")
for filename in z.namelist():
count = len(z.read(filename).split('\n'))
if fnmatch.fnma
On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
> As said before I'm new to programming, and I need in depth explaination to
> understand everything the way I want to know it, call it a personality quirk
> ;p.
>
> With pop() you remove the last element of a list and return its value:
>
> No
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Scott
>
> I understand all that. What I don't understand is why all the
> documentation
> I see says, "When removing a specific element from a list using pop()
it
> must be in this format: list
Clarence wrote:
> I'm having problems creating classes because of "can't create a
> consistent mro" problems.
>
> I noticed, in a test program, that if the base class list that I
> pass to type.__new__ is sorted (using default keys, so presumably
> sorting by the id's of the class objects), that t
En Wed, 11 Apr 2007 14:07:15 -0300, i3dmaster <[EMAIL PROTECTED]>
escribió:
> Hmm... well I don't know if I made my question clear then or you might
> have misread it?... Anyway, the namespace handling wasn't the issue
> of this question. feedparser handles it as expected but only when
> there
1 - 100 of 223 matches
Mail list logo