On Tue, 11 Dec 2007 15:06:31 +, Neil Cerutti wrote:
> When I use languages that supply do-while or do-until looping constructs
> I rarely need them.
...
> However, did you have an specific need for a do-while construct? Perhaps
> we could show you the alternatives.
"Need" is a strong word. Af
> No what? YES, the "decode error" is complaining that the data supplied
> is NOT valid utf-8 data. So it's not utf-8, it's windows-1252, so stop
> lying to browsers: like I said, use charset="windows-1252"
I think weheh can manage to resist good advise for a long time.
Regards,
Martin
--
http:/
> How do i build python 2.5.1 from source using MSVC 2005?
> Are there instructions on doing this.
See PCbuild8/readme.txt.
The instructions may not be correct, and the project files
may not work out of the box, so you are on your own wrt.
anything that goes wrong - unless you ask here for specif
On Tue, 11 Dec 2007 13:07:02 +1300, greg wrote:
> Tim Chase wrote:
>> -Write Lovecraftian code ("import goto" comes to mind) designed to make
>> reverse-engineers go insane trying to figure out what you were thinking
>
> The problem with that is it makes it hard for *you* to figure out what
> you
On Mon, 10 Dec 2007 13:55:15 -0800, Bret wrote:
> Does anyone know of a package that can be used to "fix" bad formatting
> in Python code? I don't mean actual errors, just instances where
> someone did things that violate the style guide and render the code
> harder to read.
>
> If nothing exist
> Is there a module available in the standard library, for Python 2.4
> running on Windows, like "crypt" for Python 2.4 running on *nix
> machines?
I can't try right now, but I would expect that the Cygwin python
distribution has a crypt implementation.
If you want a crypt implementation for the
On Dec 12, 6:50 am, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
> ron.longo wrote:
> > Nope, maybe I'm not explaining myself well.
>
> > When I do os.getenv('HOME') I get back None.
>
> > According to the docs, 'HOME' is the user's home directory on some
> > platforms. Which is not what I want.
>
> >
On Tue, 11 Dec 2007 06:23:43 -0800, Paul McGuire wrote:
> On Dec 11, 5:59 am, dfg <[EMAIL PROTECTED]> wrote:
>> Breakthrough - How To Turn Your Dull Website into Money Making Website
>
>
> I was surprised at how effectively the spam posting the other day,
> "Jesus in the Quran" was masked and de
On Tue, 11 Dec 2007 11:25:32 -0800, John Nagle wrote:
> sturlamolden wrote:
>> On 10 Des, 23:49, [EMAIL PROTECTED] (Aahz) wrote:
>>
>>> "Premature optimization is the root of all evil in programming."
>>> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting
>>> Hoare)
>
> We
Diez B. Roggisch wrote:
> Larry Bates wrote:
>
>> eliss wrote:
>>> I'm using dl.call() to call a C function in an external library. It's
>>> working great so far except for one function, which returns an
>>> unsigned int in the C version. However, in python it returns a signed
>>> value to me. How
[EMAIL PROTECTED] a écrit :
> Hi,
>
> Is the tuple comparison brooked in python ?!?!?
Given the size and average level of the user base, I think this would
have been noticed.
>
> Try this
If you hope anyone to try anything, please post the *minimal* working
code showing the problem. And whi
John Nagle a écrit :
> sturlamolden wrote:
>
>> On 10 Des, 23:49, [EMAIL PROTECTED] (Aahz) wrote:
>>
>>> "Premature optimization is the root of all evil in programming."
>>> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting
>>> Hoare)
>
>
>We're ten years into Python, and
Shane Geiger <[EMAIL PROTECTED]> writes:
> Some usage of __file__ will always get what you want in various situations:
>
> print __file__
>
> print modulename.__file__
>
> print os.getcwd() + "/" + __file__
>
>
>
>
>
> Rick Dooling wrote:
>> On Dec 11, 10:08 am, "ron.longo" <[EMAIL PROTECTED]>
massimo s. a écrit :
> Hi,
>
> I'm struggling to use the python in-built csv module, and I must say
> I'm less than satisfied. Apart from being rather poorly documented, I
> find it especially cumbersome to use, and also rather limited. What I
> dislike more is that it seems working by *rows* inst
I am trying to write a utility to remove empty maildir mailboxes. It
sounds like this should be very simple but it's proving really
difficult.
I'm doing this on a Fedora 7 system with python 2.5.
The first question is how to detect whether a directory is a maildir
mailbox. The following code sn
Whizzer a écrit :
> Is OReilly's Learning Python a good place to start learning to program?
I can't tell - I already had some experience as a (professional)
programmer when I met Python, and it was quite a few years ago. But Mark
Lutz's "Programming Python" is one of the very few CS books that
John Nagle schrieb:
> sturlamolden wrote:
>> On 10 Des, 23:49, [EMAIL PROTECTED] (Aahz) wrote:
>>
>>> "Premature optimization is the root of all evil in programming."
>>> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting
>>> Hoare)
>
>We're ten years into Python, and it's s
On Dec 11, 2:22 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > How do i build python 2.5.1 from source using MSVC 2005?
> > Are there instructions on doing this.
>
> See PCbuild8/readme.txt.
>
> The instructions may not be correct, and the project files
> may not work out of the box, so you a
[EMAIL PROTECTED] a écrit :
(top-post corrected, once again... duh.)
> Bruno Desthuilliers wrote:
>>[EMAIL PROTECTED] a écrit :
>>
>>Martin, would you _please_ learn to quote properly ? top-posting and
>>keeping the whole text of the previous posts are two really annoying
>>practices. TIA
>>(snip
I was just thinking of an alternative to reading cookies directly - at least
in my case. What if I create a PHP file that contains the cookies in 2
lines, such as this?
Myusername
Mypassword
What would the python script look like if I wanted to open the file and put
the 2 values in vari
"massimo s." <[EMAIL PROTECTED]> wrote:
> 1) Is there a good tutorial, example collection etc. on the csv module
> that I'm missing?
Yes, see http://docs.python.org/lib/csv-examples.html
> 2) Is there an alternative csv read/write module?
No but feel free to write your own
> 3) In case anyone el
Thanks, didn't realize it would be quite so easy.
- Original Message -
From: "Matt Nordhoff" <[EMAIL PROTECTED]>
To: "ron.longo" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, December 11, 2007 2:50 PM
Subject: Re: finding dir of main .py file
> ron.longo wrote:
>> Nope, maybe I'm not explain
On Dec 12, 6:14 am, "massimo s." <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm struggling to use the python in-built csv module, and I must say
> I'm less than satisfied. Apart from being rather poorly documented,
Patches are welcome :-)
> I
> find it especially cumbersome to use,
Can you be more spe
On 11 Dic, 22:37, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 12, 6:14 am, "massimo s." <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm struggling to use the python in-built csv module, and I must say
> > I'm less than satisfied. Apart from being rather poorly documented,
>
> Patches are welcome
> > Is the tuple comparison brooked in python ?!?!?
>
> No.
>
> > Thanks.
>
> You're welcome.
HHH! That just made my day. Too funny.
2B
--
http://mail.python.org/mailman/listinfo/python-list
On 11 Dic, 20:24, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
>
> Post your actual problem so you can get more accurate help.
Hi Guilhermo,
I have not an actual problem. I'm just trying to use the CSV module
and I mostly can get it working. I just think its interface is much
less than perfect. I'
I've been trying to build Python 2.4.1 on an HPUX11. Python builds ok,
but idle has issues. And what I don't know is how to determine whether
or not Python discovers the tcl/tk libraries (.sl) and headers, or if
there's some other problem. If someone has thoughts on either how to
invoke 'configu
Ok. This is small code.
The problem is '2' != 2 there is a way of converting 'some number' in
number ?
Thanks.
# -*- coding: cp1252 -*-
import random
import csv
import struct
import array
# resultados para colocar nos campos
def gera_string(res):
# acampo3
acampo1=((0,5,'muito
> I was able to build the subversion source using the PCbuild8/
> readme.txt instructions. However how do i install the compiled
> interpreter and libraries so it can be used with swig or wxpython
> (win32).
I'm not sure why you want to install it - just run it from where
it was built.
If you w
On Dec 11, 2:28 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Tue, 11 Dec 2007 06:23:43 -0800, Paul McGuire wrote:
> > On Dec 11, 5:59 am, dfg <[EMAIL PROTECTED]> wrote:
> >> Breakthrough - How To Turn Your Dull Website into Money Making Website
> >
>
> > I was surprised a
How on earth do I convert strings to lists. I have a string with a list it in
it and I'm trying to convert it into a list. Please help me.
Ex."[16, 16, 2, 16, 2, 16, 8, 16]"-string
to [16, 16, 2, 16, 2, 16, 8, 16] -list
___
En Tue, 11 Dec 2007 12:22:11 -0300, Jesse Jaggars <[EMAIL PROTECTED]>
escribi�:
> Bret wrote:
>> Does anyone know of a package that can be used to "fix" bad formatting
>> in Python code? I don't mean actual errors, just instances where
>> someone did things that violate the style guide and rend
I would like to use the following recipe to transpose a list of lists
with different lengths.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410687
Here is an example of what I would like to do:
Python 2.5.1 (r251:54863, May 18 2007, 16:56:43)
[GCC 3.4.4 (cygming special, gdc 0.12, usin
On 11 Dez, 22:02, [EMAIL PROTECTED] wrote:
> Ok. This is small code.
>
> The problem is '2' != 2 there is a way of converting 'some number' in
> number ?
>
> Thanks.
>
> # -*- coding: cp1252 -*-
> import random
> import csv
> import struct
> import array
>
> # resultados para colocar nos campos
> d
On 11 Des, 20:25, John Nagle <[EMAIL PROTECTED]> wrote:
> Shed Skin effort. Its author writes "Am I the only one seeing the potential
> of an implicitly statically typed Python-like-language that runs at
> practically the same speed as C++?"
Don't forget about Pyrex and PyPy's RPython.
By the wa
On Dec 12, 8:49 am, "massimo s." <[EMAIL PROTECTED]> wrote:
> On 11 Dic, 22:37, John Machin <[EMAIL PROTECTED]> wrote:
>
> > On Dec 12, 6:14 am, "massimo s." <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I'm struggling to use the python in-built csv module, and I must say
> > > I'm less than satis
On Dec 11, 12:38 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> Diez B. Roggisch wrote:
> > Larry Bates wrote:
>
> >> eliss wrote:
> >>> I'm using dl.call() to call a C function in an external library. It's
> >>> working great so far except for one function, which returns an
> >>> unsigned int in the
On 12/11/2007 5:08 PM, [EMAIL PROTECTED] wrote:
> On 11 Dez, 22:02, [EMAIL PROTECTED] wrote:
>> Ok. This is small code.
>>
>> The problem is '2' != 2 there is a way of converting 'some number' in
>> number ?
>>
>>> ord('2')
50
>>> chr(50) == '2'
True
>>> int('2')
2
>>> int('2') == 2
True
Bruno Desthuilliers wrote:
> Is the array of lines the appropriate data structure here ?
I've done tokenizers both as an array of lines and as a long string.
The former has seemed easier when the language treats EOL as a
statement separator.
re not letting literal strings in code terminate bloc
On Dec 11, 1:08 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Chris wrote:
> > On Dec 11, 11:41 am, garage <[EMAIL PROTECTED]> wrote:
> >> > Is what I'm trying to do possible with Python's Regex library? Is
> >> > there an error in my Regex?
>
> >> Search for '*?' onhttp://docs.python.org/lib
On Dec 12, 10:49 am, "massimo s." <[EMAIL PROTECTED]> wrote:
> > Accessing the data by columns *instead* of by rows would definitely
> > not be appreciated by people who are using the csv module to read
> > millions of lines of data.
>
> I don't want anything *instead*, I would like *additional*.
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = '[1,2,3,4,5]'
>>> eval (a, {}, {})
[1, 2, 3, 4, 5]
>>>
But note that 'eval' is generally not such a good idea unless
> How on earth do I convert strings to lists. I have a string
> with a list it in it and I'm trying to convert it into a
> list. Please help me.
>
> Ex."[16, 16, 2, 16, 2, 16, 8, 16]"-string to
> [16, 16, 2, 16, 2, 16, 8, 16] -list
If you trust your input, you can just do
>>> s = "[16, 16, 2,
En Tue, 11 Dec 2007 17:34:50 -0300, Vincent Hirth <[EMAIL PROTECTED]>
escribi�:
> I was just thinking of an alternative to reading cookies directly - at
> least
> in my case. What if I create a PHP file that contains the cookies in 2
> lines, such as this?
>
(To make it more clear:)
--- begi
I tried the tips I found in other posts but I still get 'none' back:
import easygui as eg
import xml.etree.ElementTree as ET
import sys
#kml source is:
#
#http://earth.google.com/kml/2.2";>
#
#Simple placemark
#Attached to the ground. Intelligently places itself
# at the height of
It looks like you have a string which starts and ends with square
brackets and is a repeated group of (integer, comma (and perhaps
space)). What you don't have is a "string with a list in it" :-)
One solution:
s="[16, 16, 2, 16, 2, 16, 8, 16]"
mylist=[int(s.strip()) for s in s[1:-1].split(','
"massimo s." <[EMAIL PROTECTED]> writes:
> Yes, but maybe I was in the wrong. I'm not so bold to submit patches
> to an official Python module without asking.
Be bold. The worst that can happen is that your patch will be
rejected. Any discussion that happens can only improve your
understanding (a
On Dec 11, 2:28 pm, eliss <[EMAIL PROTECTED]> wrote:
> On Dec 11, 12:38 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>
>
>
> > Diez B. Roggisch wrote:
> > > Larry Bates wrote:
>
> > >> eliss wrote:
> > >>> I'm using dl.call() to call a C function in an external library. It's
> > >>> working great so
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Why is this a problem? The more time the Original Poster spends
> struggling to maintain his copy-protected in-house software that
> nobody else wants, the less time he will have to go out and cause
> mischief by writing something useful and copy-prote
John & Martin,
Thanks for your help and kind words of encouragement. Still, what you have
suggested doesn't seem to work, unless I'm not understanding your directive
to encode as 'windows-1252'. Here's my program in full:
#!C:/Program Files/Python23/python.exe
import cgi, cgitb
import sys, code
En Tue, 11 Dec 2007 18:49:27 -0300, massimo s. <[EMAIL PROTECTED]>
escribi�:
> On 11 Dic, 22:37, John Machin <[EMAIL PROTECTED]> wrote:
>> On Dec 12, 6:14 am, "massimo s." <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > I'm struggling to use the python in-built csv module, and I must say
>> > I'm
En Tue, 11 Dec 2007 19:28:34 -0300, eliss <[EMAIL PROTECTED]>
escribi�:
> On Dec 11, 12:38 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>> Diez B. Roggisch wrote:
>> > Larry Bates wrote:
>> >> eliss wrote:
>> >>> working great so far except for one function, which returns an
>> >>> unsigned int in
MonkeeSage <[EMAIL PROTECTED]> wrote:
> It seems that I've got a short-circuit somewhere here. I understand
> that everything is an object and the the storage/lookup system is
> object-agnostic, and that it is only the descriptors (or "tags" as I
> called them generically) that determine how an at
[EMAIL PROTECTED] wrote:
> I tried the tips I found in other posts but I still get 'none' back:
>
> import easygui as eg
> import xml.etree.ElementTree as ET
> import sys
>
> #kml source is:
> #
> #http://earth.google.com/kml/2.2";>
> #
> #Simple placemark
> #Attached to the ground. Int
> Thanks for your help and kind words of encouragement. Still, what you have
> suggested doesn't seem to work, unless I'm not understanding your directive
> to encode as 'windows-1252'.
Please read John's message again. Nowhere he said you should "encode as
'windows-1252'". Instead, he said 'use
Tim Couper wrote:
> It looks like you have a string which starts and ends with square
> brackets and is a repeated group of (integer, comma (and perhaps
> space)). What you don't have is a "string with a list in it" :-)
>
> One solution:
>
> s="[16, 16, 2, 16, 2, 16, 8, 16]"
>
> mylist=[int(s.
On 12 Dic, 00:08, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Note that all the above (as any operation involving a whole *column*)
> requires reading the whole file in memory. Working by rows, on the other
> hand, only requires holding ONE row at a time. For big files this is
> significant.
>
> I was hoping a simple pattern like .*text.* wouldn't be too
> complicated for Regex, but now I'm starting to agree with you. Parsing
> the entire XML Dom would probably be a lot easier.
That's one of the common problems with rexes and XML/HTML. They start
out fast and easy, but at some point t
On Dec 11, 10:51 pm, eliss <[EMAIL PROTECTED]> wrote:
> On Dec 11, 2:28 pm, eliss <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 11, 12:38 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>
> > > Diez B. Roggisch wrote:
> > > > Larry Bates wrote:
>
> > > >> eliss wrote:
> > > >>> I'm using dl.call() to call
En Tue, 11 Dec 2007 17:14:14 -0300, Tim Chase
<[EMAIL PROTECTED]> escribi�:
> I'm dealing with several large items that have been zipped up to
> get quite impressive compression. However, uncompressed, they're
> large enough to thrash my memory to swap and in general do bad
> performance-relate
> What does the browser say what the encoding of the page is?
>
> What browser are you using, and did you configure it to default to
> UTF-8 for all pages? (which you should not have done)
>
Browser is both IE and Firefox. IE is defaulting to UTF8. If I force it to
"Encoding > Western European (Wi
p.s. I modified the code to break things out more explicitly:
#!C:/Program Files/Python23/python.exe
import cgi, cgitb
import sys, codecs
import os,msvcrt
cgitb.enable()
print u"""Content-Type: text/html
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; >
http://www.w3.org/1999/xhtml";
En Tue, 11 Dec 2007 10:51:13 -0300, Object01 <[EMAIL PROTECTED]> escribi�:
> I've been working with the source code for Trac (http://
> trac.edgewall.org/) lately and have run across a bizarre problem. It
> seems that all POST requests to Trac's standalone server (tracd) have
> a random chance of
On Dec 12, 10:35 am, "massimo s." <[EMAIL PROTECTED]> wrote:
>
> For example, I never ever looked into itertools. I am also not so
> familiar with iterators. Itertools seem fantastic, and I'll definitely
> look into them, however I can't but feel it's a bit strange that
> someone wanting a quick cs
OK, I don't mean to start any sort of war or flaming or anything here but I
really need to discuss this with other afficionados of Python - I know none
other than myself.
I'm a software developer. Where I work, the dominant development language is
Java with some mostly-legacy C/C++ software.
On Dec 12, 11:06 am, "weheh" <[EMAIL PROTECTED]> wrote:
> p.s. I modified the code to break things out more explicitly:
>
> #!C:/Program Files/Python23/python.exe
> import cgi, cgitb
> import sys, codecs
> import os,msvcrt
>
> cgitb.enable()
>
> print u"""Content-Type: text/html
>
> "http://www.w3
massimo s. a écrit :
> On 11 Dic, 20:24, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
>
>
>>Post your actual problem so you can get more accurate help.
>
>
> Hi Guilhermo,
> I have not an actual problem.
Yes you do - even if you don't realize it yet !-)
> I'm just trying to use the CSV module
massimo s. a écrit :
(snip)
> (Btw: who is using csv to read >10**6 lines of data?)
>
Count me in. Never had to work on an RDBM dump ?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> Ok. This is small code.
>
> The problem is '2' != 2
It would indeed be a problem if this expression eval'd to True. That's
the case in some, hem, 'languages', and believe me it's *not* the
RightThing.
> there is a way of converting 'some number' in
> number ?
ass
sturlamolden a écrit :
-snip)
> We could include optional static typing in
> Python,
Please wait - going to get my gun...
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
(snip about tokenizers - not exactly my domain, sorry)
>
> Have I got those quotes right?
Perfect !-)
--
http://mail.python.org/mailman/listinfo/python-list
I tried your suggestions and all that came up was the error
Traceback (most recent call last):
File "C:\Python25\empire\Empire Strategy.pyw", line 1788, in
NewMap1= eval (NewMap1, {}, {})
File "", line 1
Tropical Islands
^
SyntaxError: invalid syntax
And what is thi
I'm sorry this is the error
Traceback (most recent call last):
File "C:\Python25\empire\Empire Strategy.pyw", line 1788, in
eval(NewMap1, {}, {})
File "", line 1
Tropical Islands
^
SyntaxError: invalid syntax
- Forwarded Message
From: katie smith <[EMAIL
WAHHH! for all of you who helped thankyou all of your ideas worked perfectly. I
found what was causing the error and corrected. thankyou for the replies.
Never miss a thing. Make Yahoo your home page.
h
>>> a = '[1,2,3,4]'
>>> b = 'Tropical Islands'
>>> eval(a)
[1, 2, 3, 4]
>>> eval(b)
Traceback (most recent call last):
File "", line 1, in ?
File "", line 1
Tropical Islands
^
SyntaxError: unexpected EOF while parsing
>>>
For eval to work, your string has to contain a va
On Tue, 2007-12-11 at 16:55 -0800, katie smith wrote:
> I tried your suggestions and all that came up was the error
> Traceback (most recent call last):
> File "C:\Python25\empire\Empire Strategy.pyw", line 1788, in
>
> NewMap1= eval (NewMap1, {}, {})
> File "", line 1
> Tropical Isla
Nevermind I always seem to find the answer on my own after i post the topic. i
used len(string) and it counted the letters in string... why do I always do this
Be a better friend, newshound, and
know-it-
I tried googling and yahooing to find the answer and there was to many
conflicting results so i just decided to ask to simple question here.
How do i could the number of letters in a string no a single letter all of them.
ex. 'Count this String'
should turn into an integer saying 17
___
I'd suggest you take some time and go through some of the online Python
documentation in detail. The tutorials and whatnot posted on the website are
quite good (available at http://docs.python.org/doc/).
You can probably find answers to a lot of the questions you might have in
there.
-Jeff
On 12/
I'm trying to replace a built-in exception type and here's a simplified
example of what I was hoping to do...
>>>
>>> import exceptions, __builtin__
>>>
>>> zeroDivisionError = exceptions.ZeroDivisionError
>>>
>>> class Foo(zeroDivisionError):
... bar = 'bar'
...
>>>
>>> exceptions.Z
Are Tkinter widgets running on their own thread?
If I try to make a simple application that will print the letters A to
Z to a Tkinter Text widget, and I space the printing of each letter by
1 second, it seems no text will appear in the Text widget until the
method exits.
Take a look at this snip
The term "scripting language" is a pretty misunderstood one these
days. I hold the opinion that what it is supposed to mean can, today,
apply to any language. C, even, is a scripting language. All any of
our software today is doing is calling out to some other component
and simply acting as
My first reaction is that if you have this and dont know how to get
the list from it then maybe you are not as sure as you could be that
you want to have such a string in the first place. Why do you have
this list in a string?
On Dec 11, 2007, at 5:14 PM, katie smith wrote:
How on earth do
massimo s. wrote:
> If your line of reasoning is "well, but you can write a function here
> and there", well, why bothering writing a csv parser at all? You can
> parse it yourself with a couple of Python lines! :)
>
>
I would be *very* interested to see those couple of lines.
Here is some test
On Dec 11, 2:14 pm, "massimo s." <[EMAIL PROTECTED]> wrote:
> dislike more is that it seems working by *rows* instead than by
> *columns*.
you can easily transpose the data to get your columns, for a data file
that looks like this:
data.txt
A,B,C
1,2,3
10,20,30
100,200,300
do the foll
On Wed, 2007-12-12 at 09:50 +1100, Ben Finney wrote:
> "massimo s." <[EMAIL PROTECTED]> writes:
> > Yes, but it's natural for a spreadsheet-like thing to have organized
> > columns of data, often.
>
> Perhaps, but that's not relevant. CSV is a serialisation format for
> tabular data, and is only
I'm trying to replace the built-in base exception class with a subclass
of itself in python 2.5 because we can no longer add attributes to that...
% python2.4 -c 'import exceptions; exceptions.Exception.bar = 1234'
% python2.5 -c 'import exceptions; exceptions.Exception.bar = 1234'
Traceback (m
Why would you do this? How to do it, if its even possible, is far
less important than if you should even attempt it in the first place.
On Dec 11, 2007, at 3:51 PM, Nishkar Grover wrote:
>
> I'm trying to replace a built-in exception type and here's a
> simplified
> example of what I was hopi
Similarly I would ask then, why would you want to set class
attributes on the built-in Exception classes?
On Dec 11, 2007, at 9:29 PM, Nishkar Grover wrote:
>
> I'm trying to replace the built-in base exception class with a
> subclass of itself in python 2.5 because we can no longer add
> a
Hi Greg,
> You can also use the MacOSX Character Palette to go hunting
> for unicode characters. You can get to it from Terminal using
> "Special Characters..." on the Edit menu. There's a search
> box down the bottom where you can enter part of the unicode
> name of a character, e.g. "GREEK" will
After reading the "which book" threads, looking to the references of
the page aforementioned and reading reviews on the books at
Amazon.com...the two finalists were of course the one from Lutz and
the one from Chun...a couple of comments here and there, tipped the
scale towards Chun's Python Progra
En Tue, 11 Dec 2007 09:01:30 -0300, Bruno Desthuilliers
<[EMAIL PROTECTED]> escribi�:
> Connolly a écrit :
>> Hey there, new Python user here.
>> [...] self.dialong.GetPath is created, after this it (would) goes into
>> a variable
>> and is stored in a config file I'm creating using the Config
"sturlamolden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| We could include optional static typing in
| Python, and have an optional static optimizing native compiler for
| selected portions of code.
Python 3 will have optional 'type' annotations, where 'type' includes
abstrac
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| On Dec 11, 2:28 pm, Steven D'Aprano <[EMAIL PROTECTED]
|
| > My ISP does a good job at filtering the spam from this newsgroup. If
| > yours does not, I feel your pain, but rather than replying to the spam
| > and changin
On Dec 12, 4:45 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "sturlamolden" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | We could include optional static typing in
> | Python, and have an optional static optimizing native compiler for
> | selected portions of code.
>
> Pyth
"sofeng" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I would like to use the following recipe to transpose a list of lists
| with different lengths.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410687
|
| Here is an example of what I would like to do:
|
| Python 2.5.1
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
||
| But loops that run at least once is a basic element of algorithms.
| Perhaps not as common as the zero or more times of the while loop, but
| still fundamental. It is a shame it has to be faked using:
|
| while Tru
"Ron Provost" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
But here's my problem, most of my coworkers, when they see my apps and
learn that they are written in Python ask questions like, "Why would you
write that in a scripting language?" Whenever I hear a comment like that I
John and Martin,
Thanks for your help. However, I have identified the culprit to be with
Apache and the command:
AddDefaultCharset utf-8
which forces my browser to utf-8 encoding.
It looks like your suggestions to change charset were incorrect. My example
works equally well with charset=utf
Are you looking for these kinds of tools?
In Debian:
icoutils - Extract MS Windows icons and cursors
I don't recall where I saw this:
FileJuicer - Extract images from Powerpoint, PDF, HTML, and CAB files
[EMAIL PROTECTED] wrote:
> I've been searching for a way to load an icon from an executabl
101 - 200 of 203 matches
Mail list logo