paul wrote:
However, this will change in py3k...,
what's the new rule of thumb?
In py3k, the str type will be what unicode is now, and there
will be a new type called bytes for holding binary data --
including text in some external encoding. These two types
will not be compatible.
At the
Kelie wrote:
Hello,
This function does I what I want. But I'm wondering if there is an
easier/better way. To be honest, I don't have a good understanding of
what pythonic means yet.
def divide_list(lst, n):
Divide a list into a number of lists, each with n items. Extra
items are
coldpizza wrote:
I am always confused as to which one to use: encode() or decode();
In unicode land, an encoding is a method of representing
unicode data in an external format. So you encode unicode
data in order to send it into the outside world, and you
decode it in order to turn it back into
Donn Ingle wrote:
x in range(1,20) ?
Sure, that's okay, but it has clarity issues, and is calling a func.
and it requires that x is integral (1.0 is in the range, 1.001 is not),
and becomes dog slow when the range gets larger. Not a good idea.
Peter
--
On Nov 26, 9:42 am, Kelie [EMAIL PROTECTED] wrote:
Hello,
This function does I what I want. But I'm wondering if there is an
easier/better way. To be honest, I don't have a good understanding of
what pythonic means yet.
def divide_list(lst, n):
Divide a list into a number of lists,
* Ben Finney (Mon, 26 Nov 2007 09:04:51 +1100)
Thorsten Kampe [EMAIL PROTECTED] writes:
* Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600)
Thorsten Kampe wrote:
can anyone give me a short code snippet how to install a missing
module via setuptools (assuming setuptools is already
none wrote:
IIRC, I once saw an explanation how Python doesn't have variables
in the sense that, say, C does, and instead has bindings from names to
objects.
If you're talking to C programmers, just tell them that
Python variables always contain pointers. That should
give them the right
Hello,
According to the tk wiki, the final release of Tcl/Tk is just weeks away (see
http://wiki.tcl.tk/12753). Does anyone know if the Tk enhancements will be in
Python 2.6? Since I don't use tk but I do use Python and Tkinter (and Tix)
extensively, I'm excited about these long-awaited
Chris [EMAIL PROTECTED] writes:
for i in range(int(round((len(lst)/n),0))): ...
Ugh!!! Not even correct (under future division), besides being ugly.
I think you mean:
for i in xrange(len(lst) // n): ...
Really though, this grouping function gets reimplemented so often that
it should be
On Nov 25, 2007 6:19 PM, @bag.python.org none wrote:
IIRC, I once saw an explanation how Python doesn't have variables in
the sense that, say, C does, and instead has bindings from names to
objects. Does anyone have a link?
Perhaps you mean:
http://effbot.org/zone/python-objects.htm
nani a écrit :
i am getting the following error for below code
(snip)
C:\Program Files\Apache Group\Apache2\cgi-bin\hello.py in ()
7
8 val = cgi.FieldStorage()
9 name = val[name].value
(snip)
type 'exceptions.KeyError': 'name'
Obviously there's no 'name' argument in the
On Nov 26, 10:51 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Chris [EMAIL PROTECTED] writes:
for i in range(int(round((len(lst)/n),0))): ...
Ugh!!! Not even correct (under future division), besides being ugly.
I think you mean:
for i in xrange(len(lst) // n): ...
Really
Kelie [EMAIL PROTECTED] writes:
Hello,
This function does I what I want. But I'm wondering if there is an
easier/better way. To be honest, I don't have a good understanding of
what pythonic means yet.
def divide_list(lst, n):
Divide a list into a number of lists, each with n items.
greg [EMAIL PROTECTED] writes:
none wrote:
IIRC, I once saw an explanation how Python doesn't have
variables in the sense that, say, C does, and instead has bindings
from names to objects.
If you're talking to C programmers, just tell them that Python
variables always contain pointers.
Thorsten Kampe wrote:
* Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600)
Thorsten Kampe wrote:
can anyone give me a short code snippet how to install a missing
module via setuptools (assuming setuptools is already installed)?!
Something like this:
try:
import missing_module
except
Hi,
First of all, since this is my first mail to Python-List, I want to say
Hello world!
After that;
I am stuck in a project. Actually I am writing a module (for testing now),
which takes URL, parses it, finds which modules and then which method to
call or which class to initiate and which string
The output of the following program might help:
Hey, nifty! Thanks Paddy.
\d
--
http://mail.python.org/mailman/listinfo/python-list
Well, I don't know all the answers, but you can start here:
def boobs(): print Oohh little birds!
b=boobs
eval(b)()
Ohhh little birds!
Naturally, eval is going to run anything... Even code to format your drive.
HTH
\d
--
http://mail.python.org/mailman/listinfo/python-list
greg schrieb:
paul wrote:
However, this will change in py3k...,
what's the new rule of thumb?
[snipp]
So you won't be able to get away with ignoring encoding
issues in py3k. On the plus side, it should all be handled
in a much more consistent and less error-prone way. If
you mistakenly
Hi all,
I have a problem with regex , utf-8 chars and IGNORECASE
re.search(u'é', u'qwért', re.IGNORECASE)
_sre.SRE_Match object at 0x2ed0c100
Here everything is ok.
re.search(u'É', u'qwért', re.IGNORECASE)
Here that doesn't work. but:
print u'é'.upper()
É
is it a bug in IGNORECASE
Hi
I am new to SWIG and python. I have a problem while trying to call a C
function from Python using SWIG as an interface. The function is
defined as follows.
void* myfunc(TfichierDLR *fichier, char *nom, char *type, char *txt,
char *classe, TicThemeDLR *icTheme, int **num, int *ier)
The last
On Nov 26, 9:53 pm, Yann Le Boulanger [EMAIL PROTECTED] wrote:
Hi all,
I have a problem with regex , utf-8 chars and IGNORECASE
re.search(u'é', u'qwért', re.IGNORECASE)
_sre.SRE_Match object at 0x2ed0c100
Here everything is ok.
re.search(u'É', u'qwért', re.IGNORECASE)
Here that
I'm pleased to announce the first WARsaw PYthoneers meeting which will
be held Nov. 29 at 7 p.m. on Politechnika Warszawska, 15/19 Nowowiejska
st., Warsaw, Poland. More information (in Polish) can be found at
http://7thguard.net/news.php?id=5721 and in an announcement made on
pl.comp.lang.python.
On Nov 21, 1:28 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
duyanningwrote:
I have written a pyhton script that will process data file in current
working directory.
My script is in an different directory to data file.
When I debug this script using pdb within emacs, emacs will change
I need to add spell checking to my Python application (for Windows).
Any ideas on where to start?
Thanks,
Helzer
--
http://mail.python.org/mailman/listinfo/python-list
helzer napisał(a):
I need to add spell checking to my Python application (for Windows).
Any ideas on where to start?
There is Python2.4 compatible binary of aspell-python available at
http://www.wmula.republika.pl/proj/aspell-python/index-c.html
--
Jarek Zgoda
Skype: jzgoda | GTalk: [EMAIL
nani wrote:
i am getting the following error for below code
type 'exceptions.KeyError' Python 2.5.1: C:\Python25\python.exe
Mon Nov 26 10:13:17 2007
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
C:\Program
Somewhere on http://matplotlib.sourceforge.net or elsewhere I found
some hints how to get started writing a new backend for matplotlib. It
mentioned some almost empty kind of template that you could extend for
your needs.
I cannot find this description again. Would somebody help, please?
Cheers
On Nov 24, 2007 11:55 AM, jakub silar [EMAIL PROTECTED] wrote:
Below is my coding standard - I'm lazy, even lazy to persuade
comutinties into strange (imho) language syntax extensions.
class Vector:
def __init__(s, x, y, z):
s.x = x
s.y = y
http://pyenchant.sourceforge.net/
helzer wrote:
I need to add spell checking to my Python application (for Windows).
Any ideas on where to start?
Thanks,
Helzer
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 |
* Robert Kern (Mon, 26 Nov 2007 04:34:17 -0600)
Thorsten Kampe wrote:
* Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600)
Thorsten Kampe wrote:
can anyone give me a short code snippet how to install a missing
module via setuptools (assuming setuptools is already installed)?!
Something
On Nov 23, 7:57 am, jatin patni [EMAIL PROTECTED] wrote:
Hi, I recently started working on WXGlade...
I found some amount of documentation online
I am having problems integrating event handlers with MenubarsI
want each menu item to open a new window with custom made
controls...but I
[EMAIL PROTECTED] wrote:
def xor(a, b):
return a and not b or b and not a
from operator import xor
help(xor)
Help on built-in function xor in module operator:
xor(...)
xor(a, b) -- Same as a ^ b.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Nov 26, 2007 at 04:07:03PM +0530, Ravi Kumar wrote regarding Need to
call functions/class_methods etc using string ref :How:
Hi,
First of all, since this is my first mail to Python-List, I want to say
Hello world!
After that;
I am stuck in a project. Actually I am
On Nov 25, 2007, at 9:49 PM, Donn Ingle wrote:
if 0 x 20: print within
That means if x LESS THAN 0 and x 20.
Oh, bugger. It's tricky.
So try
if 0 x 20:
Thanks. I was flipping signs in my tests, but I guess I flipped
both and got
myself all confused.
Likely manuals: Tutorial
On 2007-11-26, Boris Borcic [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
def xor(a, b):
return a and not b or b and not a
from operator import xor
help(xor)
Help on built-in function xor in module operator:
xor(...)
xor(a, b) -- Same as a ^ b.
Which isn't the same
Graham Dumpleton wrote:
The other question is whether there is even a demand for this. Do
people want to be able to take unmodified Python CGI scripts and try
to run them persistently in this way, or would they be better off
converting them to proper WSGI applications.
I would personally be
On Nov 26, 2007, at 2:29 AM, Peter Otten wrote:
Donn Ingle wrote:
x in range(1,20) ?
Sure, that's okay, but it has clarity issues, and is calling a func.
and it requires that x is integral (1.0 is in the range, 1.001 is
not),
and becomes dog slow when the range gets larger. Not a good
Bluebird:
If you are using python 2.5, relative imports are no longer an issue:
http://docs.python.org/whatsnew/pep-328.html
That problem solved, what you sometimes want is to change the version
of your package. I just change the text in the PTH file, to point to
another version, and voilá (no
Grant Edwards wrote:
The user-defined xor is operates on logical boolean values.
The one in the operator module is a bitwise operator.
def xor(a, b):
return bool(a) ^ bool(b)
seems more explicit to me.
maybe, to make more explicit (too much, onestly...)
from operator import xor as
I see someone already showed you eval. Eval is evil. Don't use it.
Especially if the functions are coming to you from a public URL!
Yes, I suggested to him (by email) this:
thisinstance = SomeObject.__class__.__dict__
Then you have a list of strings that may be function names, so:
for f in
On Nov 24, 1:19 am, Vernon Wenberg III [EMAIL PROTECTED] wrote:
Why do I receive a File not found error on a perfect good and simple
script but properly receive errors when I deliberately add errors in the
script? The file is there, it just doesn't do anything.
Any help would be appreciated.
On Nov 25, 10:51 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Really though, this grouping function gets reimplemented so often that
it should be built into the stdlib, maybe in itertools.
thanks Paul.
itertools? that was actually the first module i checked.
--
Thorsten Kampe wrote:
* Robert Kern (Mon, 26 Nov 2007 04:34:17 -0600)
Thorsten Kampe wrote:
* Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600)
Thorsten Kampe wrote:
can anyone give me a short code snippet how to install a missing
module via setuptools (assuming setuptools is already
On Nov 25, 11:24 pm, Paul Rudin [EMAIL PROTECTED] wrote:
See the last recipe from:http://docs.python.org/lib/itertools-recipes.html.
It's not doing
quite the same thing, but gives an illustration of one way to approach
this sort of thing.
Thanks for the link!
--
Hi All,
I have problem to split a string like this:
'abc.defg.hij.klmnop'
and I want to get all substrings with only one '.' in mid. so the
output I expect is :
'abc.defg', 'defg.hij', 'hij.klmnop'
a simple regular expression '\w+.\w' will only return:
'abc.defg', 'hij.klmnop'
is there a way
ZeD wrote:
Grant Edwards wrote:
The user-defined xor is operates on logical boolean values.
The one in the operator module is a bitwise operator.
def xor(a, b):
return bool(a) ^ bool(b)
seems more explicit to me.
maybe, to make more explicit (too much, onestly...)
from operator
On Nov 26, 2007 3:24 AM, Paul Rudin [EMAIL PROTECTED] wrote:
Kelie [EMAIL PROTECTED] writes:
Hello,
This function does I what I want. But I'm wondering if there is an
easier/better way. To be honest, I don't have a good understanding of
what pythonic means yet.
def divide_list(lst,
On Nov 25, 5:11 pm, Nikola Skoric [EMAIL PROTECTED] wrote:
Dana Sun, 25 Nov 2007 13:52:35 -0800 (PST),
[EMAIL PROTECTED] [EMAIL PROTECTED] kaze:
Looks like Microsoft thinks you mis-spelled it.
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w...
I would check and see
On Nov 26, 10:40 am, lisong [EMAIL PROTECTED] wrote:
Hi All,
I have problem to split a string like this:
'abc.defg.hij.klmnop'
and I want to get all substrings with only one '.' in mid. so the
output I expect is :
'abc.defg', 'defg.hij', 'hij.klmnop'
a simple regular expression
Hi,
I've used subprocess with 2.4 several times to execute a process, wait
for it to finish, and then look at its output. Now I want to spawn
the process separately, later check to see if it's finished, and if it
is look at its output. I may want to send a signal at some point to
kill the
lisong wrote:
Hi All,
I have problem to split a string like this:
'abc.defg.hij.klmnop'
and I want to get all substrings with only one '.' in mid. so the
output I expect is :
'abc.defg', 'defg.hij', 'hij.klmnop'
a simple regular expression '\w+.\w' will only return:
'abc.defg',
On Nov 26, 10:54 am, bhunter [EMAIL PROTECTED] wrote:
Hi,
I've used subprocess with 2.4 several times to execute a process, wait
for it to finish, and then look at its output. Now I want to spawn
the process separately, later check to see if it's finished, and if it
is look at its output.
[EMAIL PROTECTED] (John J. Lee) writes:
Not much to add to the subject line. I mean something like this:
ProxyClass.__name__ = ProxiedClass.__name__
I've been told that this is common practice. Is it? Would this
surprise you if you ran into it in a debugging session?
Does nobody have
On Nov 26, 1:42 am, Kelie [EMAIL PROTECTED] wrote:
Hello,
This function does I what I want. But I'm wondering if there is an
easier/better way. To be honest, I don't have a good understanding of
what pythonic means yet.
def divide_list(lst, n):
Divide a list into a number of lists,
On Nov 26, 10:51 am, Paul McGuire [EMAIL PROTECTED] wrote:
On Nov 26, 10:40 am, lisong [EMAIL PROTECTED] wrote:
Hi All,
I have problem to split a string like this:
'abc.defg.hij.klmnop'
and I want to get all substrings with only one '.' in mid. so the
output I expect is :
lisong wrote:
Hi All,
I have problem to split a string like this:
'abc.defg.hij.klmnop'
and I want to get all substrings with only one '.' in mid. so the
output I expect is :
'abc.defg', 'defg.hij', 'hij.klmnop'
a simple regular expression '\w+.\w' will only return:
'abc.defg',
On Mon, Nov 26, 2007 at 06:04:54PM +0100, Diez B. Roggisch wrote regarding Re:
How to write Regular Expression for recursive matching?:
lisong wrote:
Hi All,
I have problem to split a string like this:
'abc.defg.hij.klmnop'
and I want to get all substrings with only one '.'
I've read that this sort of thing can be a pain. I'm sure someone will
post and have other views though. I have had some success using
Python's threading module though. There's a pretty good walkthrough
here (it uses wxPython in its example):
http://wiki.wxpython.org/LongRunningTasks
Other
On Nov 26, 12:34 pm, J. Clifford Dyer [EMAIL PROTECTED] wrote:
On Mon, Nov 26, 2007 at 06:04:54PM +0100, Diez B. Roggisch wrote regarding
Re: How to write Regular Expression for recursive matching?:
lisong wrote:
Hi All,
I have problem to split a string like this:
I also cannot wait!
On Nov 24, 2007 4:12 PM, Ron Provost [EMAIL PROTECTED] wrote:
Hello,
According to the tk wiki, the final release of Tcl/Tk is just weeks away
(see http://wiki.tcl.tk/12753). Does anyone know if the Tk enhancements
will be in Python 2.6? Since I don't use tk but I do
On Nov 26, 12:27 pm, bhunter [EMAIL PROTECTED] wrote:
I've read that this sort of thing can be a pain. I'm sure someone will
post and have other views though. I have had some success using
Python's threading module though. There's a pretty good walkthrough
here (it uses wxPython in its
bhunter schrieb:
Hi,
I've used subprocess with 2.4 several times to execute a process, wait
for it to finish, and then look at its output. Now I want to spawn
the process separately, later check to see if it's finished, and if it
is look at its output. I may want to send a signal at some
John J. Lee schrieb:
[EMAIL PROTECTED] (John J. Lee) writes:
Not much to add to the subject line. I mean something like this:
ProxyClass.__name__ = ProxiedClass.__name__
I've been told that this is common practice. Is it? Would this
surprise you if you ran into it in a debugging
Donn Ingle a écrit :
I see someone already showed you eval. Eval is evil. Don't use it.
Especially if the functions are coming to you from a public URL!
Yes, I suggested to him (by email) this:
thisinstance = SomeObject.__class__.__dict__
Then you have a list of strings that may be
On Nov 26, 7:42 am, Kelie [EMAIL PROTECTED] wrote:
Hello,
This function does I what I want. But I'm wondering if there is an
easier/better way. To be honest, I don't have a good understanding of
what pythonic means yet.
def divide_list(lst, n):
Divide a list into a number of lists,
Ton van Vliet a écrit :
On 24 Nov 2007 13:56:37 GMT, Marc 'BlackJack' Rintsch [EMAIL PROTECTED]
wrote:
(snip)
So::
def meth(self):
using self:
tmp = raw_input('Enter age: ')
age = int(tmp)
becomes::
def meth(self):
using self:
self.tmp =
samwyse a écrit :
(snip)
Besides Pascal, Visual Basic also offers a 'with' statement that
behaves almost in this way. That in itself should be an indication
that the whole thing is a bad idea. ;-)
FWIW, Javascript has it too - and it's considered a BadPractice(tm) to
use it...
--
Ton van Vliet a écrit :
On 24 Nov 2007 16:07:18 GMT, Duncan Booth
[EMAIL PROTECTED] wrote:
Ton van Vliet [EMAIL PROTECTED] wrote:
It would boil down to choice: explicit/speed vs implicit/readability
No, it would boil down to explicit+speed+readability+maintainability vs
implicit+error
Hrvoje Niksic wrote:
greg [EMAIL PROTECTED] writes:
none wrote:
IIRC, I once saw an explanation how Python doesn't have
variables in the sense that, say, C does, and instead has bindings
from names to objects.
IMHO, this is nonsense. All that variables are (in any language) are
Patrick Mullen a écrit :
(snip)
Still an unnecessary lookup on tmp though :) And it would be useless
to use it for one assignment, the idea is to eliminate all the typing
with this:
self.var1 = 5
self.var2 = a value
self.var3 = stuff
self.var4 = [2,54,7,7]
self.var5 = dingaling
samwyse a écrit :
(snip)
Actually, the chained dots are solving a completely different problem,
that of refactoring a collection of functions that use global vars
into a class.
Using globals to maintain state between functions being bad practice in
most cases, I don't see any reason to
This is just the way I do it...as I said, there are probably some
other people in the group who will have other opinions. By the way,
your statement I was hoping not to have to avoid that means that you
hoped to use threading...which I think is contradictory to what you
meant.
Mike
That
Peter Otten wrote:
def chunks(items, n):
... return [items[start:start+n] for n in range(0, len(items)-n+1, n)]
Ouch, this should be
def chunks(items, n):
return [items[start:start+n] for start in range(0, len(items)-n+1, n)]
Peter
--
On Nov 26, 1:50 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
bhunter schrieb:
Hi,
I've used subprocess with 2.4 several times to execute a process, wait
for it to finish, and then look at its output. Now I want to spawn
the process separately, later check to see if it's finished,
Hi
I've read around quite a bit about Unicode and python's support for
it, and I'm still unclear about how it all fits together in certain
scenarios. Can anyone help clarify?
* When I say # -*- coding: utf-8 -*- and confirm my IDE is saving
the source file as UTF-8, do I still need to prefix
On Nov 26, 2007 1:21 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hrvoje Niksic wrote:
greg [EMAIL PROTECTED] writes:
none wrote:
IIRC, I once saw an explanation how Python doesn't have
variables in the sense that, say, C does, and instead has bindings
from names to objects.
The gnosis xml libs should not be version specific, but when I try to use
Python 2.5, I am getting not well formed (invalid token) errors.
Harry
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| Hi
| I am new to SWIG and python. I have a problem while trying to call a C
| function from Python using SWIG as an interface.
Did you consider using the ctypes module?
(It is new in the stdlib for 2.5, I believe.)
Some consider it
bhunter schrieb:
On Nov 26, 1:50 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
bhunter schrieb:
Hi,
I've used subprocess with 2.4 several times to execute a process, wait
for it to finish, and then look at its output. Now I want to spawn
the process separately, later check to see if it's
target = module or any other objet here
for funcname in funclist:
func = getattr(target, funcname, None)
if callable(func):
func(*args, **kwargs)
Nice. 'callable' is new to me. Live and learn :)
\d
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 26, 1:46 pm, Wang, Harry [EMAIL PROTECTED] wrote:
The gnosis xml libs should not be version specific, but when I try to use
Python 2.5, I am getting not well formed (invalid token) errors.
Harry
When does this happen? When you import the module? When you pass it
some xml? Do you have
On Nov 26, 8:46 pm, Wang, Harry [EMAIL PROTECTED] wrote:
The gnosis xml libs should not be version specific, but when I try to use
Python 2.5, I am getting not well formed (invalid token) errors.
Harry
Could you show us a simple example that exhibits this behavior
please ?
SB
--
Full Traceback enclosed:
Test Suite Started @ 2007-11-26 11:34:46.617000
Traceback (most recent call last):
File C:\UDR2\UDRxmlGateway.py, line 370, in module
ParseAll()
File C:\UDR2\UDRxmlGateway.py, line 286, in ParseAll
py_obj =
Donn Ingle a écrit :
target = module or any other objet here
for funcname in funclist:
func = getattr(target, funcname, None)
if callable(func):
func(*args, **kwargs)
Nice. 'callable' is new to me.
What about getattr, then ?-)
And FWIW, callable will disappear in py3k... (anyway, you can just
I can't tell where in the XML file it throws the error.
Here is the snippet of the Python code:
def ParseAll():
py_obj = gnosis.xml.objectify.XML_Objectify(InputFile).make_instance()
Harry C. Wang
Sr. Test Engineer (Automation)
AOL Mobile
Phone 206 - 268 - 7502
temporary e-mail: [EMAIL
On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
However, I was more thinking in terms of attributes only
Too bad : in Python, everything's an object, so 'methods' are attributes
too.
Right, but I'm sure *you* know a way to distinguish between them (I'm
just a
On Nov 26, 2:33 pm, Wang, Harry [EMAIL PROTECTED] wrote:
Full Traceback enclosed:
Test Suite Started @ 2007-11-26 11:34:46.617000
Traceback (most recent call last):
File C:\UDR2\UDRxmlGateway.py, line 370, in module
ParseAll()
File C:\UDR2\UDRxmlGateway.py, line 286, in ParseAll
Problem solved.
I left out a right closing tag () in the XML, but I am having another
problem.
Harry C. Wang
Sr. Test Engineer (Automation)
AOL Mobile
Phone 206 - 268 - 7502
temporary e-mail: [EMAIL PROTECTED]
Personal e-mail: [EMAIL PROTECTED]
--
On Nov 26, 3:05 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
bhunter schrieb:
On Nov 26, 1:50 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
bhunter schrieb:
Hi,
I've used subprocess with 2.4 several times to execute a process, wait
for it to finish, and then look at its output.
On Nov 27, 3:01 am, Erik Jones [EMAIL PROTECTED] wrote:
On Nov 25, 2007, at 9:49 PM, Donn Ingle wrote:
if 0 x 20: print within
That means if x LESS THAN 0 and x 20.
Oh, bugger. It's tricky.
So try
if 0 x 20:
Thanks. I was flipping signs in my tests, but I guess I flipped
Bruno Desthuilliers wrote:
[snip]
Too bad : in Python, everything's an object, so 'methods' are attributes
too.
What do you see as a problem here?
Surely it gives useful flexibility.
Colin W.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 26, 8:19 am, Peter Otten [EMAIL PROTECTED] wrote:
[...]
Or build a generator that works with arbitrary iterables:
from itertools import *
def chunks(items, n):
... items = iter(items)
... while 1:
... chunk = list(islice(items, n-1))
...
Sorry about the simple question ...
I'd like to install Python 3000 on my computers (Mac, and possibly
Windows), without messing up the existing versions. So far, I've
always relied on using .msi on Windows and .dmg on the Mac.
From the Python site, I read (different version, but still...):
On Nov 25, 10:36 pm, Ben Finney [EMAIL PROTECTED]
wrote:
In addition to the good answers you've had already, I highly recommend
David Goodger's Code like a Pythonista page
URL:http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html,
which contains a very good cardboard boxes
I have a Python script that does a fork/exec, so the parent process
can get the child's PID and monitor /proc/PID/stat (on a CentOS
system). Most of my processes' command lines are straightforward
enough to do this with, but I have a handful that use on the command
line, eg
André wrote:
The step that gets me worried is the make install one... I don't want it
to take over as default. I would like to be able to invoke it by typing
python3k ... from anywhere and have it work - while still having
python invoke the default 2.5 version.
You want
make altinstall
On Nov 26, 2007, at 3:58 PM, Dan Upton wrote:
I have a Python script that does a fork/exec, so the parent process
can get the child's PID and monitor /proc/PID/stat (on a CentOS
system). Most of my processes' command lines are straightforward
enough to do this with, but I have a handful that
I'd like to install Python 3000 on my computers (Mac, and possibly
Windows), without messing up the existing versions. So far, I've
always relied on using .msi on Windows and .dmg on the Mac.
From the Python site, I read (different version, but still...):
Unpack the archive with tar
On Mon, 26 Nov 2007 21:37:19 +1300, greg wrote:
none wrote:
IIRC, I once saw an explanation how Python doesn't have variables
in the sense that, say, C does, and instead has bindings from names to
objects.
If you're talking to C programmers, just tell them that Python variables
always
1 - 100 of 157 matches
Mail list logo