* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics -- like two TV sets that
look the same and work the same except when you open 'em up and poke around in
there, oh holy cow, in this one there's stuff th
Alf P. Steinbach wrote:
> * Peter Otten:
>> * Alf P. Steinbach wrote:
>>> * Peter Otten:
Every time someone has to read the code he will read, hesitate, read
again, and then hopefully come to the conclusion that the code does
nothing, consider not using it, or if it is not tied into
On Tue, Nov 3, 2009 at 1:44 PM, kylin wrote:
> I want to remove all the punctuation and no need words form a string
> datasets for experiment.
>
> I am new to python, please give me some clue and direction to write
> this code.
The `replace` method of strings should get you pretty far (just
repla
En Wed, 04 Nov 2009 03:15:14 -0300, Alf P. Steinbach
escribió:
* Steven D'Aprano:
On Wed, 04 Nov 2009 02:29:21 +0100, Alf P. Steinbach wrote:
For example, consider two rectangle classes R1 and R2, where R2 might
be a successor to R1, at some point in system evolution replacing R1.
R1 has log
Diez B. Roggisch-2 wrote:
>
> elca schrieb:
>> Hi,
>> im using win32com 's webbrowser module.
>> i have some question about it..
>> is it possible to disable image loading to speed up webpage load?
>> any help ,much appreciate
>> thanks in advance
>
> Use urllib2.
>
> Diez
> --
> http://mail
* Steven D'Aprano:
On Wed, 04 Nov 2009 02:29:21 +0100, Alf P. Steinbach wrote:
For example, consider two rectangle classes R1 and R2, where R2 might
be a successor to R1, at some point in system evolution replacing R1.
R1 has logical data members left, top, width and height, and R2 has
logical
En Wed, 04 Nov 2009 02:45:23 -0300, iu2 escribió:
On Nov 4, 3:10 am, "Gabriel Genellina" wrote:
txt = """
def foo(x):
print 'x=', x
def bar(x):
return x + x
"""
py> namespace = {}
py> exec txt in namespace
py> namespace.keys()
['__builtins__', 'foo', 'bar']
py> namespace['foo']('hell
En Wed, 04 Nov 2009 02:04:11 -0300, gopal mishra
escribió:
I have class structure as below. How can I create the following nested
class
and its properties dynamically.
class AA(object):
class BB(object):
def setBB1(self, value):
##some code
def getBB1(s
On Nov 4, 3:10 am, "Gabriel Genellina" wrote:
> En Tue, 03 Nov 2009 17:36:08 -0300, iu2 escribió:
>
>
>
>
>
> > On Nov 3, 7:49 pm, Matt McCredie wrote:
> >> iu2 elbit.co.il> writes:
>
> >> > Having a file called funcs.py, I would like to read it into a string,
> >> > and then import from that s
On Wed, 04 Nov 2009 02:29:21 +0100, Alf P. Steinbach wrote:
>>> For example, consider two rectangle classes R1 and R2, where R2 might
>>> be a successor to R1, at some point in system evolution replacing R1.
>>> R1 has logical data members left, top, width and height, and R2 has
>>> logical data m
On Tue, 03 Nov 2009 22:43:45 -0600, Robert Kern wrote:
> Steven D'Aprano wrote:
>> On Tue, 03 Nov 2009 10:22:28 -0500, J Kenneth King wrote:
>
>>> Adding in the loop construct and name bindings doesn't enhance my
>>> understanding of what a dot-product is. I don't need to see the loop
>>> constr
I have class structure as below. How can I create the following nested class
and its properties dynamically.
class AA(object):
class BB(object):
def setBB1(self, value):
##some code
def getBB1(self):
bb1 = #somecode
return bb1
Steven D'Aprano wrote:
On Tue, 03 Nov 2009 10:22:28 -0500, J Kenneth King wrote:
Adding in the loop construct and name bindings doesn't enhance my
understanding of what a dot-product is. I don't need to see the loop
construct at all in this case. A dot product is simply the
multiplication of
En Wed, 04 Nov 2009 01:02:24 -0300, Jonathan Haddad
escribió:
I've got a class, in the constructor it loads a CSV file from disc. I'd
like only 1 instance of the class to be instantiated. However, when
running
multiple unit tests, multiple instances of the class are created. What's
the
On Nov 3, 2009, at 7:06 PM, Gabriel Genellina wrote:
En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery
escribió:
If there was a place in the official docs for me to append these
nuggets of information to the sections for
"xml.etree.ElementTree.XML(text)" and
"xml.etree.ElementTree.dump(
Maybe I'm doing something wrong here, definitely not the most experienced
unit tester.
I've got a class, in the constructor it loads a CSV file from disc. I'd
like only 1 instance of the class to be instantiated. However, when running
multiple unit tests, multiple instances of the class are crea
En Wed, 04 Nov 2009 00:20:05 -0300, Someone Something
escribió:
I'm trying to write something related to IRC. The thing is, I have one
thread receiving and another sending. But, how can I keep the caller of
the
recv() function informed about what was last received so that it can all
be
pr
I'm trying to write something related to IRC. The thing is, I have one
thread receiving and another sending. But, how can I keep the caller of the
recv() function informed about what was last received so that it can all be
printed out. But, I no idea how I can accomplish this. I was thinking about
En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery escribió:
If there was a place in the official docs for me to append these nuggets
of information to the sections for "xml.etree.ElementTree.XML(text)" and
"xml.etree.ElementTree.dump(elem)" I would absolutely do so.
http://bugs.python.org/ a
On Nov 4, 1:06 pm, Kee Nethery wrote:
> On Nov 3, 2009, at 5:27 PM, John Machin wrote:
>
>
>
> > On Nov 4, 11:01 am, Kee Nethery wrote:
> >> Why is this not working and what do I need to do to use Elementtree
> >> with unicode?
>
> > What you need to do is NOT feed it unicode. You feed it a str
I need to remove the word if it appears in the paragraph twice. could
some give me some clue or some useful function in the python.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 03 Nov 2009 11:26:49 +, Simon Brunning wrote:
> 2009/11/1 Steven D'Aprano :
>>
>> The only stupid question is the one you are afraid to ask.
>
> I was once asked, and I quote exactly, "are there any fish in the
> Atlantic sea?"
>
> That's pretty stupid. ;-)
Once in the distant past,
On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian
wrote:
Hello,
I have been using freeze.py on 32 bit linux distributions without a
problem. But recently I tried to do the same on RHEL5 x86_64 and ran
into some issues.
1) When I ran the script, I got
Error: needed directory /usr/
kylin wrote:
I need to remove the word if it appears in the paragraph twice. could
some give me some clue or some useful function in the python.
Sounds like homework. To fail your class, use this one:
>>> p = "one two three four five six seven three four eight"
>>> s = set()
>>> print ' '.joi
On Nov 4, 11:01 am, Kee Nethery wrote:
> Having an issue with elementtree XML() in python 2.6.4.
>
> This code works fine:
>
> from xml.etree import ElementTree as et
> getResponse = u'''
> bobblehead city>city'''
> theResponseXml = et.XML(getResponse)
>
> This code errors out
En Tue, 03 Nov 2009 09:07:01 -0300, Henning Bredel
escribió:
On Tue, 03 Nov 2009 10:18:29 +, Steven D'Aprano wrote:
You need to give some actual examples of what you are trying to do, and
what you are expecting to happen. How is initialized() being called?
Example: Assume a framework w
En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery escribió:
Having an issue with elementtree XML() in python 2.6.4.
This code works fine:
from xml.etree import ElementTree as et
getResponse = u'''
bobbleheadcity>city'''
theResponseXml = et.XML(getResponse)
This code errors
Hi;
I have the following:
import calendar, datetime
myCal = calendar.calendar(6)
today = datetime.date.today()
day = today.day
mo = today.month
yr = today.year
month = myCal.monthdayscalendar(yr, mo)
The last line throws errors no matter how I try and tweak it. The current
incarnation complains
Ahmed Barakat wrote:
In case I have a huge datastore (1 entries, each entry has like 6
properties), what is the best way
to handle the search within such a huge datastore, and what if I want to
make a generic search, for example
you write a word and i use it to search within all properties I
I want to remove all the punctuation and no need words form a string
datasets for experiment.
I am new to python, please give me some clue and direction to write
this code.
--
http://mail.python.org/mailman/listinfo/python-list
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output=html
>
> ...snip...
>
> Are there major things I'm missing or misunderstanding?
A quick no
En Tue, 03 Nov 2009 12:29:10 -0300, Ask Solem
escribió:
If you have a module named myapp.django, and someone writes a cool
library called
django that you want to use, you can't use it unless you rename your
local django module.
file myapp/django.py:
from django.utils.functional import
* Diez B. Roggisch:
Alf P. Steinbach schrieb:
* Diez B. Roggisch:
Your comment about "computed" makes it more clear what that's all
about.
Also Bertrand Meyer (Eiffel language creator) had idea like that, he
called it "referential transparency". But I think when Python has this
nice property m
On Nov 3, 3:23 pm, Girish Venkatasubramanian
wrote:
> Will try that.
>
> Meanwhile I went ahead and used cx_freeze and that seems to work OK.
>
> Thanks for your help Rami and Marc-Andre.
Something that you might want to try in the future is GUI2Exe, which
allows you to play with a whole slew of
On Tue, 03 Nov 2009 09:59:32 -0800, Ethan Furman
wrote:
Simon Brunning wrote:
2009/11/1 Steven D'Aprano :
The only stupid question is the one you are afraid to ask.
I was once asked, and I quote exactly, "are there any fish in the
Atlantic sea?"
That's pretty stupid. ;-)
Are there
On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian
wrote:
I checked and ls /usr/lib64/python2.4/config/ returns
config.c config.c.in install-sh libpython2.4.a Makefile makesetup
python.o Setup Setup.config Setup.local
so I am guessing the python-devel installation went off OK, fro
On Nov 1, 10:15 am, rustom wrote:
> On Nov 1, 7:20 pm, Robinson wrote:
>
> > I have also just started with both Aquamacs and Python so I ask for
> > your patience as well.
> > When I evaluate the buffer (C-c C-C) I don't see any response or
> > output from my python program. Should another bu
On Tue, Nov 3, 2009 at 3:50 PM, iu2 wrote:
> On Nov 3, 5:58 pm, Jonathan Hartley wrote:
>> Hi,
>>
>> Recently I put together this incomplete comparison chart in an attempt
>> to choose between the different alternatives to py2exe:
>>
>> http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxV
On Tue, 03 Nov 2009 16:00:16 -, SD_V897 wrote:
I have a perplexing issue, I have four users set up on a W7 computer.
The program runs fine for all users except the admin user who needs it
for school assignments.
A little more information, please. How does it not work for the admin
use
On Tue, 03 Nov 2009 15:58:30 -, Daniel Fetchinson
wrote:
If yes, we are almost there! In our example the request of A only
makes sense if B is making an effort to fragment the community, in
other words, assuming that A tries to make a meaningful request, A is
assuming that B is making an
Having an issue with elementtree XML() in python 2.6.4.
This code works fine:
from xml.etree import ElementTree as et
getResponse = u'''
bobbleheadcity>city'''
theResponseXml = et.XML(getResponse)
This code errors out when it tries to do the et.XML()
from xml.etree impor
On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote:
En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery
escribió:
I've removed all the stuff in my code and tried to distill it down
to just what is failing. Hopefully I have not removed something
essential.
Sounds like I did remove somethi
MichaB Klich wrote:
Dnia wtorek 03 listopada 2009 o 20:50:10 Victor Subervi napisał(a):
Hi;
I have the following:
import calendar, datetime
myCal =alendar.calendar(6)
today =atetime.date.today()
day =oday.day
mo =oday.month
yr =oday.year
month =yCal.monthdayscalendar(yr, mo)
The last lin
fastPATX Panther is now out! It beats Firefox on startup and is very
lightweight you have to try it!
Download here: http://bitbucket.org/patx/fastpatx/fastpatx-panther.py
--
patx, python gui and web, http://patx.me
--
http://mail.python.org/mailman/listinfo/python-list
Hi Rami,
Thanks for pointing this out. I did see that point - but apart from
installing python-devel (which has created and populated
/usr/lib64/python2.4/...) I am not sure what I should do - is there
some setting in python where I can ask it to look at lib64 instead of
lib?
Thanks.
On Tue, Nov 3
Hello -- I am trying to compile Python 2.6.4 on a Power 5 PC with AIX
5.3. Here are the settings:
export OBJECT_MODE=64
export AR="ar -X64"
export MAKE=/usr/bin/gmake
export CC="gcc"
export CFLAGS="-maix64 -O2 -g -mcpu=power5"
export LDFLAGS="-L/usr/lib64 -L/opt/freeware/lib64
-L/opt/freeware/
On Nov 3, 7:49 pm, Matt McCredie wrote:
> iu2 elbit.co.il> writes:
>
>
>
> > Hi,
>
> > Having a file called funcs.py, I would like to read it into a string,
> > and then import from that string.
> > That is instead of importing from the fie system, I wonder if it's
> > possible to eval the text i
Simon Brunning wrote:
2009/11/1 Steven D'Aprano :
The only stupid question is the one you are afraid to ask.
I was once asked, and I quote exactly, "are there any fish in the Atlantic sea?"
That's pretty stupid. ;-)
Are there any fish in the Dead Sea?
~Ethan~
--
http://mail.python.org/m
On Tue, Nov 3, 2009 at 11:13 PM, kylin wrote:
> I need to remove the word if it appears in the paragraph twice. could
> some give me some clue or some useful function in the python.
Well, it depends a bit on what you call 'the same word' (In the
paragraph "Fly fly, fly!" does the word fly occur 0
thanks. that did the trick. in case anyone else is in the same boat as
myself, here are the relevant correspondences:
string <-> [int] bytes <-> [int]
---
--
lambda string: [ord(x) for x in string] list
lambda ints: ''.join([chr(x
Dnia wtorek 03 listopada 2009 o 20:50:10 Victor Subervi napisał(a):
> Hi;
> I have the following:
>
> import calendar, datetime
>
> myCal = calendar.calendar(6)
> today = datetime.date.today()
> day = today.day
> mo = today.month
> yr = today.year
> month = myCal.monthdayscalendar(yr, mo)
>
> Th
Rami Chowdhury wrote:
> On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian
> wrote:
>
>> Hello,
>> I have been using freeze.py on 32 bit linux distributions without a
>> problem. But recently I tried to do the same on RHEL5 x86_64 and ran
>> into some issues.
>>
>> 1) When I ran the sc
On Nov 3, 5:58 pm, Jonathan Hartley wrote:
> Hi,
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output...
>
> Columns represent methods of deploy
Girish Venkatasubramanian wrote:
> Hey Marc-Andre,
> Ummm - I have installed python-devel.x86_64 and checked that the
> /usr/lib64/python2.4/ is populated - anything else I can/shuld do to
> check/ensure the the devel rpm is installed?
If you have the config/ sub-dir in there, things should be
fin
Will try that.
Meanwhile I went ahead and used cx_freeze and that seems to work OK.
Thanks for your help Rami and Marc-Andre.
On Tue, Nov 3, 2009 at 12:31 PM, Rami Chowdhury
wrote:
> On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian
> wrote:
>
>> I checked and ls /usr/lib64/python2
Hey Marc-Andre,
Ummm - I have installed python-devel.x86_64 and checked that the
/usr/lib64/python2.4/ is populated - anything else I can/shuld do to
check/ensure the the devel rpm is installed?
Thanks.
On Tue, Nov 3, 2009 at 11:32 AM, M.-A. Lemburg wrote:
> Rami Chowdhury wrote:
>> On Tue, 03 No
On Nov 3, 2009, at 5:27 PM, John Machin wrote:
On Nov 4, 11:01 am, Kee Nethery wrote:
Having an issue with elementtree XML() in python 2.6.4.
This code works fine:
from xml.etree import ElementTree as et
getResponse = u'''
bobbleheadcity'''
theResponseXml = et.XML(getRespo
En Tue, 03 Nov 2009 17:36:08 -0300, iu2 escribió:
On Nov 3, 7:49 pm, Matt McCredie wrote:
iu2 elbit.co.il> writes:
> Having a file called funcs.py, I would like to read it into a string,
> and then import from that string.
> That is instead of importing from the fie system, I wonder if it's
Hello,
I have been using freeze.py on 32 bit linux distributions without a
problem. But recently I tried to do the same on RHEL5 x86_64 and ran
into some issues.
1) When I ran the script, I got
Error: needed directory /usr/lib/python2.4/config not found
2) Then I "yum install python-devel" which
On Nov 4, 12:14 pm, Kee Nethery wrote:
> On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote:
>
> > En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery
> > escribió:
>
> >> I've removed all the stuff in my code and tried to distill it down
> >> to just what is failing. Hopefully I have not remove
Daniel Fetchinson wrote:
I was referring to this comment by Ben:
"Suggestion: Please don't make efforts to fragment the community."
This IMHO is hostile, because it presupposes that the mere goal of the
OP is fragmenting the community
It presupposes nothing of any goal. It describes a predict
kylin wrote:
> I want to remove all the punctuation and no need words form a string
> datasets for experiment.
> I need to remove the word if it appears in the paragraph twice. could
> some give me some clue or some useful function in the python.
>>> para = u"""I need to remove the word if it ap
En Tue, 03 Nov 2009 10:06:24 -0300, Oltmans
escribió:
Hi, all. All I'm trying to do is to print the error message using the
following code (copying/pasting from IDLE).
try:
div(5,0)
except Exception as msg:
print msg
SyntaxError: invalid syntax
I'm using Python 2.5 on Windows XP.
I checked and ls /usr/lib64/python2.4/config/ returns
config.c config.c.in install-sh libpython2.4.a Makefile makesetup
python.o Setup Setup.config Setup.local
so I am guessing the python-devel installation went off OK, from what you say.
I looked at the freeze.py code and I see your point. But f
On 2009-11-03 07:29 AM, Cameron Laird wrote:
QOTW: "I consider "import *" the first error to be fixed ..." -
Robert
Kern, author of PyFlakes, a potential replacement for Pylint and
Pychecker,
on his personal style
http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2
I am n
Greetings!
I am happy to announce the latest release of python-dBase (dbf for
short)! At this point it supports dBase III and Visual FoxPro 6 dbf files.
It's a bit quicker now since it's using array.array to hold the records
and not strings, and the API has been standardized. It also now ha
iu2 elbit.co.il> writes:
>
> Hi,
>
> Having a file called funcs.py, I would like to read it into a string,
> and then import from that string.
> That is instead of importing from the fie system, I wonder if it's
> possible to eval the text in the string and treat it as a module.
>
> For exampl
On Tue, 03 Nov 2009 10:22:28 -0500, J Kenneth King wrote:
> However in this case the procedure by which we derive the value is not
> important or even interesting. It is much more succinct to think of the
> operation as a value and express it accordingly. There's no need to
> clutter the mind wi
On Tue, Nov 3, 2009 at 10:58 AM, Jonathan Hartley wrote:
> Hi,
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output=html
>
> Columns represent m
>> Since when is the mere suggestion that fragmentation will occur and if
>> that's a desirable consequence is hostile? The OP is not bound to it,
>> and I also don't see the tone used by the two immediate answerers being
>> hostile. Paul might have been terse - but hostility looks different IMHO.
I have a perplexing issue, I have four users set up on a W7 computer.
The program runs fine for all users except the admin user who needs it
for school assignments.
It's not a firewall issue as I've added localhost for pythomw.exe as allow.
I've done some data dumps using sysinternals process
Hi,
Recently I put together this incomplete comparison chart in an attempt
to choose between the different alternatives to py2exe:
http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output=html
Columns represent methods of deploying to end-users such that they
don't have to worry abo
>> I was referring to this comment by Ben:
>>
>> "Suggestion: Please don't make efforts to fragment the community."
>>
>> This IMHO is hostile, because it presupposes that the mere goal of the
>> OP is fragmenting the community
>
> It presupposes nothing of any goal. It describes a predictable resu
With respect to to original question regarding web frameworks +
database and Python 3, all the following have been available for
Python 3 since the day Python 3.0 was released:
QP, a Web Framework
http://pypi.python.org/pypi/qp/
Durus, a Python Object Database (the "default" in qp, for user
sessi
On 1 nov, 08:54, Dennis Lee Bieber wrote:
> On Sat, 31 Oct 2009 06:54:27 -0700 (PDT), Jaime Buelta
> declaimed the following in
> gmane.comp.python.general:
>
> > shouldn't be heard. Talks a guy that programmed a GUI on Motif using C
> > (plain old C) in 2003 and takes almost forever (one year an
On Nov 3, 1:52 am, Carl Banks wrote:
> On Oct 31, 7:12 am, kj wrote:
>
>
>
>
>
> > I'm running into an ugly bug, which, IMHO, is really a bug in the
> > design of Python's module import scheme. Consider the following
> > directory structure:
>
> > ham
> > |-- __init__.py
> > |-- re.py
> > `-- sp
Ben Finney writes:
> J Kenneth King writes:
>
>> Steven D'Aprano writes:
>>
>> > from operator import add
>> > map(add, operandlist1, operandlist2)
>>
>> This is the best solution so far.
>
> Strange to say it's a solution, when it doesn't solve the stated
> problem: to replace use of ‘map()’ w
On 3 Nov, 01:14, Collin D wrote:
> Thanks for the replies. Pyparsing looks just like what I need.
The cmd module in the standard library is fine for simple command
interpreters. Depending on your needs you might find it does what you
want. Doug Hellmann has covered it in his "Python module of the
Lorenzo Gatti wrote:
> On Nov 1, 8:06 am, Saketh wrote:
>> Hi everyone,
>>
>> I am proud to announce the release of Pyfora (http://pyfora.org), an
>> online community of Python enthusiasts to supplement comp.lang.python
>> and #python. While the site is small right now, please feel free to
>> regi
Terry Reedy wrote:
What immutability has to do with identity is that 'two' immutable
objects with the same value *may* actually be the same object,
*depending on the particular version of a particular implementation*.
t1 = (1,2,3) # an immutable object
t2 = (1,2,3) # another immutable objec
Ahmed Barakat wrote:
In case I have a huge datastore (1 entries, each entry has like 6
properties)
Can you show some sample entries? That way we can get an idea how your
datastore looks like.
By the way, 1 doesn't sound that much. At work I create python
programs which do data pr
Daniel Fetchinson writes:
> I was referring to this comment by Ben:
>
> "Suggestion: Please don't make efforts to fragment the community."
>
> This IMHO is hostile, because it presupposes that the mere goal of the
> OP is fragmenting the community
It presupposes nothing of any goal. It describes
In case I have a huge datastore (1 entries, each entry has like 6
properties), what is the best way
to handle the search within such a huge datastore, and what if I want to
make a generic search, for example
you write a word and i use it to search within all properties I have for all
entries?
Oltmans writes:
> try:
> div(5,0)
> except Exception as msg:
> print msg
The name ‘msg’ here is misleading. The except syntax does *not* bind the
target to a message object, it binds the target to an exception object.
It would be clearer to write the above code as:
try:
div
Vladimir Ignatov wrote:
> Hi,
>
> "except Exception as variable"
>
> is a new python-3 syntax.
>
> You should use "except Exception, variable" syntax in 2.x series.
Not entirely true. This feature has been backported to python2.6 as well.
Diez
--
http://mail.python.org/mailman/listinfo/pytho
QOTW: "I consider "import *" the first error to be fixed ..." -
Robert
Kern, author of PyFlakes, a potential replacement for Pylint and
Pychecker,
on his personal style
http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2
Python 2.6.4 is out; it fixes some small but impor
I don't have Python 25 on my computer, but since codepad.org is using Python
2.5.1, I did a quick test:
# input
try:
raise Exception("Mrraa!")
except Exception as msg:
print msg
# output
t.py:3: Warning: 'as' will become a reserved keyword in Python 2.6
Line 3
except Exception as ms
Lawrence D'Oliveiro wrote:
> In message , Carsten
> Haese wrote:
>
>> With all due respect, but if your experience is exclusive to
>> MySQL/MySQLdb, your experience means very little for database
>> programming practices in general.
>
> I wonder about the veracity of your claims, because:
>
>> A
Hi,
"except Exception as variable"
is a new python-3 syntax.
You should use "except Exception, variable" syntax in 2.x series.
Vladimir Ignatov
On Tue, Nov 3, 2009 at 4:06 PM, Oltmans wrote:
> Hi, all. All I'm trying to do is to print the error message using the
> following code (copying/pa
On 11/3/09, Diez B. Roggisch wrote:
> Daniel Fetchinson schrieb:
>> If you have any suggestions, let me know -- this is a community
>> effort!
> Suggestion: Please don't make efforts to fragment the community.
When a community grows and consequently its needs also grow, how do
>>>
QOTW: "I consider "import *" the first error to be fixed ..." - Robert
Kern, author of PyFlakes, a potential replacement for Pylint and Pychecker,
on his personal style
http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2
Python 2.6.4 is out; it fixes some small b
Hi, all. All I'm trying to do is to print the error message using the
following code (copying/pasting from IDLE).
def div(a,b):
print a/b
try:
div(5,0)
except Exception as msg:
print msg
but IDLE says (while highlighting the 'as' keyword)
except Exception as msg:
SyntaxError: i
On Oct 30, 8:53 am, Bruno Desthuilliers wrote:
> Robert Kern a écrit :> On 2009-10-29 16:52 PM, Aahz wrote:
> (snip)
> >> Coincidentally, I tried PyFlakes yesterday and was unimpressed with the
> >> way it doesn't work with "import *".
>
> > I consider "import *" the first error to be fixed, so it
Hi,
Having a file called funcs.py, I would like to read it into a string,
and then import from that string.
That is instead of importing from the fie system, I wonder if it's
possible to eval the text in the string and treat it as a module.
For example
with file('funcs.py') as f: txt = r.read()
Diez, Gabriel, Steven,
thanks for your answers. I'll mainly give response in this posting, so
I hope not repeating myself.
On Tue, 03 Nov 2009 10:18:29 +, Steven D'Aprano wrote:
> On Tue, 03 Nov 2009 09:41:37 +, Henning Bredel wrote:
>
>> Now I'd like to call methods like `initialize(p
"Diez B. Roggisch" writes:
> Don't get me wrong - innovation often comes from scratching ones
> personal itch. But you seem to be suffering from a rather bad case of
> neurodermatitis.
+1 QOTW
--
\ “For my birthday I got a humidifier and a de-humidifier. I put |
`\ them in the same ro
Peng Yu wrote:
> On Mon, Nov 2, 2009 at 9:39 PM, alex23 wrote:
>> Peng Yu wrote:
>>> I don't think that this is a problem that can not be overcome. A
>>> simple solution might be to associate a unique identifier to each
>>> file, so that even the filename has been changed, the new version and
>>
There is an online service at http://www.depython.com converting pyc
files to py.
You can give it a try.
It does not have file size limit.
On Wed, Oct 21, 2009 at 8:58 PM, Chris Rebert wrote:
> On Wed, Oct 21, 2009 at 11:35 AM, Peng Yu wrote:
>> On Tue, Oct 20, 2009 at 4:42 PM, Diez B. Roggisch
2009/11/1 Steven D'Aprano :
>
> The only stupid question is the one you are afraid to ask.
I was once asked, and I quote exactly, "are there any fish in the Atlantic sea?"
That's pretty stupid. ;-)
--
Cheers,
Simon B.
--
http://mail.python.org/mailman/listinfo/python-list
Kee Nethery wrote:
> I just noticed the tag line "a place for Python". Looked it up online
> (http://pyfora.org/) and it will be interesting to see if it can fill
> the void that I experience (no centralized place to post and view user
> submitted sample code) in the existing Python community.
The
1 - 100 of 115 matches
Mail list logo