James Stroud wrote:
Oops. Answered before I finished reading the question.
James
Well, the one bad side effect (or feature depending on the
circumstance), is it makes a copy. I wonder if there is a way to modify
the dictionary in place with a function to do the same thing instead of
[EMAIL PROTECTED] wrote:
This post comes from a boring morning, if you are busy ignore this.
This post is only for relaxed people.
I've found this page, Syntax Across Languages, it contains many
errors and omissions, but it's interesting.
PyPK [EMAIL PROTECTED] wrote:
What possible tricky areas/questions could be asked in Python based
Technical Interviews?
What's the point of asking tricky questions? Aren't you really more
interested in what applications they have worked on and whether they were
successful?
I don't know. I'm
What's the standard replacement for the obsolete grep module?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
hrh1818 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
There is a module named pymat avvailable from
http://sourceforge.net/projects/pymat that provides a limited set of
functions for intertfacing Python to Matlab.
I think that pymat was superceded by mlabwrap
I got a sample code and tested it but really can not understand the
use of pickle and dump:
import pickle
f = open(try.txt, w)
pickle.dump(3.14, f)
pickle.dump([1,2,3,4], f)
f.close()
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
Here it goes with a little less overhead:
py class namespace:
... def __init__(self, adict):
... self.__dict__.update(adict)
...
py n = namespace({'bob':1, 'carol':2, 'ted':3, 'alice':4})
py n.bob
1
py n.ted
3
James
How about...
class
On Tue, 2005-10-25 at 06:45 +, David Isaac wrote:
What's the standard replacement for the obsolete grep module?
AFAIK there never was a grep module. There does, however exist a
deprecated regex module:
import regex
__main__:1: DeprecationWarning: the regex module is deprecated; please
use
Op 2005-10-24, David Schwartz schreef [EMAIL PROTECTED]:
Antoon Pardon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Microsoft had something you need so badly that you could not go into
business without it. So they demanded from you that you pay them what
their
software
On Mon, 2005-10-24 at 23:55 -0700, Shi Mu wrote:
I got a sample code and tested it but really can not understand the
use of pickle and dump:
import pickle
f = open(try.txt, w)
pickle.dump(3.14, f)
pickle.dump([1,2,3,4], f)
f.close()
The pickle module serializes python objects. You
i have a generic script that is using several modules on windows and linux boxes. i need to have the scripts test if a module is installed, and then if not - then to install the module. can anyone give me a headsup on how to test for a module, returning something to indicate whether or not it is
Simon Burton wrote:
Yes!
I do this a lot when i have deeply nested function calls
a-b-c-d-e
and need to pass args to the deep function without changing the
middle functions.
If you find yourself passing arguments to functions
just so they can in turn pass them on to other
functions,
Maybe Pexpect can help you, I think it does what you want, I'm just not sure it
works on windows, as I think it uses pty's.
Please read it's FAQ about stdio buffer behaviour, I think it's also valid on
Windows. pexpect.sourceforge.net
Adriaan Renting.
jas [EMAIL PROTECTED] 10/24/05 2:33 pm
what does the following code mean?
y = pickle.load(file(cnumber.pickle, r))
also, I can not understand f in pickle.dump(x, f)
On 10/25/05, marduk [EMAIL PROTECTED] wrote:
On Mon, 2005-10-24 at 23:55 -0700, Shi Mu wrote:
I got a sample code and tested it but really can not understand the
Antoon Pardon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I think you need to look up extortion in a dictionary. I can walk
up
to you and say if you want me to mow your lawn, you must pay me $1 every
time you smoke a cigarette. So long as you can say no and all that
G'day All,
Just thought I'd drop in and say hi. I'm new to Python, but old to software
development.
Python is one of the languages used in my new job, so I've just bought a
book, read it, and downloaded Python; It's pretty good isn't it? It's
particularly handy being able top run the same
You might want to try python expect which gives you a very simple and
scriptable interface to a process.
http://pexpect.sourceforge.net/
I've been using it on windows to automate a few things.
Cheers,
Paul
jas wrote:
Kent,
Yes, your example does work. So did os.popen...however, the
In comp.os.linux.misc Antoon Pardon [EMAIL PROTECTED] wrote:
I think you need to look up extortion in a dictionary. I can walk up
to you and say if you want me to mow your lawn, you must pay me $1 every
time you smoke a cigarette. So long as you can say no and all that
happens is that I
Ron Adam wrote:
James Stroud wrote:
Here it goes with a little less overhead:
example snipped
But it's not a dictionary anymore so you can't use it in the same places
you would use a dictionary.
foo(**n)
Would raise an error.
So I couldn't do:
def foo(**kwds):
Some people, when confronted with a problem, think I know,
I'll use regular expressions. Now they have two problems.
--Jamie Zawinski
Thanks for the citation.
If my goal had been to redesign my program, I would not ask questions
about regular expressions. I do not have the time to redesign my
In comp.os.linux.misc David Schwartz [EMAIL PROTECTED] wrote:
Yes, but that's the if. I have a monopoly on *me* mowing your lawn.
You can, of course, go to someone else to have your lawn mowed.
Of course you can't - why would anyone else be available to mow my lawn
just because I want it
Peter T. Breuer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Essentially, Microsoft asked for exclusive arrangements. That is,
arrangements wherein you could not sell competing products if you wished
to
sell Microsoft products. That's not even remotely unusual.
It
David Schwartz [EMAIL PROTECTED] 10/25/05 6:06 am
Do you think it would be immoral if Microsoft said, we will only sell
Windows wholesale to dealers who don't sell other operating systems?
DS
7
It goes one further as that, MS had the tactic of we will only sell Windows
wholesale
Tim Roberts wrote:
- Nestable Pascal-like comments (useful): (* ... *)
That's only meaningful in languages with begin-comment AND end-comment
delimiters. Python has only begin-comment. Effectively, you CAN nest
comments in Python:
I believe that the OP is mistaken. In standard Pascal
marduk wrote:
What's the standard replacement for the obsolete grep module?
AFAIK there never was a grep module. There does, however exist a
deprecated regex module:
there was a grep module in 1.5.2 and earlier:
http://effbot.org/librarybook/grep.htm
but it was removed in 2.0 (or
Shi Mu wrote:
what does the following code mean?
y = pickle.load(file(cnumber.pickle, r))
open the file cnumber.pickle for reading, pass the file handle to
the pickle.load function, and store the result in the y variable.
also, I can not understand f in pickle.dump(x, f)
the second
In comp.os.linux.misc David Schwartz [EMAIL PROTECTED] wrote:
Peter T. Breuer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[DS, MS shill, said ..]
Essentially, Microsoft asked for exclusive arrangements. That is,
arrangements wherein you could not sell competing products if
Ed Hotchkiss wrote:
i have a generic script that is using several modules on windows and linux
boxes. i need to have the scripts test if a module is installed, and then if
not - then to install the module. can anyone give me a headsup on how to
test for a module, returning something to
Joey C. wrote:
Here is a basic overview of the variables included there.
params = cgi.FieldStorage()
I accidentally made a mistake when typing what the thefile variable
is.
thefile = params[upfile].file
upfile is the CGI field that contains the file that I'm uploading.
As you can see, the
David Schwartz [EMAIL PROTECTED] 10/25/05 9:44 am
%
%Peter T. Breuer [EMAIL PROTECTED] wrote in message
%news:[EMAIL PROTECTED]
%
%Essentially, Microsoft asked for exclusive arrangements. That is,
%arrangements wherein you could not sell competing products if you wished
%to
%sell
Ask wrote:
G'day All,
(snip)
Welcome here...
I must admit to much confusion regarding some of the basics, but I'm sure
time, reading, and good advice will get rid of that. at this stage, it's
just working through some examples and getting my head around things. As an
example, if I
Scott David Daniels wrote:
bruno modulix wrote:
Scott David Daniels wrote:
bruno modulix wrote:
... Another language that failed to make it to the mainstream but is
worth giving a try is Smalltalk - the father of OOPLs (Simula being the
GrandFather).
I would say Simula is the
Ask wrote:
As an example, if I create a window, I've been unable to force it to be a
certain size, and put a
button (widget) at (say) 20,40 (x y). Is window formatting possible?
I'm pretty sure all GUI toolkits can do that, but the exact details depend on
the library
you're using.
(if
Tim Roberts wrote:
PyPK [EMAIL PROTECTED] wrote:
What possible tricky areas/questions could be asked in Python based
Technical Interviews?
What's the point of asking tricky questions? Aren't you really more
interested in what applications they have worked on and whether they were
Joerg Schuster wrote:
I just want to use more than 100 capturing groups. If someone told me
that it is very unlikely for Python to get rid of the said limitation,
I would recode part of my program in C++ using pcre.
It is very unlikely for Python to get rid of the said limitation.
-Peter
--
Hello,
I am using ZODB standalone in version 3.3.1 within some application.
Now I learn that the 3.3.x branch of ZODB is retired. No problem so
far, everything is running fine.
BUT... retired gives me the hint that nothing GREAT will be done to
this branch anymore :)
Now I am questioning
Alex Martelli wrote:
No, LC goes back a long way -- I think it was in 2.0 already, 2.1 for
sure.
$ python1.5 -c print [x for x in 'abc']
File string, line 1
print [x for x in 'abc']
^
SyntaxError: invalid syntax
$ python2.0 -c print [x for x in 'abc']
['a', 'b', 'c']
I
[EMAIL PROTECTED] wrote:
The output I was contemplating was a DOM DNA - that is the DOM
without the instances of the elements or their data, a bare tree, a
prototype tree based on what is in the document (rather than what is
legal to include in the document).
Just enough data that for an
Your python script is not getting executed.
I guess there is something wrong with the server configuration.
#-Original Message-
#From: Philippe C. Martin [mailto:[EMAIL PROTECTED]
#Sent: Tuesday, October 25, 2005 1:27 AM
#To: python-list@python.org
#Subject: python cgi script not
I can not understand the use of cell and row in the code:
# convert the matrix to a 1D list
matrix = [[13,2,3,4,5],[0,10,6,0,0],[7,0,0,0,9]]
items = [cell for row in matrix for cell in row]
print items
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
my hard-won ignorance, and admit that I don't see the
problem with the property examples:
class Sic:
def getFoo(self): ...
def setFoo(self): ...
foo = property(getFoo, setFoo)
Sorry for skipping the 2nd argument to setFoo, that was
On Mon, 24 Oct 2005 21:06:36 -0700, David Schwartz
[EMAIL PROTECTED] wrote, quoted or indirectly quoted someone who
said :
Do you think it would be immoral if Microsoft said, we will only sell
Windows wholesale to dealers who don't sell other operating systems?
I had an existing independent
Simon Burton wrote:
I'd like to experiment with this, does anyone know where to start ?
with the once there is parts, probably (see below).
It seems that the parser module still produces the same junk as before.
So where do we find these nice high level AST objects ?
here's a nice summary:
[EMAIL PROTECTED] wrote:
John Abel wrote:
Hi,
I'm running Python 2.3.5/2.4.2 on OSX 10.4.2, and am trying to run CGI
scripts using the builtin Apache. For ease, I've symlinked my custom
modules into the /Library/Python/2.3/site-packages directory, and they
import OK via command line python.
Joerg Schuster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,
Python regular expressions must not have more than 100 capturing
groups.
Really ??
I have been waiting a long time now for Python to get rid of this
limitation.
Ahh - The dark side of Open Source:
If nobody
Hi,
unfortunately the result from py2exe won't run eventhough the original
script runs without problems. The trouble is I'm at a loss as to where
to start looking!
Martin.
--
http://mail.python.org/mailman/listinfo/python-list
Shi Mu wrote:
I can not understand the use of cell and row in the code:
# convert the matrix to a 1D list
matrix = [[13,2,3,4,5],[0,10,6,0,0],[7,0,0,0,9]]
items = [cell for row in matrix for cell in row]
print items
working through the Python tutorial might be a good idea. here's the
Joerg Schuster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Some people, when confronted with a problem, think I know,
I'll use regular expressions. Now they have two problems.
--Jamie Zawinski
Thanks for the citation.
If my goal had been to redesign my program, I would not ask
What happens if you up the limit to whatever you need?
Good idea. I just tried this. Nothing evil seems to happen. This seems
to be a solution. Thanks.
Jörg
--
http://mail.python.org/mailman/listinfo/python-list
I'm afraid on my interpreter, this works.
if os.path.getsize(C:\\Documents and Settings\\Joey\\Desktop\\file.txt)
= 1000:
print = 1000.
= 1000.
No problems there, as you can see.
--
http://mail.python.org/mailman/listinfo/python-list
Joerg Schuster wrote:
I just want to use more than 100 capturing groups.
define more (101, 200, 1000, 10, ... ?)
/F
--
http://mail.python.org/mailman/listinfo/python-list
In the follwoing code,
Why the result is 'defenestrate', 'window', 'defenestrate', before
the original list instead of 'defenestrate', 'window', ?
a = ['defenestrate', 'cat', 'window', 'defenestrate']
for x in a[:]:
... if len(x) 4: a.insert(0, x)
...
a
['defenestrate', 'window',
Joey C. wrote:
I'm afraid on my interpreter, this works.
if os.path.getsize(C:\\Documents and Settings\\Joey\\Desktop\\file.txt)
= 1000:
print = 1000.
= 1000.
No problems there, as you can see.
I'm not sure if you replied to my post, but what I tried to say is that
Hi, I'm new to python and just upgraded python on my system from 2.3 to
2.4. My platform is Linux-2.6.9-1.667smp-i686-with-redhat-3-Heidelberg.
Is there any way to inherit (share?) all extensions and additional
modules the my 2.3 have? (of course, beside re-installing everything)
On 19 Oct 2005
Oh, I'm sorry, I didn't understand what you meant at first.
Then I read your reply over again and noticed that you said that the
problem lied in os.path.getsize() when I tried to run it on the
contents of an open file.
I'll try the method you outlined now.
--
Robby Dermody wrote:
In the diagrams above, one can see the night-day separation clearly. At
night, the memory usage growth seemed to all but stop, but with the
increased call volume of the day, it started shooting off again. When I
first started gathering this data, I was hoping for a
Hi Jaume,
Pydev (http://pydev.sf.net) is an eclipse plugin that does
code-completion for jython, so, it might be worth taking a look at it...
Cheers,
Fabio
jau wrote:
Hello mates.
I'm part of a big project's developer team. We are writting an
application in Java and we are planning to add
Vincent Gulinao wrote:
Hi, I'm new to python and just upgraded python on my system from 2.3 to 2.4.
My platform is Linux-2.6.9-1.667smp-i686-with-redhat-3-Heidelberg.
Is there any way to inherit (share?) all extensions and additional modules
the my 2.3 have? (of course, beside re-installing
The deadline for PyCon 2006 submissions is now only a week away.
If you've been procrastinating about putting your outline together,
now's the time to get going...
Call for Proposals:
http://www.python.org/pycon/2006/cfp
Proposal submission site:
http://submit.python.org/
Hi, I'm new to python and just upgraded python on my system from 2.3 to 2.4.
My platform is Linux-2.6.9-1.667smp-i686-with-redhat-3-Heidelberg.
Is there any way to inherit (share?) all extensions and additional modules
the my 2.3 have? (of course, beside re-installing everything)
binary
No limitation at all would be best. If a limitation is necessary, then
the more capturing groups, the better. At the time being, I would be
really happy about having the possibility to use 1 capturing
groups.
Jörg
--
http://mail.python.org/mailman/listinfo/python-list
Shi Mu wrote:
what does the following code mean?
y = pickle.load(file(cnumber.pickle, r))
Take it by parts:
file(cnumber.pickle, r)
returns a file object as a result of opening the cnumber.pickle file,
which is presumably a pickle someone wrote earlier.
So
Roedy Green [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
On Mon, 24 Oct 2005 21:06:36 -0700, David Schwartz
[EMAIL PROTECTED] wrote, quoted or indirectly quoted someone who
said :
Do you think it would be immoral if Microsoft said, we will only sell
Windows wholesale to
Joerg Schuster [EMAIL PROTECTED] writes:
No limitation at all would be best. If a limitation is necessary, then
the more capturing groups, the better. At the time being, I would be
really happy about having the possibility to use 1 capturing
groups.
I'm sorry, I missed the beginning of
Shi Mu wrote:
In the follwoing code,
Why the result is 'defenestrate', 'window', 'defenestrate', before
the original list instead of 'defenestrate', 'window', ?
a = ['defenestrate', 'cat', 'window', 'defenestrate']
for x in a[:]:
... if len(x) 4: a.insert(0, x)
...
a
Paul,
I did ceck out the PExpect, however, I thought it was not ported for
Windows. Did you find a ported version? If not, what did you have to
do to be able to use it?
Thanks
Paul Dale wrote:
You might want to try python expect which gives you a very simple and
scriptable interface to a
Joerg Schuster wrote:
What happens if you up the limit to whatever you need?
Good idea. I just tried this. Nothing evil seems to happen. This seems
to be a solution. Thanks.
Jörg
The joys of open source. Just remember you have now made your program
non-portable. Hope this isn't an
In comp.os.linux.misc David Schwartz [EMAIL PROTECTED] wrote:
1) There is no other operating system worth selling. In this case, you
are right, you have no choice but to sell the Microsoft OS, but the deal
they're offering you harms you in no way. (Unless you intended to sell PCs
with
Because you're inserting items into your existing list instead of a new
list. What you probably mean is:
b = []
for x in a:
b.append(x)
which creates a new list b that contains all elements whose length is
greater than four.
A better way to write this would be:
b = [x for x in a if
Hi all,
I'm testing the PDO wrapper to database modules [1] and I'm wondering
how few things like this there are around. My problem, actually, is the
paramstyle of modules. I want to use kinterbasdb in the same code I use
cx_oracle, for example, but paramstyle changes from one to other, than
I
Peter T. Breuer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
3) there are plenty of other OSs that are developed or could be
developed but which cannot get a foothold or even manage to be put on
the shelves because the majority product producer insists on charging
hardware
Hello.
I would to do something like this.
container = []
p1 = point()
l1 = line()
and i would like to override = method of the module so that its puts
all objects into container.
how i can do something like that.
thanks for help,
viktor.
--
http://mail.python.org/mailman/listinfo/python-list
David Schwartz wrote:
Peter T. Breuer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
3) there are plenty of other OSs that are developed or could be
developed but which cannot get a foothold or even manage to be put on
the shelves because the majority product producer insists on
On Tue, 25 Oct 2005 04:21:45 -0700, David Schwartz
[EMAIL PROTECTED] wrote, quoted or indirectly quoted someone who
said :
2) There are other realistic competing operating systems. In this case,
you were foolish to agree to Microsoft's deal. You lost out on the realistic
competing markets.
but what is the reason for so much capturing groups? I
imagine that coding this and keeping code maintenable is a huge effort.
User input is compiled to regular expressions. The user does not have
to worry about those groups.
--
http://mail.python.org/mailman/listinfo/python-list
Luiz Geron wrote:
Hi all,
I'm testing the PDO wrapper to database modules [1] and I'm wondering
how few things like this there are around.
Actually there are several Object-Relation Mappers (ORM) for Python, and
also a few other attempts to provide a more convenient layer on top of
DB-API
Viktor Marohnic wrote:
I would to do something like this.
container = []
p1 = point()
l1 = line()
and i would like to override = method of the module so that its puts
all objects into container.
how i can do something like that.
you cannot, at least not as you've described the problem.
On Tue, 25 Oct 2005 03:55:17 -0700, Joerg Schuster wrote:
No limitation at all would be best. If a limitation is necessary, then
the more capturing groups, the better. At the time being, I would be
really happy about having the possibility to use 1 capturing
groups.
Do you really think
The joys of open source. Just remember you have now
made your program
non-portable. Hope this isn't an issue.
Of course portability is an issue -- on the long run. But on the short
run I am really glad to be able to do a 1 second demo run on my
notebook instead of a 20 seconds demo run. And I
Eike Preuss [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Shouldn't it be my right as a seller, to decide that I want to sell an
operating system 'that nobody wants' _as well as_ operating systems that
'everybody wants'?
Yes, it certainly is. However, it is also Microsoft's
Fredrik Lundh wrote:
Joerg Schuster wrote:
I just want to use more than 100 capturing groups.
define more (101, 200, 1000, 10, ... ?)
/F
The Zero-One-Infinity Rule:
http://www.catb.org/~esr/jargon/html/Z/Zero-One-Infinity-Rule.html
Iain
--
On Tue, 25 Oct 2005 04:56:02 -0700, Viktor Marohnic wrote:
Hello.
I would to do something like this.
container = []
p1 = point()
l1 = line()
Choosing names that look like numbers is terrible practice. Don't use l,
l1, O, ll, and so forth, unless you are trying to deliberately make your
So it seems there is no good way to handle interactive processes on
windows using python. By interactive I mean processes/commands that
require user interaction, such as telnet or del (to delete a file or
directory sometimes you need to confirm with a yes or no), date, etc.
os.system gives the
In comp.os.linux.misc David Schwartz [EMAIL PROTECTED] wrote:
Peter T. Breuer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
3) there are plenty of other OSs that are developed or could be
developed but which cannot get a foothold or even manage to be put on
the shelves because the
Hi all,
Anyone knows a simpler but stronger control access to XML-RPC functions
than the one I comment here?
My actual system works like this:
I have a TCP Server and an XML-RPC Server. Both of them verify if the
IP address is allowed.
The TCP Server works for validate and register an IP
Joerg Schuster [EMAIL PROTECTED] writes:
but what is the reason for so much capturing groups? I
imagine that coding this and keeping code maintenable is a huge effort.
User input is compiled to regular expressions. The user does not have
to worry about those groups.
And what is the problem
Aloa,
I'm new to python as to swig... so my question goes here. I am using swig to
call a c function which returns a char*.
I do this:
...
i = 1
while i = 2:
result, chainName = cgiServer.rpcGetTempParameterAttribut
(//firewall-input[ + str(i) + ])
print
jas wrote:
So it seems there is no good way to handle interactive processes on
windows using python. By interactive I mean processes/commands that
require user interaction, such as telnet or del (to delete a file or
directory sometimes you need to confirm with a yes or no), date, etc.
[EMAIL PROTECTED] wrote:
unfortunately the result from py2exe won't run eventhough the original
script runs without problems. The trouble is I'm at a loss as to where
to start looking!
Is there no exception traceback printed? Or some other error when you
run the .exe? It would be very
Excuse me if I wasn't clear. I don't want to use ORMs, since I really
have to execute arbitrary sql queries, and then I can't use this object
mapping. I'm going to write my own wrapper like you did, it is not so
difficult to do.
--
http://mail.python.org/mailman/listinfo/python-list
beza1e1 wrote:
let me try.
1) ''.join(lots_of_pieces)
2) This doesn't even work, if something is removed, the list is too
short. So:
[x for x in somelist if not isbad(x)]
well, list comprehension is Python 2.4
2.2.x IIRC
and 2.3 is the standard in many
OSes, so it is possibly not
Gerhard Häring wrote:
Luiz Geron wrote:
Hi all,
I'm testing the PDO wrapper to database modules [1] and I'm wondering
how few things like this there are around.
Actually there are several Object-Relation Mappers (ORM) for Python, and
also a few other attempts to provide a more
On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
Fredrik Lundh wrote:
Joerg Schuster wrote:
I just want to use more than 100 capturing groups.
define more (101, 200, 1000, 10, ... ?)
/F
The Zero-One-Infinity Rule:
I was
investigating each subproject individually and could not, for the life
of me figure out how Kid worked. I understand that it takes a
well-formed XML document and transforms it, but I could not figure out
where it transforms it, or how to transform a document. They have
plenty of
Ok thanks a lot. I think i got the point.
I also thought that it could be possible to do something like this
globals().__setitem__ = custom_setter
but __setitem__ is readonly
--
http://mail.python.org/mailman/listinfo/python-list
You did not quite understand me. I will give you some details:
My program is a compiler for a certain type of linguistic grammars.
I.e. the user gives *grammar files* to my program. When the grammar
files have been compiled, they can be applied to strings (of a certain
language, e.g. English).
well, for what i tried, ticstrings just contained a list of times
formatted like
[10-21 09:15, 10-21 09:44, 10-21 09:59, and so on.]
i did write mine a little different than the example that Grant gave me
because its a little
different application of time.
i think i am having trouble knowing
Steve Holden wrote:
Look at how you might do it in other languages. Then you'll realise this
isn't (just) a Python problem.
Yea your right. However, for example, in Java, one can use the Process
class, and then read from the stream until its the end (i.e. -1 is
returned). However, with Python
Doh, the first example should of cours be:
b = []
for x in a:
if len(x) 4:
b.append(x)
--
http://mail.python.org/mailman/listinfo/python-list
bruno modulix wrote:
beza1e1 wrote:
well, list comprehension is Python 2.4
2.2.x IIRC
List comprehensions were introduced in Python 2.0, according to the
What's new in ... document at
http://www.amk.ca/python/2.0/index.html#SECTION00060
-- Gerhard
--
1 - 100 of 286 matches
Mail list logo