On Mon, 22 Oct 2007 02:41:17 +, JKPeck wrote:
We want to wrap the stdout device in a codec in order to decode output
transparently according to a particular code page (which might not be
the system code page). However, codec.open requires a filename, and
stdout may be a tty or otherwise
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC (localhost) (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:
gaierror: (11001, 'getaddrinfo failed')
The error was raised upion accessing
Hi:
please look at this code.
def A():
print 'warp in A'
def why(self, *arg, **kw):
print 'in A'
print self
print arg
print kw
#self(*arg, **kw)
return why
class
On Mon, 22 Oct 2007 14:37:36 +0800, kyo guan wrote:
def A():
print 'warp in A'
def why(self, *arg, **kw):
print 'in A'
print self
print arg
print kw
#self(*arg, **kw)
return why
class
On 21 Okt., 19:34, Joachim Durchholz [EMAIL PROTECTED] wrote:
These are small detractions from a large overall contribution.
In particular, I find llothars characterization of TeX wrong: it is one
of the least buggy typesetting programs ever written (not a small feat),
and it *still* produces
--- sccs cscs [EMAIL PROTECTED] escribió:
Thank you, but i believe that i could get all
variables names that reference an instance: i need
it for a special debug tool... It seems that
knowledge exists somewhere into the Python
interpreter...
Please read first the FAQ item posted
Hello to every member of this list.
Can any one tell me where to find various python development in to linux
clustering? Just give me some startup info for searching such material. I m
starting to writing some patches in my existed cluster at my college. Just
look for python development held in
Learn the 10 Idiot proof rules of dieting and fat loss. Stop using low
carb diets.
Stop using low calorie diets. Stop using low fat diets. Be proud that
you could finally loose those pounds.
http://netsales77.4idiots.hop.clickbank.net
--
http://mail.python.org/mailman/listinfo/python-list
On 10/22/07, niket mhatre [EMAIL PROTECTED] wrote:
Hello to every member of this list.
Can any one tell me where to find various python development in to linux
clustering? Just give me some startup info for searching such material. I m
starting to writing some patches in my existed cluster at
def A():
print 'warp in A'
def why(self, *arg, **kw):
print 'in A'
print self
print arg
print kw
#self(*arg, **kw)
return why
class T(object):
@A()
def test(g, out):
Hi all,
I have the following directory structure:
wallpaper/
-main.py
-ng/
-- __init__.py
-- setdesktop.py
-yb/
-- __init__.py
-- setdesktop.py
From main.py, I would like to do:
import
Sushant napisał(a):
getattr seems to be converting string into function pointer and I am just
saying that string cannot be used as a function pointer in Python as may be
in PHP.
It seems, but it does not. Getattr performs lookup on object's
attributes dict, it does not convert anything. The
On Oct 21, 10:35 am, Wade Ward [EMAIL PROTECTED] wrote:
Gosi [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Oct 20, 10:46 pm, rbe [EMAIL PROTECTED] wrote:
On Oct 15, 5:22 am, Mike Kent [EMAIL PROTECTED] wrote:
Conference page
// with links to program details
iu2 wrote:
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC (localhost) (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:
gaierror: (11001, 'getaddrinfo failed')
The error was
Phoe6 wrote:
Hi all,
I have the following directory structure:
wallpaper/
-main.py
-ng/
-- __init__.py
-- setdesktop.py
-yb/
-- __init__.py
-- setdesktop.py
From main.py, I
Phoe6 wrote:
Hi all,
I have the following directory structure:
wallpaper/
-main.py
-ng/
-- __init__.py
-- setdesktop.py
-yb/
-- __init__.py
-- setdesktop.py
From main.py, I
See the library reference for information on how to get the value of
form/request parameters from the CGI environment:
http://docs.python.org/lib/node561.html
Paul
Thanks again Paul - now I can see that the request object is a
string of name/value pairs that occurs after a ? in a url e.g.
Hello!
I'm using subprocess.Popen in python script in vim.
It called this way:
def some_func():
p = subprocess.Popen( command , stdout = subprocess.PIPE,
stderr =
subprocess.STDOUT)
while True:
s = p.stdout.readline()
hi,
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I do that? the string
could might include name of the module.
for example
a_string = 'datetime.' + 'today()'
I'm trying to parse with pyparsing but the grammar I'm using is somewhat
unorthodox. I need to be able to parse something like the following:
UPPER CASE WORDS And Title Like Words
...into two sentences:
UPPER CASE WORDS
And Title Like Words
I'm finding this surprisingly hard to
On Oct 22, 10:21 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
iu2 wrote:
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC (localhost) (I use
Windows)
it worked ok. But putting the server on a different PC raised the
On Oct 22, 1:24 pm, Peter Otten [EMAIL PROTECTED] wrote:
Phoe6 wrote:
Hi all,
I have the following directory structure:
wallpaper/
-main.py
-ng/
-- __init__.py
-- setdesktop.py
-yb/
--
On 10/22/07, james_027 [EMAIL PROTECTED] wrote:
hi,
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I do that? the string
could might include name of the
Hi, I'm working on a project that outputs several languages including
(hopefully) python. My problem is that the generic backend architecture
has not been designed to output correctly indented code, and that would
be helpful if there were somewhere a python pre-processor that would take
python
On Oct 22, 10:44 am, Paul Brauner [EMAIL PROTECTED] wrote:
Hi, I'm working on a project that outputs several languages including
(hopefully) python. My problem is that the generic backend architecture
has not been designed to output correctly indented code, and that would
be helpful if there
For my C application, I use many interpreters (withh the fonction
Py_NewInterpreter()). For my needs, I create many GUI with wxPython
and I have problems. Here is My C Code:
{
PyEval_InitThreads();
Py_Initialize();
PyImport_ImportModule(myModule);//it creates a wxApp and a GUI
I'll look at that. Thanks a lot !
--
http://mail.python.org/mailman/listinfo/python-list
Hello Chaps,
I've got a requirement to check a file for a change every 10 seconds or so,
and if the file has been modified since the last time I parsed its content
into the application then I need to parse it in again. However, I need this
process to not interrupt the rest of my application
On Mon, 22 Oct 2007 09:44:27 +, Paul Brauner wrote:
Hi, I'm working on a project that outputs several languages including
(hopefully) python. My problem is that the generic backend architecture
has not been designed to output correctly indented code, and that would
be helpful if there
On 22 Okt, 03:53, Tim Chase [EMAIL PROTECTED] wrote:
This seems to be intentional, rather than a bug. In my
python2.4/urlparse.py file, there's a uses_netloc list which
clearly does not have 'mailto' in it. I can't give an
explanation/justification for it, but it seems to me (IMHO) that
Hi,
I have a if..else statement in my script. The statements all execute
fine, but the problem is , even if the IF part of the statement is
true, the else part executes as well. The verion of pythin i use 2.5
Any help is appreciatiated.
Regards
Big Den.
--
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I do that? the string
could might include name of the module.
for example
a_string = 'datetime.' +
I doubt that indexing has anything to do with it whatsoever.
Of course it does. ORDER BY, LIKE, TRIM, and other SQL expressions
that
do more than an equal comparison need to know the actual data
representation. If you were to convert to UTF-8 or UCS-2 in the Python
program and
On 22 Okt, 10:34, sami [EMAIL PROTECTED] wrote:
See the library reference for information on how to get the value of
form/request parameters from the CGI environment:
http://docs.python.org/lib/node561.html
Paul
Thanks again Paul - now I can see that the request object is a
string of
bigden007 wrote:
I have a if..else statement in my script. The statements all execute
fine, but the problem is , even if the IF part of the statement is
true, the else part executes as well. The verion of pythin i use 2.5
Any help is appreciatiated.
You're doing something wrong. Without
Thanks for any help
--
http://mail.python.org/mailman/listinfo/python-list
iu2 wrote:
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC (localhost) (I use
Windows)
it worked ok. But putting the server on a different PC raised the
error:
gaierror: (11001, 'getaddrinfo failed')
The error was raised
Trent Nelson napisał(a):
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I do that? the string
could might include name of the module.
for example
a_string
Maybe using the IP-address helps?
Diez- Hide quoted text -
- Show quoted text -
No, that doesn't help either.
May be I don't use it right.
I tried http://1.2.3.4:8000;
and
rhttp://\\1.2.3.4:8000;
with no success.
The former should work. The latter is Windows-name-style and has
Your else statement is incorrectly indented. The interpreter treats it
as part of the for-loop construct inside the if statement rather than as
part of the if statement itself. See the recent thread about for-else
constructs for more details.
If your problem is not obvious yet, make sure you
Works as expected here, the 'else' part is not executed if the 'if' part is
true.
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type help, copyright, credits or license for more information.
def tr():
... print tr
bigden007 wrote:
Hi,
I have a if..else statement in my script. The statements all execute
fine, but the problem is , even if the IF part of the statement is
true, the else part executes as well. The verion of pythin i use 2.5
Any help is appreciatiated.
Regards
Big Den.
Your else
On Oct 19, 6:34 am, Nils [EMAIL PROTECTED] wrote:
Use apply(): http://docs.python.org/lib/non-essential-built-in-funcs.html
Did you actually read the title of the page you linked to (Non-
essential Built-in Functions)?
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 22, 4:41 am, Francesco Guerrieri [EMAIL PROTECTED]
wrote:
On 10/22/07, james_027 [EMAIL PROTECTED] wrote:
hi,
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to
On Oct 21, 7:28 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Sun, 21 Oct 2007 09:50:54 -0700, sophie_newbie
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
Hi, I'm running a python script which if I run from the command line
as root runs fine. But if I run it through the
On Oct 22, 5:46 am, Jarek Zgoda [EMAIL PROTECTED] wrote:
Do not use eval(). Not only it's deprecated, it's also unsafe.
I don't think it's deprecated; it doesn't say so:
http://docs.python.org/lib/built-in-funcs.html#l2h-25
--
http://mail.python.org/mailman/listinfo/python-list
bigden007 a écrit :
Hi,
I have a if..else statement in my script. The statements all execute
fine, but the problem is , even if the IF part of the statement is
true, the else part executes as well. The verion of pythin i use 2.5
Any help is appreciatiated.
My crystal ball tells me the
james_027 a écrit :
hi,
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I do that? the string
could might include name of the module.
for example
On Oct 22, 10:58 am, Paul Brauner [EMAIL PROTECTED] wrote:
I'll look at that. Thanks a lot !
I've just had a look, it's the pindent.py script in Tools/Scripts (at
least it is on Windows). It takes code of the following form:
def foobar(a, b):
if a == b:
a = a+1
elif a b:
b
Jarek Zgoda a écrit :
Trent Nelson napisał(a):
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I do that? the string
could might include name of the module.
Trent Nelson a écrit :
(snip (rather convoluted) decorator example)
When Python first parses your code, every time it runs into '@A', it
calls A() in order to get the required decorator function.
It's not happening at parsing time, but when the (decorated) def
statement is executed - that is,
On Mon, 22 Oct 2007 09:44:27 + (UTC), Paul Brauner [EMAIL PROTECTED]
wrote:
[snip]
I thought that it must exists because everyone generating python code will
encounter more or less the same problem, but I didn't find any 'official'
thing on the subject.
I expect many projects which emit
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
--
http://mail.python.org/mailman/listinfo/python-list
Py-Fun wrote:
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
Show us your attempts, and we might suggest a fix. Because otherwise this
sounds suspiciously like homework.
Diez
--
Thomas Guettler [EMAIL PROTECTED] writes:
Hi,
CGIHTTPServer does not support redirects[1]
Is there an other python-only way to get a web server
running wich can execute python code?
Since I already use flup[2]. I think there is not much
missing to get it serving as http server.
Has
On Oct 22, 12:47 pm, J. Cliff Dyer [EMAIL PROTECTED] wrote:
iu2 wrote:
Hi all,
I've copied the example of RPC usage from the Python's doc.
When the client and server were on the same PC (localhost) (I use
Windows)
it worked ok. But putting the server on a different PC raised the
Le Mon, 22 Oct 2007 05:00:02 -0700, Ant a écrit :
On Oct 22, 10:58 am, Paul Brauner [EMAIL PROTECTED] wrote:
I'll look at that. Thanks a lot !
I've just had a look, it's the pindent.py script in Tools/Scripts (at
least it is on Windows). It takes code of the following form:
def foobar(a,
On 22 Oct, 13:28, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Py-Fun wrote:
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
Show us your attempts, and we might suggest a fix. Because
Matthew Wilson [EMAIL PROTECTED] writes:
I'm curious if anyone has ever tried using nosetests along with
minimock.
This has nothing to do with nose.
I'm trying to get the two to play nice and not making progress. I
also wonder if I'm using minimock incorrectly.
Here's the code I want to
Py-Fun wrote:
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
As opposed to what, a complicated one?
--
http://mail.python.org/mailman/listinfo/python-list
Py-Fun wrote:
def itforfact(n):
while n100:
print n
n+1
n = input(Please enter a number below 100)
You function should probably return something. After that, you can see
what happens with the result you get.
--
http://mail.python.org/mailman/listinfo/python-list
TeX, in my opinion, has done massive damage to the computing world.
i have written on this variously in emails. No coherent argument, but
the basic thoughts are here:
http://xahlee.org/cmaci/notation/TeX_pestilence.html
it's slightly repeatitous there. But i think i might summarize in gist
the
Py-Fun [EMAIL PROTECTED] wrote:
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
This version avoids doing anything fancier than adding 1, so it should be
simple enough for anyone:
def
On 22 Oct, 13:43, Marco Mariani [EMAIL PROTECTED] wrote:
Py-Fun wrote:
def itforfact(n):
while n100:
print n
n+1
n = input(Please enter a number below 100)
You function should probably return something. After that, you can see
what happens with the result you get.
On Oct 22, 2:43 pm, Marco Mariani [EMAIL PROTECTED] wrote:
Py-Fun wrote:
def itforfact(n):
while n100:
print n
n+1
n = input(Please enter a number below 100)
You function should probably return something. After that, you can see
what happens with the result you
On 10/22/07, Py-Fun [EMAIL PROTECTED] wrote:
On 22 Oct, 13:28, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Py-Fun wrote:
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
Show us your
On Oct 22, 5:43 pm, Marco Mariani [EMAIL PROTECTED] wrote:
Py-Fun wrote:
def itforfact(n):
while n100:
print n
n+1
n = input(Please enter a number below 100)
You function should probably return something. After that, you can see
what happens with the result you
On Oct 18, 5:04 pm, IamIan [EMAIL PROTECTED] wrote:
The OP's problem is that he suffers from the delusion that people want
to steal the source code for hisCGIscript.
Why is assuming someone may try to get my source CGI delusional?
I'm on a shared server (Dreamhost). The CGI itself has
Xah Lee wrote:
i have written ... No coherent argument,
--
Lew
--
http://mail.python.org/mailman/listinfo/python-list
How can I test the web page which is opened by window.showModalDialog()
method using PAMIE?
There are two html pages:a.html and b.html.
[a.html]:
input type=button onClick='a();' value=button_a
script type=text/javascript
!--
function a(){
yin = window.showModalDialog(b.htm,hehe);
}
//--
/script
On Oct 22, 4:53 am, [EMAIL PROTECTED] wrote:
For my C application, I use many interpreters (withh the fonction
Py_NewInterpreter()). For my needs, I create many GUI with wxPython
and I have problems. Here is My C Code:
{
PyEval_InitThreads();
Py_Initialize();
On Oct 21, 11:25 am, enska [EMAIL PROTECTED] wrote:
Can someone clarify the steps needed to make access to the interpreter
safe from multiple threads?
I've been reading the docs for days and I still find them very confusing
and misleading. For example does the PyGILState_Ensure() function
exec(import datetime) ; exec(x = datetime. + date. + today())
print x
2007-10-22
james_027 wrote:
hi,
i have a function that I could like to call, but to make it more
dynamic I am constructing a string first that could equivalent to the
name of the function I wish to call. how could I
QOTW: [T]here's always no best. - Lawrence Oluyede
http://groups.google.com/group/comp.lang.python/msg/32bce47d185 ce42e
I actually do a lot of unit testing. I find it both annoying and highly
necessary and useful. - Steven Bethard
Jean-Paul Calderone wrote:
On Sat, 20 Oct 2007 21:10:34 +0200 (CEST), sccs cscs [EMAIL PROTECTED]
wrote:
Hello,
I cannot find into documentation how to get the instance name. I found
the attributes __dict__,__class__ ,__bases__ __name__ ,
but if i have the code:
class A :pass
a1 = A ()
En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue
[EMAIL PROTECTED] escribi�:
I've got a requirement to check a file for a change every 10 seconds or
so,
and if the file has been modified since the last time I parsed its
content
into the application then I need to parse
Gabriel Genellina wrote:
En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue
[EMAIL PROTECTED] escribi�:
I've got a requirement to check a file for a change every 10 seconds or
so,
and if the file has been modified since the last time I parsed its
content
into the
Thanks for your time Gabriel,
That certainly looks to be the type of thing that I'm looking to achieve,
however, I forgot to mention I'm running this on a Linux platform and not a
Win32 one :-( Sorry.
I'm sure similar things are achievable, I've used os.stat before now to get the
time stamp
On 10/22/07, Nicholas Bastin [EMAIL PROTECTED] wrote:
Object-oriented programming is a design choice, not a language
feature. You can write straight procedural code in C++, and you can
write object oriented code in C. Sure, C++ has some language features
which facilitate object-oriented
On Oct 22, 1:26 pm, Py-Fun [EMAIL PROTECTED] wrote:
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
The following simple adder functions should give you an idea of how
recursion can be recast
Hi,
I'm trying to build a Sun Solaris Version of Python from the source so
that both, 32-bit and 64-bit libraries are present.
I can successfully build a 32-bit version in one directory and a 64-bit
version in another directory. What I'd like to do is to build a version
that has the 64-bit
Stefan Bellon wrote:
Hi,
I'm trying to build a Sun Solaris Version of Python from the source so
that both, 32-bit and 64-bit libraries are present.
I can successfully build a 32-bit version in one directory and a 64-bit
version in another directory. What I'd like to do is to build a
En Mon, 22 Oct 2007 05:34:55 -0300, sami [EMAIL PROTECTED] escribi�:
Thanks again Paul - now I can see that the request object is a
string of name/value pairs that occurs after a ? in a url e.g.
url.com/index.cgi?name=samilang=python - is that correct? Googling
for this information is useless
Spot on Tim, I'm running Linux, I totally forgot to mention... more detail
coming in a reply to Gabriel's post.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden
Sent: 22 October 2007 15:40
Cc: python-list@python.org
Subject: Re: Check File
Hi!
VIM can, also, to be OLE-COM-server.
Try with:
from win32com.client.dynamic import Dispatch
vim = Dispatch('Vim.Application')
(+google)
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 22 Oct, Diez B. Roggisch wrote:
Stefan Bellon wrote:
I can successfully build a 32-bit version in one directory and a
64-bit version in another directory. What I'd like to do is to
build a version that has the 64-bit library in a sparcv9 directory
but shares the other Python
May be, you could check against globals() dictionary looking for matching
id()'s:
def find_name(identifier):
for k,v in globals().items():
if id(v) == id(identifier):
return k
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 20 Oct 2007 15:02:26 +, BartlebyScrivener wrote:
On Debian Etch, if ~/mypyscripts is in my bash PATH and also in
PYTHONPATH, I get the following pydoc behaviors. Maybe this is
intentional. I'm just checking to be sure I don't have something
misconfigured in my environment.
If I
On Mon, 22 Oct 2007 05:50:30 -0700, Xah Lee [EMAIL PROTECTED] wrote:
TeX, in my opinion, has done massive damage to the computing world.
i have written on this variously in emails. No coherent argument, but
the basic thoughts are here:
http://xahlee.org/cmaci/notation/TeX_pestilence.html
Knuth
From the cookbook, this time.
It satisfies the requirements nicely ;)
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691
def tail_recursion(g):
'''
Version of tail_recursion decorator using no stack-frame
inspection.
'''
loc_vars ={in_loop:False,cnt:0}
Robert Rawlins - Think Blue wrote:
That certainly looks to be the type of thing that I'm looking to achieve,
however, I forgot to mention I'm running this on a Linux platform and not a
Win32 one :-( Sorry.
Did you try python-gamin?
Gamin is a file and directory monitoring system defined to
Marco Mariani wrote:
From the cookbook, this time.
It satisfies the requirements nicely ;)
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691
[... snip the ultimate general-purpose answer to the OP's question ...
I really hope that's a wink up there, Marco. The poor guy
En Mon, 22 Oct 2007 11:45:49 -0300, Robert Rawlins - Think Blue
[EMAIL PROTECTED] escribi�:
Thanks for your time Gabriel,
That certainly looks to be the type of thing that I'm looking to
achieve, however, I forgot to mention I'm running this on a Linux
platform and not a Win32 one :-(
Marco Mariani [EMAIL PROTECTED] writes:
Robert Rawlins - Think Blue wrote:
That certainly looks to be the type of thing that I'm looking to achieve,
however, I forgot to mention I'm running this on a Linux platform and not a
Win32 one :-( Sorry.
Did you try python-gamin?
Gamin is a
Xah Lee [EMAIL PROTECTED] wrote:
4. Inargurated a massive collection of documents that are invalid
HTML. (due to the programing moron's ingorance and need to idolize a
leader, and TeX's inherent problem of being a typesetting system that
is unsuitable of representing any structure or
On Oct 22, 4:18 am, Just Another Victim of the Ambient Morality
[EMAIL PROTECTED] wrote:
I'm trying to parse with pyparsing but the grammar I'm using is somewhat
unorthodox. I need to be able to parse something like the following:
UPPER CASE WORDS And Title Like Words
...into two
Tim Golden wrote:
From the cookbook, this time.
It satisfies the requirements nicely ;)
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691
[... snip the ultimate general-purpose answer to the OP's question ...
I really hope that's a wink up there, Marco.
The wink is in
On Oct 22, 4:18 am, Just Another Victim of the Ambient Morality
[EMAIL PROTECTED] wrote:
I'm trying to parse with pyparsing but the grammar I'm using is somewhat
unorthodox. I need to be able to parse something like the following:
UPPER CASE WORDS And Title Like Words
...into two
While debugging with PDB earlier, I discovered this idiosyncracy:
(Pdb) lstValues
[[Decimal(1), Decimal(47.0)]]
(Pdb) agg
[0, 1]
(Pdb) print list([sum(v[i] for i in range(len(agg))) for v in lstValues])
*** NameError: global name 'v' is not defined
(Pdb)
However, the Python interpreter is happy
Hi,
I have a big log file generated from matlabe, for each variable, it print the
name of the variable and an empty line and then the value. such as:
x1 =
0.1
y =
7
z =
6.7
x1 =
0.5
I want to use python to parse the file and selectively print out the vairable
1 - 100 of 220 matches
Mail list logo