ANNOUNCING
eGenix.com mxODBC Connect
Database Interface for Python
Version 0.9.1 (beta)
Our new client-server product for connecting Python applications
Hello. New to using Python. Python automatically round off watver i
calculate using the floor function. How wud i make the exact value
appear?
Tried out fabs() in the math library but still confused. Cud some1
elaborate on it.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 16, 2:35 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet2(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
length = len(avoid)
x = 0
noprint = 0
while length -1 = x:
if
En Sat, 14 Jun 2008 19:06:16 -0300, [EMAIL PROTECTED] escribió:
I'm using os.walk as follows:
(basedir, pathnames, files) = os.walk(results, topdown=True)
and I'm getting the error:
ValueError: too many values to unpack
From my googling, that means:
This is the standard message when
[EMAIL PROTECTED] wrote:
Hello. New to using Python. Python automatically round off watver i
calculate using the floor function. How wud i make the exact value
appear?
Tried out fabs() in the math library but still confused. Cud some1
elaborate on it.
If you're working with integers, the
En Sun, 15 Jun 2008 05:35:18 -0300, Maryam Saeedi [EMAIL PROTECTED] escribió:
I am using a python program on a lot of different documents and for few of
them I will get NoneType error. I just want to skip those files and continue
for others, I do this without a problem for
Hi Diez,
Thanx for the suggestion. I am checking if anything helpful I can find
there.
Regards,
Subhabrata.
Diez B. Roggisch wrote:
[EMAIL PROTECTED] schrieb:
Dear Members of the group,
I have a small question, if you can help me to find the answer.
I have one function:
def
All girls boys in dating available in this web sit join him
All girls boys in dating available in this web sit join him
All girls boys in dating available in this web sit join him
All girls boys in dating available in this web sit join him
http://amigos.com/go/g979119-pct
--
Rhamphoryncus [EMAIL PROTECTED] writes:
You might find a way to get SA_RESTART applied, but it won't work
right for you. Python splits signal handlers into a top half and a
bottom half - the bottom is in C, it's the real signal handler, and
top is in python. To keep things sane for the top
Hello, Could some1 tell me how u could change the colours of the
different lines that you have plotted while using gnuplot.py. Also how
to change the background colour, line thickness etc.
Thnx
--
http://mail.python.org/mailman/listinfo/python-list
Abstract
This PEP proposes an ordered dictionary as a new data structure for
the ``collections`` module, called odict in this PEP for short. The
proposed API incorporates the experiences gained from working with
similar implementations that exist in various real-world applications
and
On 16 jun 2008, at 05:55, Jason Scheirer wrote:
On Jun 15, 7:53 pm, John Salerno [EMAIL PROTECTED] wrote:
Before I try this and destroy my computer :) I just wanted to see if
this would even work at all. Is it possible to read a binary file
such
as an mp3 or an avi, put its contents into a
On Jun 16, 10:37 am, Armin Ronacher [EMAIL PROTECTED]
wrote:
Abstract
This PEP proposes an ordered dictionary as a new data structure for
the ``collections`` module, called odict in this PEP for short. The
proposed API incorporates the experiences gained from working with
similar
Diez B. Roggisch wrote:
George Sakkis schrieb:
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial explosion of subclasses as
more orthogonal features are added.
Phillip B Oldham a écrit :
What would be the optimal/pythonic way to subject an object to a
number of tests (based on the object's attributes) and redirect
program flow?
Say I had the following:
pets[0] = {'name': 'fluffy', 'species': 'cat', 'size': 'small'}
pets[1] = {'name': 'bruno',
TheSaint a écrit :
On 04:08, domenica 15 giugno 2008 [EMAIL PROTECTED] wrote:
what's wrong with getattr(cp, nn) ?
The learning curve to get into these programming ways.
Does gettattr run the snippet passed in?
Nope, it just does what the name implies.
Considering that nn is a name of
TheSaint a écrit :
On 01:15, lunedì 16 giugno 2008 Calvin Spealman wrote:
such as getattr(obj,
methname)(a, b, c). Does this make sense?
This is big enlightenment :) Thank you! :)
I found problem with eval() when it comes to pass quoted strings.
I circumvent that by encapsulating the
Armin Ronacher [EMAIL PROTECTED] writes:
This PEP proposes an ordered dictionary as a new data structure for
the ``collections`` module, called odict in this PEP for short.
A welcome addition.
Since we're not proposing a built-in type, could we choose a name that
is more explicit, and
Gabriel Genellina a écrit :
En Sun, 15 Jun 2008 05:35:18 -0300, Maryam Saeedi [EMAIL PROTECTED] escribió:
(snip)
It appears that you want to catch all exceptions, just use Exception for that:
try:
...
except Exception:
...
Hem... That's definitively *not* an a good advice here IMHO.
Armin Ronacher schrieb:
Other implementations of ordered dicts in various Python projects or
standalone libraries, that inspired the API proposed here, are:
- `odict in Babel`_
- `OrderedDict in Django`_
- `The odict module`_
- `ordereddict`_ (a C implementation of the odict module)
-
On Sun, 15 Jun 2008 18:15:38 -0700, Dennis Lee Bieber
[EMAIL PROTECTED] wrote:
I don't know quite what the reason for the sql = sql + ... is -- if
you are trying to package more than one discrete statement into a single
query you should be advised that not all adapters/DBMS support that
On Jun 15, 8:08 am, [EMAIL PROTECTED] wrote:
Indeed. I (the OP) am using a production release which has the 1k
linear growth.
I am seeing the problems with ~5MB and ~10MB sizes.
Apparently this will be improved greatly in Python 2.6, at least up to
the 32MB limit.
I've just fixed this for
ANNOUNCING
eGenix.com mxODBC Connect
Database Interface for Python
Version 0.9.1 (beta)
Our new client-server product for connecting Python applications
Oh, very good, better late than never.
This is my pure Python version, it performs get, set and del
operations too in O(1):
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498195
Working with C such data structure becomes much faster, because it can
use true pointers.
Then another data
Summary: can't verify big O claim, how to properly time this?
On Jun 15, 2:34 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Bart Kastermans [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
|I wrote a binary search tree in python, explaining as I was doing it
| how and why I did it. I am
HI,
I am trying to use the attachment object in soaplib. I am sending an
attachment object and some other arguments and also receving an attachment
object. So times I am able to receive the output image SVG file in my client
side. But sometimes I am not. I am getting the following error message:
Hi
I was wondering when it was worthwil to use context managers for
file. Consider this example:
def foo():
t = False
for line in file('/tmp/foo'):
if line.startswith('bar'):
t = True
break
return t
What would the benefit of using a context manager
See this piece of code:
/* API to invoke gc.collect() from C */
Py_ssize_t
PyGC_Collect(void)
{
Py_ssize_t n;
if (collecting)
n = 0; /* already collecting, don't do anything */
else {
collecting = 1;
n = collect(NUM_GENERATIONS - 1);
collecting = 0;
}
return n;
}
If a system
On Mon, 16 Jun 2008 17:51:00 +0700, Jaimy Azle [EMAIL PROTECTED] wrote:
See this piece of code:
/* API to invoke gc.collect() from C */
Py_ssize_t
PyGC_Collect(void)
{
Py_ssize_t n;
if (collecting)
n = 0; /* already collecting, don't do anything */
else {
collecting = 1;
n =
Jean-Paul Calderone wrote:
A system exception? What's that? C doesn't have exceptions.
How could I determine it? I dont know GCC implementation, and others, but C
on MSVC does have it. My application were not written in C, an exception
raised was something like access violation at address
Hello. Could some1 tell me how i could display a specific point in
gnuplot.py. Supposingly if i have a point of intersection (2,3). How
can i show this on the graph? As in how can i write near the point of
intersection the value :(2,3).
Thnx
--
http://mail.python.org/mailman/listinfo/python-list
Paul - thank you very much for your help, it was much appreciated. I
thought that this was the kind of thing I had to do.
I also messed around with properties to try and solve this problem,
but noticed a similar thing (ie, that changing a mutable attribute's
element is different to rebinding it):
SPAM
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 16 Jun 2008 18:11:24 +0700, Jaimy Azle [EMAIL PROTECTED] wrote:
Jean-Paul Calderone wrote:
A system exception? What's that? C doesn't have exceptions.
How could I determine it? I dont know GCC implementation, and others, but C
on MSVC does have it. My application were not written
My poor understanding is that the difference between `sorted(somelist,
key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
returns a new list and the other sorts in-place.
Does that mean that .sort() is more efficient and should be favored
when you can (i.e. when you don't mind
-On [20080616 10:41], Armin Ronacher ([EMAIL PROTECTED]) wrote:
This PEP proposes an ordered dictionary as a new data structure for
the ``collections`` module, called odict in this PEP for short.
I fully support adding this. In my work I have had to create this datatype a
few times already
Peter Bengtsson [EMAIL PROTECTED] writes:
My poor understanding is that the difference between `sorted(somelist,
key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
returns a new list and the other sorts in-place.
Yes.
Does that mean that .sort() is more efficient and should
I couldn't get it work on Solaris (modified some lines for Python2.3).
One reason was that I had to download pyreadline separately
- I did than but now pyreadline requires either ironpython or
a windows installation. Something is going wrong...
Best regards
Wolfgang
Bob Farrell schrieb:
I
I've installed Python 2.5 on MSW and it works. I'm preparing it to run
from a thumb drive so I can run applications by dropping them onto the
python.exe or from command line/etc. It works but the size is quite
large. I've compressed most of the executables with UPX even the dlls
under
takayuki [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
John: There were two inchworms because c is in inchworm so it
shouldn't print. Thanks for your detailed description of the for
loop.
lol, I even sat there looking at the word and said to myself ok, it doesn't
contain any of
takayuki [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
fin = open('animals.txt')
for line in fin:
You can write this as:
for line in open('animals.txt'):
#do stuff
Of course, you can't explicitly close the file this way, but that probably
doesn't matter. Another way, I
This gets my +1, for what its worth.
I don't really see a good reason not to include the insert() method,
however. I don't see that it would complicate things much, if at all.
d = odict([('a', 42), ('b', 23)])
d.insert(1, ('c', 19))
d
collections.odict([('a', 42), ('c', 19), ('b', 23)])
Floris Bruynooghe a écrit :
Hi
I was wondering when it was worthwil to use context managers for
file. Consider this example:
def foo():
t = False
for line in file('/tmp/foo'):
if line.startswith('bar'):
t = True
break
return t
What would the
Dennis Lee Bieber [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Sun, 15 Jun 2008 22:53:19 -0400, John Salerno
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
Even the simplest format - WAV, which is normally uncompressed
audio samples, is wrapped in layers of
On Jun 13, 11:34 am, Reedick, Andrew [EMAIL PROTECTED] wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, June 13, 2008 11:11 AM
To: [EMAIL PROTECTED]
Subject: Iterate creating variables?
I have
I recently wanted to do the same kind of thing. See this tread:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/f27c3b7950424e1c
for details on how to do it.
--
http://mail.python.org/mailman/listinfo/python-list
Brian Vanderburg II wrote:
I've installed Python 2.5 on MSW and it works. I'm preparing it to run
from a thumb drive so I can run applications by dropping them onto the
python.exe or from command line/etc. It works but the size is quite
large. I've compressed most of the executables with
1. With the current dict, the following code
a = { A : 1, B : 2 }
b = { B : 2, A : 1 }
a==b evaluates to True. I assume that if these were odicts, this
would evaluate to False.
2. Will odict.byindex support slicing?
3. Will odict inherit from dict?
4. The current dict API (as of Python 2.5)
HI!
I'd like to hear from the Python community whether support for Python
version prior to 2.3 is still needed in python-ldap. Please tell me
which Python version you're using and why it'd be important for you to
have python-ldap updates still supporting it.
BTW: Actually older Python
hi friends
COMMON DO YOU SEE THE DIFFERNT PICTURE AND INFORMATION
COMMON LETS GOO
http://www.airnet5.blogspot.com
http://www.airnet5.blogspot.com
http://www.airnet5.blogspot.com
http://www.airnet5.blogspot.com
http://www.airnet5.blogspot.com
http://www.airnet5.blogspot.com
-On [20080616 15:55], Michael Ströder ([EMAIL PROTECTED]) wrote:
I'd like to hear from the Python community whether support for Python
version prior to 2.3 is still needed in python-ldap. Please tell me
which Python version you're using and why it'd be important for you to
have python-ldap
Peter Bengtsson [EMAIL PROTECTED] writes:
Does that mean that .sort() is more efficient and should be favored
when you can (i.e. when you don't mind changing the listish object)?
Yes. Note that it's not the listish object, the sort method is
implemented on actual lists, not on any sequence.
:)
Yes, I thought about that even as I was writing that post. But I also said,
ParseResults implements quite a bit of additional behavior that would not
be required or necessarily appropriate for odict. Even if odict existed,
I think I would have needed ParseResults anyway (but using an odict
On Jun 16, 5:04 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Diez B. Roggisch wrote:
George Sakkis schrieb:
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial
u want the all sexye flimes ues this
u want me see this ***
***
http;//lesbiangroupsexy.blogspot.com/
--
Hello friends guys,
I want to tell you about great site I found. They pay me to read e-
mail,
visit sign in the web sites and much more. earn easily without
investment.
It's free to join and easy to sign up! CLICK THIS
LINK TO VISIT: http://www.ippomails.net/pages/index.php?refid=veeramani
Ok, I see how this would work (and it's trivial to make it cache the
generated classes for future use) but I guess I was looking for a more
mainstream approach, something that even a primitive statically
typed language could run :) Even in Python though, I think of Runtime
Type Generation
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip -- 'www.example.com'.strip('cmowz.')
'example'
.??? -- ---
Jimmy Retzlaff wrote:
py2exe 0.6.8 released
=
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll
On Jun 16, 2008, at 12:58 PM, Ethan Furman wrote:
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip --
Hi,
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip -- 'www.example.com'.strip('cmowz.')
'example'
.??? --
Ethan Furman wrote:
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip -- 'www.example.com'.strip('cmowz.')
'example'
On Mon, Jun 16, 2008 at 4:34 AM, Bart Kastermans [EMAIL PROTECTED] wrote:
This is interesting. I had never attempted to verify a big O
statement
before, and decided that it would be worth trying. So I wrote some
code to
collect data, and I can't find that it goes quadratic. I have the
I'm very happy to see this PEP. I have needed to use ordered
dictionaries many times, and this has always felt to me like a
surprising omission from Python.
--
http://mail.python.org/mailman/listinfo/python-list
Le Monday 16 June 2008 18:58:06 Ethan Furman, vous avez écrit :
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip --
On Mon, 16 Jun 2008 10:41:05 -0600, Ian Kelly [EMAIL PROTECTED] wrote:
On Mon, Jun 16, 2008 at 4:34 AM, Bart Kastermans [EMAIL PROTECTED] wrote:
This is interesting. I had never attempted to verify a big O
statement
before, and decided that it would be worth trying. So I wrote some
code to
QOTW: The problem [with C++] is, I never feel like I'm programing
the *problem*, I always feel like I'm programming the *language*. - Roy Smith
Alternatives to the Decimal type:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/9cd6dae725268afb/
How
Ethan Furman wrote:
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
identity = .join(map(chr, range(256)))
'www.example.com'.translate(identity,
On Jun 16, 10:09 am, Peter Otten [EMAIL PROTECTED] wrote:
Ethan Furman wrote:
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
identity =
On Mon, Jun 16, 2008 at 11:09 AM, Jean-Paul Calderone
[EMAIL PROTECTED] wrote:
It will depend what version of Python you're using and the *exact* details
of the code in question. An optimization was introduced where, if the
string being concatenated to is not referred to anywhere else, it will
On Jun 16, 5:11 am, Peter Bengtsson [EMAIL PROTECTED] wrote:
My poor understanding is that the difference between `sorted(somelist,
key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
returns a new list and the other sorts in-place.
Does that mean that .sort() is more efficient
George Sakkis wrote:
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial explosion of subclasses as
more orthogonal features are added. Naturally, the decorator pattern
[1]
Wolfgang Grafen [EMAIL PROTECTED]:
I couldn't get it work on Solaris (modified some lines for Python2.3).
If solaris doesn't have a readline library, you might try to compile gnu
readline, and recompile python (also a chance to get the current version
2.5)
One reason was that I had to
I have sqlite installed, but when I try to import sqlite3 I receive:
Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type help, copyright, credits or license for more information.
import sqlite3
Traceback (most recent call last):
File stdin, line 1, in module
ImportError: No
I found this article useful when dealing with strings in Python:
http://www.skymind.com/~ocrow/python_string/
It may help squeeze some more time out of your code. 8-)
Alex.
--
http://mail.python.org/mailman/listinfo/python-list
Dan Bishop wrote:
Python just uses the atof() function from the underlying C library.
Some of them handle NaN's, and some of them don't.
As a work around, how would I write this in list comprehension form:
newlist=[]
for i in range(len(v[1])):
try:
On Jun 17, 12:59 am, milan_sanremo [EMAIL PROTECTED] wrote:
I have sqlite installed, but when I try to import sqlite3 I receive:
Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type help, copyright, credits or license for more information.
import sqlite3
Traceback (most
On Jun 16, 1:49 pm, Gerard flanagan [EMAIL PROTECTED] wrote:
George Sakkis wrote:
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial explosion of subclasses as
On 16 juin, 10:37, Armin Ronacher [EMAIL PROTECTED] wrote:
Abstract
This PEP proposes an ordered dictionary as a new data structure for
the ``collections`` module, called odict in this PEP for short. The
proposed API incorporates the experiences gained from working with
similar
Does ConfigParser allow writing configuration changes also?
Dennis Lee Bieber [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
On Sat, 14 Jun 2008 21:27:19 +0200, Robert [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
What is the most Pythonic way to maintain a
On Mon, 16 Jun 2008 11:30:19 -0600, Ian Kelly [EMAIL PROTECTED] wrote:
On Mon, Jun 16, 2008 at 11:09 AM, Jean-Paul Calderone
[EMAIL PROTECTED] wrote:
It will depend what version of Python you're using and the *exact* details
of the code in question. An optimization was introduced where, if the
U.S. President George Bush has met with Pope Benedict at the Vatican,
as he continues his week-long European trip.
After his talks with the pontiff, Mr. Bush was traveling to Paris,
France, where he is to give a speech later Friday on the strong
relationship between the U.S. and Europe.
U.S.
Being new on on Python (but otherwise experienced programmer this message
triggered me to do the install.
It looks like a nice way to do a comprehensive check of your system.
When running one of the py2exe samples, located in
C:\Python25\Lib\site-packages\py2exe\samples\singlefile\gui I got the
On Mon, Jun 16, 2008 at 12:07 PM, Alex Elder [EMAIL PROTECTED] wrote:
I found this article useful when dealing with strings in Python:
http://www.skymind.com/~ocrow/python_string/
It may help squeeze some more time out of your code. 8-)
Things seem to have changed since then. I'm
Problem:
- You have tree structure (XML-like) that you don't want to create
100% in memory, because it just takes too long (for instance, you need
a http request to request the information from a slow distant site).
- But you want to be able to request data from it, such has give me
all nodes
A veteran engineer from VMWare Inc., Jeffrey, is being featured on
jobirn.com on Monday Jun 16, from 9am to 5pm (PST.)
He will chat with applicants who are interested in job openings in
VMWare.
He will identify qualified candidates and directly submit qualified
candidates' resumes to hiring
We've been using NetWorkSpaces
(http://www.ddj.com/web-development/21971) for IPC on programs running
on several different machines. Since it uses a central, shared server for
storing values, you don't have to write socket code in your various programs
to pass data back and forth.
For
John [H2O] wrote:
Dan Bishop wrote:
Python just uses the atof() function from the underlying C library.
Some of them handle NaN's, and some of them don't.
As a work around, how would I write this in list comprehension form:
newlist=[]
for i in range(len(v[1])):
On Jun 16, 7:17 am, Paul Hankin [EMAIL PROTECTED] wrote:
On Jun 16, 2:35 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet2(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
length = len(avoid)
x = 0
Okay guys. I have the _ast based safe eval installed and working in my
program. It appears to be working just fine. Thanks for the help.
Now, a few more questions:
1. I see that _ast is a 2.5 module?? So, for folks using my code with
2.5 I could do something like this:
# I've got some
On Jun 16, 12:57 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
On Jun 15, 11:30 pm, Christian Heimes [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I have a physical system set up in which a body is supposed to
accelerate and to get very close to lightspeed, while never really
milan_sanremo wrote:
I have sqlite installed, but when I try to import sqlite3 I receive:
Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type help, copyright, credits or license for more information.
import sqlite3
Traceback (most recent call last):
File stdin, line 1, in
méchoui schrieb:
Problem:
- You have tree structure (XML-like) that you don't want to create
100% in memory, because it just takes too long (for instance, you need
a http request to request the information from a slow distant site).
- But you want to be able to request data from it, such has
On Jun 16, 4:47 pm, bvdp [EMAIL PROTECTED] wrote:
2. I thought I'd be happy with * / + -, etc. Of course now I want to add
a few more funcs like int() and sin(). How would I do that?
For the builtin eval, just populate the globals dict with the names
you want to make available:
import math
Ben Finney [EMAIL PROTECTED] wrote:
Peter Bengtsson [EMAIL PROTECTED] writes:
My poor understanding is that the difference between `sorted(somelist,
key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
returns a new list and the other sorts in-place.
Yes.
Does that
On Jun 15, 6:23 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
for letter in avoid:
if letter in word:
break
On Jun 16, 2:34 pm, Thomas Hill [EMAIL PROTECTED] wrote:
On Jun 15, 6:23 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
for letter in avoid:
On Jun 16, 11:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
méchoui schrieb:
Problem:
- You have tree structure (XML-like) that you don't want to create
100% in memory, because it just takes too long (for instance, you need
a http request to request the information from a slow
After a couple of weeks studying Python, I already have a few useful
scripts, including one that downloads 1500 Yahoo stock quotes in 6
seconds. However, many things are puzzling to me. I keep on seeing
things like __main__ in scripts. A more obscure example would be
__add__ used in string
George Sakkis wrote:
On Jun 16, 4:47 pm, bvdp [EMAIL PROTECTED] wrote:
2. I thought I'd be happy with * / + -, etc. Of course now I want to add
a few more funcs like int() and sin(). How would I do that?
For the builtin eval, just populate the globals dict with the names
you want to make
1 - 100 of 186 matches
Mail list logo