On 07/07/2012 11:05 AM, Maurizio Spadaccino wrote:
> Thanks again Emile, I'll try out some examples. I found this one:
> http://showmedo.com/videotutorials/video?name=2190050&fromSeriesID=219
> quite enlightning.
> One last doubt is: say the python code gets used by more Excel Users
> (different
On 07/06/2012 11:40 PM, Salman Malik wrote:
> Hi All,
>
> I have used the Python's C-API to call some Python code in my c code and
> now I want to know how much time does my Python part of the program
> takes. I came across the PyEval_SetProfile API and am not sure how to
> use it. Do I need to wr
d processes in sequence.
(This sounds to me like an application better implemented thread-less,
using select() or some method of asynchronous I/O. Just a shame that
Python makes neither at all pleasant and leaves threads as the nicest
option)
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On 07/08/2012 11:03 AM, Andrew D'Angelo wrote:
> Also, running the sned to socket code inside the main loop would not work,
> as the main loop pauses until it recieves data from the socket (an IRC
> message), which is why I didn't put the SMS code in the main loop in the
> first place.
http://
uld only modify these objects (not possible as ints are
immutable), you would notice the changes here and there.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
t all of them on
your keyboard.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
But even those don't do that under all circumstances. Think about
__setitem__, __setattr__, __set__, __delitem__, __delattr__, __delete__.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On 07/29/2012 02:30 PM, subhabangal...@gmail.com wrote:
> Thanks for the answer. But my list does not contain another list that is the
> issue. Intriguing. Thinking what to do.
What does your list contain? Can you reproduce the issue in a few
self-contained lines of code that you can show us, th
Hi,
I send from a client file content to my server (as bytes). So far so good.
The server receives this content complete. Ok. Then I want to write this
content to a new file. It works too. But in the new file are only the first
part of the whole content.
What's the problem.
o-o
T
Am Sonntag, 29. Juli 2012 17:16:11 UTC+2 schrieb Peter Otten:
> Thomas Kaufmann wrote:
>
>
>
> > I send from a client file content to my server (as bytes). So far so good.
>
> > The server receives this content complete. Ok. Then I want to write this
>
> >
Am Sonntag, 29. Juli 2012 16:16:01 UTC+2 schrieb Thomas Kaufmann:
> Hi,
>
>
>
> I send from a client file content to my server (as bytes). So far so good.
>
> The server receives this content complete. Ok. Then I want to write this
> content to a new file. It works
are Python and Cython.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
I want to use with..as in a "reversible circuit generator". However, it seems
that @contextmanager changes the expected nature of the class. I tried to
distill the problem down to a simple example.
import contextlib
class SymList:
def __init__(self, L=[]):
self.L = L
@contextli
Im looking to upgrade my Mac to 10.8 and I'm worried if Python and IDLE may not
run on it.
When I try to run this command in Terminal: python -m idlelib.idle
I can not launch IDLE which comes bundled on Mac. On Lion it's been fine but
I've tried it on my friend's copy of Mountain Lion and it wil
ripts to write the launchers.
I.e. use JScript or VBScript to do exactly the same thing. I don't know
much about Windows shortcut (*.lnk) files; if they can contain relative
paths, you could just create shortcuts that launch portable python with
the script.
Thomas
--
http://mail.python.o
def do_something(self):
# do something on self._obj
pass
Which seems ugly. Is there a way to provide the functions of `list'
and `dict' in Foo's look-up path without having to write all the
stubs myself?
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
e on the logical level.
> Instead, Foo should implement only the shared operations, and everything
> else should be delegated to _obj.
>
> If you inherit from builtins, you cannot use automatic delegation on the
> magic "double-underscore" (dunder) methods like __eq__, __len__,
On Thu, Aug 16, 2012 at 05:10:43PM +0200, Hans Mulder wrote:
> On 16/08/12 14:52:30, Thomas Bach wrote:
> >
> > So, my question (as far as I can see it, please correct me if I am
> > wrong) is less of the "How do I achieve this?"-kind, but more of the
> > &q
have __new__ make these Foo* classes dynamically when it
encounters a new type of argument.
Chard.
On Thursday, 16 August 2012 18:54:12 UTC+2, Thomas Bach wrote:
> On Thu, Aug 16, 2012 at 05:10:43PM +0200, Hans Mulder wrote:
>
> > On 16/08/12 14:52:30, Thomas Bach wrote:
>
> &g
> a is a Foo
> b is a Foo
> therefore a and b are the same type
What you mean here is "a and b share a common base class".
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Aug 16, 2012 at 12:29:21PM -0400, Dennis Lee Bieber wrote:
> On Thu, 16 Aug 2012 14:52:30 +0200, Thomas Bach
> declaimed the following in
> gmane.comp.python.general:
>
> Of course, since the parse result (at least from my recent
> experiment) is a Python s
On Thu, Aug 16, 2012 at 10:03:51AM -0700, Richard Thomas wrote:
> class Foo(object):
> def __new__(cls, arg):
> if isinstance(arg, list):
> cls = FooList
> elif isinstance(arg, dict):
> cls = FooDict
> return object.__new__
On Thursday, 16 August 2012 19:49:43 UTC+2, Steven D'Aprano wrote:
> On Thu, 16 Aug 2012 10:03:51 -0700, Richard Thomas wrote:
>
>
>
> > class Foo(object):
>
> > def __new__(cls, arg):
>
> > if isinstance(arg, list):
>
> >
On 09/06/2012 09:27 PM, John Nagle wrote:
> In Python 2.7:
>
>I want to parse standard ISO date/time strings such as
>
> 2012-09-09T18:00:00-07:00
>
> into Python "datetime" objects. The "datetime" object offers
> an output method , datetimeobj.isoformat(), but not an input
> parser.
not a direct cycle, but an indirect one.
Or would that be detected via the list?
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On 09/09/2012 03:22 PM, iMath wrote:
> Does os.getcwd() and os.curdir have the same effect ?
>
Python 3.2.3 (default, May 3 2012, 15:51:42)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/home/tjol'
>>> os.curdir
'.'
>>
Am 12.09.2012 04:28 schrieb j.m.dagenh...@gmail.com:
I'm trying to call SetName on an object to prevent me from ever having to call
it explictly again on that object. Best explained by example.
def setname(cls):
'''this is the proposed generator to call SetName on the object'''
try:
effective as long as you are in the relevant code
part and is reverted as soon as you leave it.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
nc(*a, **k), func(*a, **k)
can be used with
@twice
def f(x): print (x); return x
very nicely.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
s you a
list of parameter tuples for connecting.
So which way you go above, you should change the respective lines to
for line in ...:
hostname = line.strip()
for target in socket.getaddrinfo(hostname, 0, socket.AF_UNSPEC,
socket.SOCK_STREAM):
print("IP address fo
Am 15.09.2012 16:18 schrieb 8 Dihedral:
The concept of decorators is just a mapping from a function
... or class ...
> to another function
... or any other object ...
> with the same name in python.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On 09/18/2012 10:10 PM, porkfried wrote:
> I want to define a 'with' command that makes entries
> in dictionary available within the local scope, and
> stores new local variables into that dictionary. The
> original scope should be restored on exit, and called
> functions should not see anything s
On 09/18/2012 10:50 PM, weissman.m...@gmail.com wrote:
> Well there's wired stuff like this:
>
> In [1]: locals()["x"] = 5
>
> In [2]: print x
> 5
>
No, there isn't. Modifying the dictionary returned by locals() has no
effect.
>>> def f ():
... locals()["x"] = 1
... return x
...
>>> f
can be used this way:
bat cmds
python -m thismodule cmd1 a b
other bat cmds
python -m thismodule cmd2
...
HTH,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
ect()
d.a = 1
print d['a']
# This results in d.__dict__['a'] = 1.
# As d.__dict__ is d, this is equivalent to d['a'] = 1.
# Now the other way:
d['b'] = 42
print d.b
# here as well: d.b reads d.__dict__['b'], which is essentially d['b'].
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
ascriptissexy.com/how-to-learn-javascript-properly/
http://pyjs.org/ may be worth a look too.
-- Thomas
PS: Most of your messages appear to be both To: and Cc: this list.
Please stop sending each message twice, it's rather distracting.
--
http://mail.python.org/mailman/listinfo/python-list
):
self.a = 20
print self.a
a = a(1)
a.f()
a.g()
Yes - this is a different situation. Here, the "self" referred to is the
same in all cases (the "a" from top level), and so self.a can be used
consistently as well.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
smell.
Where did he so?
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
lse:
self.seek(o, 1) # yes, it is
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
only sets bit 7, OUTTGL = 0x10
toggles it and OUTCLR = 0x10 clears it.
If this behaviour is documented properly enough, it is quite OK, IMHO.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
they refer to.
If you was really insulted, you should answer to these insults in their
thread and not in a different one.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
e, I skipped my
re-written version and used the built-in.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
work with any device where 0x10 (0001
binary) modifies bit SEVEN. 0x40, OTOH, would fit my mental impression
of bit 7.
Of course. My fault.
It can as well be a bit mask, with OUTTGL = 0x11 toggling bit 4 and bit
0. Very handy sometimes.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
eplace the tell/seek API, and -0 on
adding a second, redundant API.
ACK.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
>>> t.b
trying to get value - return None
>>> t.a=12
>>> t.b=12
value 12 ignored.
>>> t.a
12
>>> t.b
trying to get value - return None
>>> del t.a
>>> del t.b
delete called and ignored
>>> t.a
>
>>> t.b
trying to get value - return None
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
s itertools.takewhile consumes the first entry
not fulfilling the pred.
I currently have the intuition that the problem is not solvable
without using e.g. a global to pass something back to iter_in_blocks
from block_iter. Any other suggestions?
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Sep 29, 2012 at 09:26:00AM -0700, Paul Rubin wrote:
> Thomas Bach writes:
>
> itertools.groupby(data, lambda (x,y) : x)
>
> is basically what you want.
True!
Thanks,
Thomas Bach
--
http://mail.python.org/mailman/listinfo/python-list
stD2?
To me it sounds like test_base() is actually no test. Hence, I would
rather give it a catchy name like _build_base_cls(). If a method name
does not start with 'test' it is not considered a test to run
automatically.
Does this help?
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
es printed will depend on how sparse the matrices are, but
for the same above (approximately half full),
I wouldn't consider 1000 of 576 "half full"...
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
t;>> head
['foo', 'bar']
>>> tail
>>>
I don't get it! Could someone help me, please? Why is head not 'foo'
and tail not 'bar'?
Regards,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
a simple statement separated by a semicolon.”, right?
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
mmunication is for informational purposes only. It is not
intended to be, nor should it be construed or used as, financial,
legal, tax or investment advice or an offer to sell, or a
solicitation of any offer to buy, an interest in any fund advised by
Ada Investment Management LP, the Investment a
, the free space in virtual memory is
not necessarily contiguous. So even if you have 1.5G free, you might not
be able to read 1.5G at once, but you might succeed in reading 3*0.5G.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
None for j in i1)
# and now, break on None:
i3 = iter(lambda: next(i2), None)
would do the job.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
(line, *rr):
for r in rr:
m = r.match(line)
if m: yield r; return
for r in matching(line, *actions.keys()):
actions[r]()
break
else:
raise NoActionMatched() # or something like that
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
such as
def maybe_do_that():
if moon == full:
with something as val:
yield val
for val in maybe_do_that():
bla
but I would consider this as an abuse of the generator concept.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
Am 25.10.2012 09:21 schrieb Thomas Rachel:
I think
# iterate ad inf., because partial never returns None:
i1 = iter(partial(randrange, n), None)
# take the next value, make it None for breaking:
i2 = (j if j in selected else None for j in i1)
# and now, break on None:
i3 = iter(lambda: next(i2
ase of calls to send(), throw() and close(), things become
considerably more difficult. As will be seen later, the necessary code is
very complicated, and it is tricky to handle all the corner cases
correctly.
Ok, thanks.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
. The same as in
if regex.search(string) as match:
process it
But with
def if_true(expr):
if expr: yield expr
you can do
for match in if_true(regex.search(string)):
process it
But the proposed if ... as ...: statment woulkd be more beautiful by far.
Thomas
--
http://mail.python.org/mai
Am 25.10.2012 18:36 schrieb Ian Kelly:
On Thu, Oct 25, 2012 at 1:21 AM, Thomas Rachel
wrote:
j = next(j for j in iter(partial(randrange, n), None) if j not in
selected)
This generator never ends. If it meets a non-matching value, it just skips
it and goes on.
next() only returns one value
n, what about sqrt(x)**2 or arcsin(sin(x))? Did that always return
the original x?
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
'\'''\'''. Ugly, but works.
return " ".join([
"'"+st.replace("'","'\\''")+"'"
for st in strs
])
so I can use
shellquote('program name', 'argu"ment 1', '$arg 2',
"even args containing a ' are ok")
For Windows, you'll have to modify this somehow.
HTH,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
and why?
That's why I generally prefer mutable objects, but it can depend.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
it, it can be run wherever desired.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
So do print(repr(chr(254))) or, for byte strings, print(bytes([254])).
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
', 'Test 2', 'Test 3'])
Also have a look at ``collections.defaultdict``.
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
Am 13.11.2012 14:21 schrieb wxjmfa...@gmail.com:
* strings are now proper text strings (Unicode), not byte strings;
Let me laugh.
Do so.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
hing second_process, it might be useful to
firstprocess.stdout.close(). If you fail to do so, your process is a
second reader which might break things apart.
At least, I once hat issues with it; I currently cannot recapitulate
what these were nor how they could arise; maybe there was just the open
file descriptor which annoyed me.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
% (mydir, mydir))
, then it will only break if there are single quotes in the file name.
And if you do mydir_q = mydir.replace("'", "'\\''") and use mydir_q, you
should be safe...
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
xt_line
# keepsep: only if we have something.
if (not keepsep) or data:
yield data
you can iterate over everything you want without needing too much
memory. Using a larger "buffering" might improve speed a little bit.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
7;, 'option').split(',') ]
if you use a comma as a separator.
Have a look at YAML if this is not enough for you, as I think lists
are supported there. Haven't had a look myself though, yet.
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
-packages/zope
2044.virtualenvs/pyramid/lib/python2.7/site-packages/chameleon
6312.virtualenvs/pyramid/lib/python2.7/site-packages/pyramid
I think 22 MB are OK given the functionality Pyramid has to offer.
Just my 2 cents,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
classmethod) explicitly says so:
It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()). The instance is ignored except for its class.
I think the way to go is via the descriptor protocol[1] as suggested
by Peter.
Regards,
Thomas.
Footnotes:
[1] http://docs.p
I have not come up with a good solution for tox, yet.
Hope this helps,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
rifying.
Regards,
Thomas.
Footnotes:
[1]
http://ziade.org/2010/03/03/the-fate-of-distutils-pycon-summit-packaging-sprint-detailed-report/
--
http://mail.python.org/mailman/listinfo/python-list
ver you like).
Third step: Getting the status, terminating the process.
And if you have read the whole output, you do status = sp.wait() in
order not to have a zombie process in your process table and to obtain
the process status.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
part or in a function
on its own.
Also have a look at the with statement you can use it in several
places of your code.
There are several other improvements you can make:
+ instead of having the file-names hard coded try to use argparse to
get them from the command-line,
+ let functions stand at their own and use less globals,
+ try to avoid the use of the type of the data structure in the name
(e.g. names is IMHO a better name then namelist),
+ add tests.
Regards,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Dec 02, 2012 at 04:16:01PM +0100, Lutz Horn wrote:
>
> len([x for x in l if x[1] == 'VBD'])
>
Another way is
sum(1 for x in l if x[1] == 'VBD')
which saves the list creation.
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
o ignore the
> empty arrays using if statement, but it does the same.
Please provide a small, runable example with the actual code you tried
that raises the exception and the complete trace back.
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
confuses you further… Well,
tell me that my autodidact methodology did not work out at all and ask
again. ;)
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
Hi List
I am wondering, how can i check if child already exist before i spawn
? child.isalive() cannot be done on child before it has been spawned.
---
import pexpect
child=pexpect.spawn('ssh mysurface@192.168.1.105')
child.sendline('test')
---
Thomas
--
http://mai
do_stuff() might raise a KeyError, which should not go
undetected.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
27;error.log')
resp.
os.path.join(os.getcwd(), 'out.log')
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
ending on the arguments type. If you
want to make sure that something is of a certain type use
assertIsInstance!
Hope this helps,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I seem to have a problem because it seems Tkinter assumes relative paths for
TCL_LIBRARY and TK_LIBRARY.
I am working with the homebrew group to get python27 to install nicely with a
custom installation of tk and tcl
(https://github.com/mxcl/homebrew/pull/16626). However, this breaks
h a solution.
Hope this helps,
Thomas Bach.
Footnotes:
[1] http://docs.python.org/2/library/configparser.html
[2] http://docs.python.org/2/library/csv.html
[3] http://docs.python.org/2/library/collections.html#collections.Counter
[4] http://matplotlib.org/gallery.html
--
http://mail.pyt
else:
> dict[word] = 1
When you got the indentation and names right, you can restate this as
import collections
counter = collections.Counter(words)
in Python 2.7 or as
import collections
counter = collections.defaultdict(int)
for word in words:
counter[word] += 1
in Python 2.6
Re
am', 'spam, ham, spam')
'egg, spam, ham, spam, tomato'
If the pattern you want to match is more complicated, have a look at
the re module!
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
l question is why?
Because there is no definition for upper-case 'ß'. 'SS' is used as the
common replacement in this case. I think it's pretty smart! :)
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
but also the how is the matter of your
question something like
xs = [ float(x) for x, _ in map(str.split, l) ]
ys = [ float(y) for _, y in map(str.split, l) ]
should do the trick.
Regards,
Thomas Bach.
--
http://mail.python.org/mailman/listinfo/python-list
hing_with(data)
> HomeDatastore.py
> def QuerySqlite():
> #doing something here..
> # returning Data
Have you read the Python tutorial by the way?
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
;, 'R',
> 's', 'S', 't', 'T', 'u', 'U', 'ü', 'Ü', 'ú', 'Ú', 'û', 'Û', 'ù', 'Ù', 'v',
> 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z')
>
One option is to use sorted's key parameter with an appropriate
mapping in a dictionary:
>>> cs = (' ', '.', '\'', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8',
>>> '9', 'a', 'A', 'ä', 'Ä', 'á', 'Á', 'â', 'Â', 'à', 'À', 'å', 'Å', 'b', 'B',
>>> 'c', 'C', 'ç', 'Ç', 'd', 'D', 'e', 'E', 'ë', 'Ë', 'é', 'É', 'ê', 'Ê', 'è',
>>> 'È', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'ï', 'Ï', 'í', 'Í', 'î', 'Î',
>>> 'ì', 'Ì', 'j', 'J', 'k', 'K', 'l', 'L', 'm', 'M', 'n', 'ñ', 'N', 'Ñ', 'o',
>>> 'O', 'ö', 'Ö', 'ó', 'Ó', 'ô', 'Ô', 'ò', 'Ò', 'ø', 'Ø', 'p', 'P', 'q', 'Q',
>>> 'r', 'R', 's', 'S', 't', 'T', 'u', 'U', 'ü', 'Ü', 'ú', 'Ú', 'û', 'Û', 'ù',
>>> 'Ù', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z')
>>> d = { k: v for v, k in enumerate(cs) }
>>> import random
>>> ''.join(sorted(random.sample(cs, 20), key=d.get))
'5aAàÀåBCçËÉíÎLÖøquùx'
Regards,
Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
oad it now from:
http://pypi.python.org/packages/source/T/Twisted/Twisted-12.3.0.tar.bz2 or
http://pypi.python.org/packages/2.7/T/Twisted/Twisted-12.3.0.win32-py2.7.msi
Thanks to the supporters of Twisted via the Software Freedom Conservancy
and to the many contributors for this release.
. See
http://docs.python.org/2/library/socket.html#socket.socket.sendall
| [...] Unlike send(), this method continues to send data from string
| until either all data has been sent or an error occurs.
HTH,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
item +
' '
with
if len(columns) >= 3:
output += ''
else:
output += ''
output += item + ' '
(untested as well; keep the indentation in mind!)
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
out and
columns = line.split("\t");
if len(columns) == 1:
output += ('' % max_columns) + line +
'\n'
continue
with this feature.
HTH,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
n in each step. As the loop should contain a 'n -= 1',
n decreases by 1 every step, turning it into f = n * (n-1) * (n-2) * ...
* 2 and then, as n is not >= 2 any longer, stops the loop, returning f.
HTH,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
onment.
As a side note: some versions of distribute, pip and virtualenv do
interact rather poorly on Python 3. Upgrading via easy_install:
$ easy_install -U distribute
$ easy_install -U pip
usually solves these issues.
Have fun!
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 10 Jan 2013 09:50:37 -0800 (PST)
pmec wrote:
> Hi there guys i've got a script that's suppose to find the average of two
> times as strings. The times are in minutes:seconds:milliseconds
> i'm doing ok in printing the right minutes and seconds my problem is with the
> milliseconds.
>
>
efore myfunc() called.
myfunc() called.
after myfunc() called.
before myfunc() called.
myfunc() called.
after myfunc() called.
Because the function calls are wrapped and not repeated.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 3674 matches
Mail list logo