The Pyevolve v.0.5 was released.
Pyevolve was developed to be a complete genetic algorithms framework
written in pure python.
More information at: http://pyevolve.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
On Jan 23, 11:45 pm, Bryan Olson fakeaddr...@nowhere.org wrote:
Carl Banks wrote:
Classes in Python are mutable types, usually. Class instances are
(except for the refcount) immutable objects, usually.
There's where we disagree. I assert that class instances are usually
mutable objects.
En Sat, 24 Jan 2009 05:24:15 -0200, Kay Schluehr kay.schlu...@gmx.net
escribió:
1. I'd expected that absolute imports are used in Python 3.0 by
default. I may be wrong. I've written two versions of a module
sucks.py
sucks.py
-
print (import from lib.sucks)
sucks.py
-
Carl Banks pavlovevide...@gmail.com writes:
On Jan 23, 11:45 pm, Bryan Olson fakeaddr...@nowhere.org wrote:
Carl Banks wrote:
Classes in Python are mutable types, usually. Class instances are
(except for the refcount) immutable objects, usually.
There's where we disagree. I assert that
En Sat, 24 Jan 2009 06:06:02 -0200, Carl Banks pavlovevide...@gmail.com
escribió:
On Jan 23, 11:45 pm, Bryan Olson fakeaddr...@nowhere.org wrote:
Carl Banks wrote:
Classes in Python are mutable types, usually. Class instances are
(except for the refcount) immutable objects, usually.
Steven D'Aprano wrote:
I'm interested in this ticket in the bug tracker:
http://bugs.python.org/issue2527
but it seems to have been stalled for nine months. Is there a procedure
for starting it up again? Should I ask about it on the python-dev mailing
list, or just wait until somebody
Hrvoje Niksic hnik...@xemacs.org writes:
Not only registered at the beginning of the function, but also (since
CPython uses C, not C++) explicitly unregistered at every point of
exit from the function. Emacs implements these as macros called GCPRO
and UNGCPRO, and they're very easy to get
Hello,
I'm new in Python and i would like to write script which need to login
to a website. I'm experimenting with urllib2,
especially with something like this:
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
urllib2.install_opener(opener)
params =
Benjamin Peterson wrote:
Robin Becker robin at NOSPAMreportlab.com writes:
Well that's not really acceptable as a solution is it? :)
This doesn't happen in Python 3.0,
so you could port to that. :)
In 2.7, the better recursion depth
handling
in Py3k may be backported,but the
best you
Aahz wrote:
In article mailman.7801.1232715276.3487.python-l...@python.org,
Steve Holden st...@holdenweb.com wrote:
I understand what you are saying, but if the id() associated with a name
doesn't change after augmented assignment it seems a little wrong-headed
to argue that the augmented
Steven D'Aprano wrote:
On Fri, 23 Jan 2009 20:33:45 -0500, Steve Holden wrote:
Steven D'Aprano wrote:
On Fri, 23 Jan 2009 14:58:34 -0500, Gerald Britton wrote:
Hi -- Some time ago I ran across a comment recommending using var is
None instead of var == None (also var is not None, etc.)
On 24 Jan., 09:21, Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
If you run A.py as a script, it does not know it lives inside a package.
You must *import* A for it to become aware of the package.
Also, the directory containing the script comes earlier than PYTHONPATH
entries in sys.path --
Steve Holden wrote:
Benjamin Peterson wrote:
Robin Becker robin at NOSPAMreportlab.com writes:
Well that's not really acceptable as a solution is it? :)
This doesn't happen in Python 3.0,
so you could port to that. :)
my initial attempts in this direction were even less successful :(
En Sat, 24 Jan 2009 06:52:57 -0200, Gabriel dun...@dreams.sk escribió:
I'm new in Python and i would like to write script which need to login
to a website. I'm experimenting with urllib2,
especially with something like this:
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
Carl Banks wrote:
On Jan 23, 8:22 pm, Bryan Olson fakeaddr...@nowhere.org wrote:
Paul Rubin wrote:
Bryan Olson writes:
BTW, class instances are usually immutable and thus don't require a
mutex in the system I described.
Then you are describing a language radically different from Python.
Gabriel wrote:
Hello,
I'm new in Python and i would like to write script which need to login
to a website. I'm experimenting with urllib2,
especially with something like this:
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
urllib2.install_opener(opener)
Martin P. Hellwig martin.hell...@dcuktec.org wrote:
Or you can argue that even when an argument is repeated indefinitely it
doesn't make it suddenly right.
This is no good.
It's a well known fact that anything I tell you three times is true.
To demonstrate:
Tim Rowe's post earlier in this
On Fri, 23 Jan 2009 21:36:59 -0500, Luis Zarrabeitia wrote:
Quoting Steven D'Aprano st...@remove-this-cybersource.com.au:
On Fri, 23 Jan 2009 13:07:55 -0500, Luis Zarrabeitia wrote:
It should be in _our_ power as the team of all participant coders on
_our_ project to decide if we should
On Sat, Jan 24, 2009 at 12:28 AM, Roumen Petrov
I would better use SCons for both unix and windows builds. In case of
windows for both compilers - mingw and microsoft ones. To port curses
extension to windows I need to know what gcc options mean, what are
the rules to write Makefiles and how
First, thank you both
I think this isn't basic auth, because this page has form login.
I read site's html source and used wireshark to analyze communication
between my browser and website and i really find out that a was ignoring
one field
I added it to the parameters but it didn't help..
Oh, nevermind, it's working.
Thanks
Gabriel wrote:
First, thank you both
I think this isn't basic auth, because this page has form login.
I read site's html source and used wireshark to analyze communication
between my browser and website and i really find out that a was ignoring
one field
On Jan 23, 8:57 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Fri, 23 Jan 2009 01:48:32 -0800 (PST), TheFlyingDutchman
zzbba...@aol.com declaimed the following in comp.lang.python:
abstraction. In Python, all class attributes are public but names may
be mangled to discourage
Gabriel wrote:
First, thank you both
I think this isn't basic auth, because this page has form login.
I read site's html source and used wireshark to analyze communication
between my browser and website and i really find out that a was ignoring
one field
I added it to the parameters but
Hi,
I have some 3.0 code, which I would like to make work with 2.6.
However, there does not seem to be support for the new super() (no
args) via __future__. Is that correct? If so, what's the best way to
handle this?
Thanks,
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
Yep, i realize this a minute after posting, sorry.
And thank you again .)
Steve Holden wrote:
Gabriel wrote:
First, thank you both
I think this isn't basic auth, because this page has form login.
I read site's html source and used wireshark to analyze communication
between my browser and
Hello everyone,
From time to time I spot an asterisk (*) used in the Python code
_outside_ the usual *args or **kwargs application.
E.g. here: http://www.norvig.com/python-lisp.html
def transpose (m):
return zip(*m)
transpose([[1,2,3], [4,5,6]])
[(1, 4), (2, 5), (3, 6)]
What does *m mean
From time to time I spot an asterisk (*) used in the Python code
_outside_ the usual *args or **kwargs application.
E.g. here: http://www.norvig.com/python-lisp.html
def transpose (m):
return zip(*m)
transpose([[1,2,3], [4,5,6]])
[(1, 4), (2, 5), (3, 6)]
What does *m mean in this
Hi all,
I start to use this module in order to produce xml( and the make other
things), but differently from gccxml I don't find the variable that
set the name of the xml output file after the parsing (in gccxml is -
fxml), so it creates temporary files.
how can I do an Is there a tutorial that
andrew cooke andrew at acooke.org writes:
Hi,
I have some 3.0 code, which I would like to make work with 2.6.
However, there does not seem to be support for the new super() (no
args) via __future__. Is that correct? If so, what's the best way to
handle this?
Just use the two argument
On 24 Jan., 13:31, mk mrk...@gmail.com wrote:
Hello everyone,
From time to time I spot an asterisk (*) used in the Python code
_outside_ the usual *args or **kwargs application.
E.g. here:http://www.norvig.com/python-lisp.html
def transpose (m):
return zip(*m)
transpose([[1,2,3],
W. eWatson wrote:
r wrote:
here is a good explanation of control vars:
http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html
Here are 3 great Tkinter refernces in order:
http://infohost.nmt.edu/tcc/help/pubs/tkinter/
http://effbot.org/tkinterbook/
On Jan 24, 10:39 am, Benjamin Peterson benja...@python.org wrote:
andrew cooke andrew at acooke.org writes:
Hi,
I have some 3.0 code, which I would like to make work with 2.6.
However, there does not seem to be support for the new super() (no
args) via __future__. Is that correct?
On Fri, Jan 23, 2009 at 6:16 PM, Xah Lee xah...@gmail.com wrote:
The haskell tutorials you can find online are the most mothefucking
stupid unreadable fuck. The Haskll community is almost stupid. What
they talk all day is about monads, currying, linder myer fuck type.
That's what they talk
On Thu, 22 Jan 2009 10:11:37 -0800 (PST)
Raymond Hettinger pyt...@rcn.com wrote:
The collections module in Python 2.7 and Python 3.1 has gotten a new
Counter class that works like bags and multisets in other languages.
I like that! Now that we have a multiset or Counter I think a
redefinition
Tobiah wrote:
Where can I read about
this mysterious use of the '*'?
Hmmm... that's a harder question than I thought. Am I missing it, or
does Python's doc need a write-up of the extended call syntax?
It only works in the
context of the zip() function. It's hard to understand
how the
On Jan 21, 1:06 pm, soul.mirr...@gmail.com soul.mirr...@gmail.com
wrote:
On Dec 4 2008, 5:11 am, Andreas Waldenburger geekm...@usenot.de
wrote:
I vaguely remember you plonking [Xah Lee] before. Did you unplonk him in
the meantime? Or was that just a figure of speech?
teasingly yours,
/W
I have a short peace of code that is not doing what I expect. when I assign
a value to a list in a list alist[2][4]=z this seems replace all the 4
elements in all the sub lists. I assume it is supposed to but this is not
what I expect. How would I assign a value to the 4th element in the 2nd
Hi all,
I am developing spell checker for my local language(tamil) using python.
I need to generate alternative word list for a miss-spelled word from the
dictionary of words.The alternatives must be as much as closer to the
miss-spelled word.As we know, ordinary string comparison wont work here
Hi,
Am I going to have problems if I use urlopen() in a loop to get data
from 3000+ URLs? There will be about 2KB of data on average at each
URL. I will probably run the script about twice per day. Data from
each URL will be saved to my database.
I'm asking because I've never opened that many
andrew cooke andrew at acooke.org writes:
Unfortunately, metaclass= is a syntax error in 2.6 so the following
still fails:
from sys import version
if version.startswith('2.'):
class Matcher():
pass
else:
class Matcher(metaclass=ABCMeta):
pass
I would suggest
Gabriel wrote:
Yep, i realize this a minute after posting, sorry.
And thank you again .)
A pleasure. Next time, you might consider posting an explanation along
with the it's working now message, just to give closure to the thread
for anyone who ends up reading it later after a search.
Good
Vincent Davis wrote:
I have a short peace of code that is not doing what I expect. when I
assign a value to a list in a list alist[2][4]=z this seems replace all
the 4 elements in all the sub lists. I assume it is supposed to but this
is not what I expect. How would I assign a value to the 4th
vinc...@vincentdavis.net wrote:
I have a short peace of code that is not doing what I expect. when I
assign a value to a list in a list alist[2][4]=z this seems replace
all the 4 elements in all the sub lists. I assume it is supposed to
but this is not what I expect. How would I assign a value
Kay Schluehr wrote:
On 24 Jan., 09:21, Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
If you run A.py as a script, it does not know it lives inside a package.
You must *import* A for it to become aware of the package.
Also, the directory containing the script comes earlier than PYTHONPATH
webcomm wrote:
Hi,
Am I going to have problems if I use urlopen() in a loop to get data
from 3000+ URLs? There will be about 2KB of data on average at each
URL. I will probably run the script about twice per day. Data from
each URL will be saved to my database.
I'm asking because I've
Using python 2.4.4 on OpenSolaris 2008.11
I have the following string created by opening a url that has the
following string in it:
td[ct] = [[ ... ]];\r\n
The ... above is what I'm interested in extracting which is really a
whole bunch of text. So I think the regex \[\[(.*)\]\]; should do
Good day.
Might someone comment on why %f is not accepted as a valid field
directive in:
from datetime import datetime
created=2009-01-24 16:04:55.882788
dt = datetime.strptime(created,%Y-%m-%d %H:%M:%S.%f)
Traceback (most recent call last):
File stdin, line 1, in module
File
Sean Brown sbrown.h...@[spammy] gmail.com wrote in message
news:glflaj$qr...@nntp.motzarella.org...
Using python 2.4.4 on OpenSolaris 2008.11
I have the following string created by opening a url that has the
following string in it:
td[ct] = [[ ... ]];\r\n
The ... above is what I'm
W. eWatson wrote:
W. eWatson wrote:
r wrote:
here is a good explanation of control vars:
http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html
Here are 3 great Tkinter refernces in order:
http://infohost.nmt.edu/tcc/help/pubs/tkinter/
http://effbot.org/tkinterbook/
Gabriel wrote:
Yep, i realize this a minute after posting, sorry.
And thank you again .)
Steve Holden wrote:
...
I'll offer a couple of pointers about what we all expect here.
Please treat this as advice, not a shout of disapproval.
(1) Do not top post (put your response above the previous
Bryan Olson wrote:
Tobiah wrote:
Where can I read about
this mysterious use of the '*'?
Hmmm... that's a harder question than I thought. Am I missing it, or
does Python's doc need a write-up of the extended call syntax?
No, you aren't mistaken. Looking at the * symbol in the 2.6
Mark.Petrovic wrote:
Good day.
Might someone comment on why %f is not accepted as a valid field
directive in:
from datetime import datetime
created=2009-01-24 16:04:55.882788
dt = datetime.strptime(created,%Y-%m-%d %H:%M:%S.%f)
Traceback (most recent call last):
File stdin, line 1, in
Mark Tolonen wrote:
Sean Brown sbrown.h...@[spammy] gmail.com wrote in message
news:glflaj$qr...@nntp.motzarella.org...
Using python 2.4.4 on OpenSolaris 2008.11
I have the following string created by opening a url that has the
following string in it:
td[ct] = [[ ... ]];\r\n
The ...
I have following packet format which I have to send over Bluetooth.
packet_type (1 byte unsigned) || packet_length (1 byte unsigned) ||
packet_data(variable)
How to construct these using python data types, as int and float have
no limits and their sizes are not well defined.
--
Sean Brown sbrown.h...@[spammy]gmail.com wrote:
The problem is it appears that python is escaping the \ in the regex
because I see this:
reg = '\[\[(.*)\]\];'
The first trick of working with regexes in Python is to *always* use raw
strings. Instead of
reg = '\[\[(.*)\]\];'
you want
reg =
Sean Brown wrote:
I have the following string ...: td[ct] = [[ ... ]];\r\n
The ... (representing text in the string) is what I'm extracting
So I think the regex \[\[(.*)\]\]; should do it.
The problem is it appears that python is escaping the \ in the regex
because I see this:
reg =
On Jan 24, 2:32 pm, Benjamin Peterson benja...@python.org wrote:
I would suggest that you use the 2.6 syntax, and run 2to3 -f metaclass on
your
code. (ABCs have been backported to 2.6.)
Thanks - with that hint I found this -
Hi,
Kindly help.
import sys, os, string
*SVNLOOK_PATH=os.system('which svnlook')*
def main(repos, txn):
svnlook_cmd = '%s log -t %s %s' % (*SVNLOOK_PATH*, txn, repos)
check_msg = os.popen(svnlook_cmd, 'r').readline().rstrip('\n')
if len(check_msg) 10:
sys.stderr.write
Mark.Petrovic mspetro...@gmail.com writes:
Might someone comment on why %f is not accepted as a valid field
directive in:
from datetime import datetime
created=2009-01-24 16:04:55.882788
dt = datetime.strptime(created,%Y-%m-%d %H:%M:%S.%f)
Traceback (most recent call last):
File stdin,
I have following packet format which I have to send over Bluetooth.
packet_type (1 byte unsigned) || packet_length (1 byte unsigned) ||
packet_data(variable)
How to construct these using python data types, as int and float have
no limits and their sizes are not well defined.
Check out the
On Sat, Jan 24, 2009 at 2:03 PM, Jay Jesus Amorin jay.amo...@gmail.comwrote:
Hi,
Kindly help.
import sys, os, string
*SVNLOOK_PATH=os.system('which svnlook')*
Read the docs on os.system. It returns the program's return code, not the
child processes stdout. Use the subprocess module.
Roy Smith wrote:
[snip]
Another trick when you're not 100% what you're looking at is to
explode the string like this:
[c for c in reg]
['\\', '[', '\\', '[', '(', '.', '*', ')', '\\', ']', '\\', ']', ';']
A shorter way is list(reg).
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 23 Jan 2009 14:55:36 -0200, Gabriel Genellina wrote:
En Fri, 23 Jan 2009 14:36:46 -0200, Peter Pearson
ppear...@nowhere.invalid escribió:
On Thu, 22 Jan 2009 20:58:14 -0200, Gabriel Genellina wrote:
En Mon, 19 Jan 2009 21:57:04 -0200, Peter Pearson
ppear...@nowhere.invalid escribió:
packet_type (1 byte unsigned) || packet_length (1 byte unsigned) ||
packet_data(variable)
How to construct these using python data types, as int and float have
no limits and their sizes are not well defined.
In Python 2.x, use the regular string type: chr(n) will create a single
byte, and
Ravi packet_type (1 byte unsigned) || packet_length (1 byte unsigned) ||
Ravi packet_data(variable)
Ravi How to construct these using python data types, as int and float have
Ravi no limits and their sizes are not well defined.
Take a look at the struct and ctypes modules.
--
Hi!
I downloaded Python64 for Windows Vista64 but the value returned from
sys.maxint is just a 32bit integer. I found out, thats by design,
Microsoft decided to make the long value 32bit. What can I do to
compile python 2.6 with maxint of 64bit integers?
Can I replace the int values to a int64
Thanks for the info. I did not know that.
Thanks
Vincent Davis
On Sat, Jan 24, 2009 at 10:46 AM, Steve Holden st...@holdenweb.com wrote:
Vincent Davis wrote:
I have a short peace of code that is not doing what I expect. when I
assign a value to a list in a list alist[2][4]=z this seems
On Jan 24, 12:40 am, Gabriel Genellina gagsl-...@yahoo.com.ar
wrote:
En Sat, 24 Jan 2009 06:06:02 -0200, Carl Banks pavlovevide...@gmail.com
escribió:
On Jan 23, 11:45 pm, Bryan Olson fakeaddr...@nowhere.org wrote:
Carl Banks wrote:
Classes in Python are mutable types, usually.
I downloaded Python64 for Windows Vista64 but the value returned from
sys.maxint is just a 32bit integer. I found out, thats by design,
Microsoft decided to make the long value 32bit. What can I do to
compile python 2.6 with maxint of 64bit integers?
At a minimum, you need to change ob_ival
Hi!
Thanks for the fast answer. Yes, its enough but I never thought that
Vista64 is not a real 64-bit operating system :-o.
--
http://mail.python.org/mailman/listinfo/python-list
Some time ago I discovered this difference between regular expressions
in Python and Perl:
Python
\A matches at start of string
\Z matches at end of string
Perl
\A matches at start of string
\Z matches before terminal newline or at end of string
\z
On Jan 24, 12:33 am, Hrvoje Niksic hnik...@xemacs.org wrote:
Carl Banks pavlovevide...@gmail.com writes:
Anyway, all you're doing is distracting attention from my claim that
instance objects wouldn't need to be locked. They wouldn't, no
matter how mutable you insist these objects whose
On Jan 24, 12:24 pm, Carl Banks pavlovevide...@gmail.com wrote:
On Jan 24, 12:33 am, Hrvoje Niksic hnik...@xemacs.org wrote:
Carl Banks pavlovevide...@gmail.com writes:
Anyway, all you're doing is distracting attention from my claim that
instance objects wouldn't need to be locked. They
On Jan 24, 12:05 pm, Carl Banks pavlovevide...@gmail.com wrote:
The default metatype for Python classes would be
mutable_dict_type, which is a type wherein the object itself would be
mutable but it would still have all the mutator methods __init__,
__setattr__, etc., but they could only act on
unine...@gmail.com wrote:
The attributes are right, but the getter are not working. The problem
is that the lambda function always execute the last parameter passed
for all instances of the methods. How could it be done the right way?
Basically, don't use a lambda. Create a real, local
Casey Hawthorne wrote:
Is there anyway Vpython and pyODE can be made to work with newer
versions of Python 2.6.1 etc. without a lot of changes to source code?
I suppose I'm thinking of an extra layer of indirection, which might
slow things down to much.
Aren't this just Python libraries that
On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote:
I just started using python last week and I'm addicted.
you need to try this:
import antigravity
http://xkcd.com/353/
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way to slice a string with a tuple without unpacking
the tuple?
myString = 111-222-333-444
myString[ 4: 7 ]
'222'
Is there some way I could perform an identical slicing operation
with a tuple like ( 4, 7 ) without having to unpack the tuple?
myTuple = ( 4, 7 )
Thanks!
Malcolm
--
On Sat, Jan 24, 2009 at 5:31 PM, pyt...@bdurham.com wrote:
Is there a way to slice a string with a tuple without unpacking the tuple?
myString = 111-222-333-444
myString[ 4: 7 ]
'222'
Is there some way I could perform an identical slicing operation with a
tuple like ( 4, 7 ) without
On Sat, Jan 24, 2009 at 5:35 PM, Lie Ryan lie.1...@gmail.com wrote:
On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote:
I just started using python last week and I'm addicted.
you need to try this:
import antigravity
http://xkcd.com/353/
Just be careful with that. That guy was
pyt...@bdurham.com wrote:
Is there a way to slice a string with a tuple without unpacking the tuple?
myString = 111-222-333-444
myString[ 4: 7 ]
'222'
Is there some way I could perform an identical slicing operation with a
tuple like ( 4, 7 ) without having to unpack the tuple?
Benjamin,
Use the built-in slice.
Perfect!! That's exactly what I was looking for - I didn't know
this object existed.
What's wrong with unpacking the tuple?
I'm extracting fields from a huge, multi-gig log file. I was
trying to avoid doing something like myString[ myTuple[ 0 ]:
myTuple[ 1 ] )
MRAB,
Does myString[myTuple[0] : myTuple[1]] count as unpacking?
I'm not sure my use of the term 'unpacking' was totally correct, but,
yes, that's what I was hoping to avoid with a simpler solution.
then how about myString.__getslice__(*myTuple)?
Very interesting.
I'm going to try Ben's
Hi all,
I ran into a strange case.
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
...
>>> -1 == True
False
>>> -1 == False
False
This works though:
>>> if -1:
print "OK"
OK
After some head scratching, I realized that:
- bool is a subclass of int and
En Sat, 24 Jan 2009 17:03:33 -0200, Jay Jesus Amorin
jay.amo...@gmail.com escribió:
*SVNLOOK_PATH=os.system('which svnlook')*
You've been told what's wrong with that. But instead of fixing how to
invoke which, use distutils.spawn.find_executable instead:
py from distutils.spawn import
Hi All,
I played the demo of webbrowser module, with the code below:
import webbrowser
url = 'https://login.yahoo.com'
webbrowser.open_new_tab(url)
when I ran the code, it popped out a webpage nicely. I want to go
further: to get the source code of the webpage being displayed. Is it
possible to
hello,
I can assign a value to more than 1 variable (name) in one line:
a = b = 3
So evaluation of this line must start at the right part.
But the following is not allowed:
b = 2
a = b += 1
I would think that if b has a value,
and the formula is evaluated from right to left,
there's nothing
En Sat, 24 Jan 2009 18:23:51 -0200, MRAB goo...@mrabarnett.plus.com
escribió:
Some time ago I discovered this difference between regular expressions
in Python and Perl:
Python
\A matches at start of string
\Z matches at end of string
Perl
\A matches at start of
Benjamin Kaplan wrote:
On Sat, Jan 24, 2009 at 5:35 PM, Lie Ryan lie.1...@gmail.com
mailto:lie.1...@gmail.com wrote:
On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote:
I just started using python last week and I'm addicted.
you need to try this:
import antigravity
Stef Mientki wrote:
hello,
I can assign a value to more than 1 variable (name) in one line:
a = b = 3
So evaluation of this line must start at the right part.
But the following is not allowed:
b = 2
a = b += 1
I would think that if b has a value, and the formula is evaluated
from right to
Gabriel Genellina wrote:
En Sat, 24 Jan 2009 18:23:51 -0200, MRAB goo...@mrabarnett.plus.com
escribió:
Some time ago I discovered this difference between regular expressions
in Python and Perl:
Python
\A matches at start of string
\Z matches at end of string
Perl
\A
Terry Reedy wrote:
Benjamin Kaplan wrote:
On Sat, Jan 24, 2009 at 5:35 PM, Lie Ryan lie.1...@gmail.com
mailto:lie.1...@gmail.com wrote:
On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote:
I just started using python last week and I'm addicted.
you need to try this:
On 2009-01-24 17:00, oktaysa...@superonline.com wrote:
Hi all,
I ran into a strange case.
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
...
-1 == True
False
-1 == False
False
This works though:
if -1:
print OK
OK
After some head scratching, I
On 2009-01-23 22:25, Aahz wrote:
In articlemailman.7865.1232765899.3487.python-l...@python.org,
Linuxguy123linuxguy...@gmail.com wrote:
I just started using python last week and I'm addicted.
Welcome! Just be aware that excessive Perl-bashing is considered
somewhat tasteless on this
Muddy Coder cosmo_general at yahoo.com writes:
I want to go
further: to get the source code of the webpage being displayed. Is it
possible to do it? I tried webbrow.get() but didn't work. Somebody can
help? Thanks!
To do this, you actually need to fetch the page yourself:
import urllib2
On Jan 25, 5:59 am, Scott David Daniels scott.dani...@acm.org wrote:
Sean Brown wrote:
I have the following string ...: td[ct] = [[ ... ]];\r\n
The ... (representing text in the string) is what I'm extracting
So I think the regex \[\[(.*)\]\]; should do it.
The problem is it appears
Stef Mientki wrote:
hello,
I can assign a value to more than 1 variable (name) in one line:
a = b = 3
So evaluation of this line must start at the right part.
But the following is not allowed:
b = 2
a = b += 1
This strikes me as slightly incoherent. Given that v op=exp is mostly
that
MRAB google at mrabarnett.plus.com writes:
Does myString[myTuple[0] : myTuple[1]] count as unpacking? If it does,
then how about myString.__getslice__(*myTuple)?
Please don't use special method names directly and especially not
__getslice__(). It's deprecated and will be removed.
--
On Jan 25, 7:23 am, MRAB goo...@mrabarnett.plus.com wrote:
Some time ago I discovered this difference between regular expressions
in Python and Perl:
Python
\A matches at start of string
\Z matches at end of string
Perl
\A matches at start of string
\Z
On Jan 24, 10:56 am, Hrvoje Niksic hnik...@xemacs.org wrote:
Mark.Petrovic mspetro...@gmail.com writes:
Might someone comment on why %f is not accepted as a valid field
directive in:
from datetime import datetime
created=2009-01-24 16:04:55.882788
dt =
1 - 100 of 193 matches
Mail list logo