Steven D'Aprano writes:
> On Mon, 19 Feb 2018 09:40:09 +0100, Alain Ketterlin wrote:
>
>> Tim Delaney writes:
>>
>> [...]
>>> As others have said, typing is about how the underlying memory is
>>> treated.
>>
>> No. It is much more t
Chris Angelico writes:
> On Mon, Feb 19, 2018 at 9:04 PM, Alain Ketterlin
> wrote:
>> Look at the C11 standard, section 6.3.2.3 ("Pointers"), 6.5.§6-7
>> ("effective types"), and 6.5.3.2 ("Address and indirection operators").
>> It i
Chris Angelico writes:
> On Mon, Feb 19, 2018 at 7:40 PM, Alain Ketterlin
> wrote:
>> No. C has much stronger rules, not on casting, but on accessing the
>> pointees, which basically invalidates your argument. Refer to the C
>> standard for details.
>
> Really
Tim Delaney writes:
[...]
> As others have said, typing is about how the underlying memory is treated.
No. It is much more than that. Typing is about everything you can say
about a given statement. Some type systems are focusing on type labels
only (like most statically typed programming languag
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> A participant of my Python course asked whether one could
> also use "None" instead of "pass". What do you think?
>
> def f():
> pass
>
> can also be written as
>
> def f():
> None
>
> . Is there any place where "None" could not be use
Abhiram R writes:
[...]
> https://github.com/rkern/line_profiler
>
> The definition for the time column says -
>
> "Time: The total amount of time spent executing the line in the timer's
> units. In the header information before the tables, you will see a line
> 'Timer unit:' giving the conversio
Manuel Rincon writes:
[...]
> Type=0 MarketTime=11:18:26.549 Price=112.8300
> Type=0 MarketTime=11:18:28.792 Price=112.8300
[...]
>
> I would need to filter only the numeric part of all the columns.
I assume that by "numeric" you mean the value after Price=
line.split()[2].split('=')[1]
lin
ElChino writes:
> Chris Angelico wrote:
>
>> CPython is a stack-based interpreter, which means it loads values onto
>> an (invisible) internal stack, processes values at the top of the
>> stack, and removes them when it's done.
>
> Is this similar to how Lua operates too?
No. Lua uses a register
"ast" writes:
> "ast" a écrit dans le message de
> news:59e9b419$0$3602$426a7...@news.free.fr...
>
> Neither works for large integers which is
> even more disturbing
>
> a = 6555443
> b = copy.copy(a)
> a is b
>
> True
In copy.py:
| [...]
| def _copy_immutable(x):
| return x
| for t in (t
In case you haven't heard about this:
https://developers.slashdot.org/story/17/09/16/2030229/pythons-official-repository-included-10-malicious-typo-squatting-modules
Here is the Slashdot summary:
| The Slovak National Security Office (NBU) has identified ten malicious
| Python libraries uploade
Ian Kelly writes:
> On Thu, Aug 10, 2017 at 8:28 AM, Steve D'Aprano
> wrote:
>> What would you expect this syntax to return?
>>
>> [x + 1 for x in (0, 1, 2, 999, 3, 4) while x < 5]
>
> I would expect the for to be an outer loop and the while to be an
> inner, so this would loop infinitely.
+1.
Ho Yeung Lee writes:
> i find kmeans has to input number of cluster
[...]
https://en.wikipedia.org/wiki/Determining_the_number_of_clusters_in_a_data_set
Completely off-topic on this group/list, please direct your questions
elsewhere.
-- Alain.
--
https://mail.python.org/mailman/listinfo/pytho
Steven D'Aprano writes:
> I have a colleague who is allergic to mutating data structures. Yeah, I
> know, he needs to just HTFU but I thought I'd humour him.
>
> Suppose I have an iterator that yields named tuples:
>
> Parrot(colour='blue', species='Norwegian', status='tired and shagged out')
>
Marko Rauhamaa writes:
> It would be nice to be able to use a / in my file names. Funny enough,
> I'm allowed to use a zillion unprintable characters in my file names but
> no slashes allowed.
>
> Example:
>
>results-Q2/2017.json
Use U+2215 (DIVISION SLASH).
I have tried this once. "Next ti
Jon Ribbens writes:
> On 2017-03-18, Grant Edwards wrote:
>> On 2017-03-18, Mikhail V wrote:
>>> How would one come to the idea to use spaces for indentation at all?
>>
>> Because tabs are a major security vulnerability and should be outlawed
>> in all source code.
>
> You forgot to mention tha
Steve D'Aprano writes:
> On Linux, if I call os.remove on a file which I own but don't have write
> permission on, the file is still deleted:
>
>
> py> f = open('/tmp/no-write', 'w')
> py> os.path.exists('/tmp/no-write')
> True
> py> os.chmod('/tmp/no-write', 0) # Forbid ALL access.
> py> os.rem
Steve D'Aprano writes:
[...]
> Fiction
> ├─ Fantasy
> │ ├─ Terry Pratchett
> │ │ ├─ Discworld
> │ │ │ ├─ Wyrd Sisters
> │ │ │ └─ Carpe Jugulum
> │ │ └─ Dodger
> │ └─ JK Rowling
[...]
> what do we call the vertical and horizontal line elements?
Box-draw
38016226...@gmail.com writes:
> L=[2,1]
> L[0],L[L[0]-1]=L[L[0]-1],L[0]
>
> The L doesn't change. Can someone provide me the detail procedure of
> this expression?
From:
https://docs.python.org/3/reference/simple_stmts.html#grammar-token-assignment_stmt
| Although the definition of assignment i
Seymore4Head writes:
[...]
> I have a long text file that has movie titles in it and I would like
> to find dupes.
>
> The thing is that sometimes I have one called "The Killing Fields" and
> it also could be listed as "Killing Fields" Sometimes the title will
> have the date a year off.
>
> Wh
meInvent bbird writes:
> how to refactor nested for loop into smaller for loop assume each of them
> independent?
>
> because memory is not enough
>
> for ii in range(1,2000):
> for jj in range(1,2000):
> for kk in range(1,2000):
> print run(ii,jj,kk)
n = 0
while n < 2000*2000*2000:
Jay writes:
> I am having an odd problem with difflib.SequenceMatcher. Sample code below:
>
> The strings "src" and "trg" differ only a little.
How exactly? (Please be precise, it helps testing.)
> The SequenceMatcher.ratio() for these strings 0.0. Many other similar
> strings are working fine
John Ladasky writes:
> from math import pi as π
> [...]
> c = 2 * π * r
> Up until today, every character I've tried has been accepted by the
> Python interpreter as a legitimate character for inclusion in a
> variable name. Now I'm copying a formula which defines a gradient. The
> nabla symbol
Grant Edwards writes:
> On 2016-06-26, BartC wrote:
>
>> (Note, for those who don't know (old) Fortran, that spaces and tabs are
>> not significant. So those dots are needed, otherwise "a eq b" would be
>> parsed as "aeqb".)
>
> I've always been baffled by that.
> Were there other languages th
Steven D'Aprano writes:
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
[...]
> Now I want to group subsequences. For example, I have:
>
> "ABCABCABCDEABCDEFABCABCABCB"
>
> and I want to group it into repeatin
martin.spic...@gmail.com writes:
> print int(float(2.8/0.1))
>
> yields
>
> 27
>
> instead of 28!!
That's how floating-point arithmetic works: look at the result of
2.8/0.1 to see why int() is correct.
> Is that known?
Yes, it is known, and correct since you use "float". See
http://floating-poi
Antoon Pardon writes:
> On 07/13/2015 05:44 PM, Th. Baruchel wrote:
>> Hi, after having spent much time thinking about tail-call elimination
>> in Python (see for instance http://baruchel.github.io/blog/ ), I finally
>> decided to write a module for that. You may find it at:
>>
>> https://githu
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Grant Edwards writes:
>>
>> [...]
>>> Or to be a bit obtuse: Python parameters are passed by value, but all
>>> values are references.
>>
>> Exactly, that's a perfect description. Ther
Grant Edwards writes:
[...]
> Or to be a bit obtuse: Python parameters are passed by value, but all
> values are references.
Exactly, that's a perfect description. There's is no need for a new
name. As a corollary, all names (including "variables" and object
attributes) are references.
-- Alain
Steven D'Aprano writes:
> On Fri, 5 Jun 2015 04:17 am, Alain Ketterlin wrote:
>
>> Steven D'Aprano writes:
>>
>> [...]
>>> But you still find a few people here and there who have been exposed to
>>> Java foolishness, and will argue that
Steven D'Aprano writes:
[...]
> But you still find a few people here and there who have been exposed to Java
> foolishness, and will argue that Python is "pass by value, where the value
> is an implementation dependent reference to the thing that you thought was
> the value".
I find this clear a
random...@fastmail.us writes:
> On Wed, Jun 3, 2015, at 03:11, Alain Ketterlin wrote:
>> Thank you, I know this. What I mean is: what are the reasons that you
>> cannot access your file descriptors one by one? To me closing a range of
>> descriptors has absolutely no me
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Marko Rauhamaa writes:
>>> First, if close() fails, what's a poor program to do?
>>
>> Warn the user? Not assume everything went well? It all depends on the
>> application, and what the file descripto
Chris Angelico writes:
> On Wed, Jun 3, 2015 at 7:06 AM, Alain Ketterlin
> wrote:
>> I've no idea what the OP's program was doing, so I'm not going to split
>> hairs. I can't imagine why one would like to mass-close an arbitrary set
>> of file desc
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> The close(2) manpage has the following warning on my Linux system:
>>
>> | Not checking the return value of close() is a common but
>> | nevertheless serious programming error. It is quite possible that
>> | err
Skip Montanaro writes:
> Reviving (and concluding) a thread I started a couple weeks ago, I asked:
>
>> The basic fork/exec dance is not a problem, but how do I discover
>> all the open file descriptors in the new child process to make sure
>> they get closed? Do I simply start at fd 3 and call o
Cecil Westerhof writes:
> I help someone that has problems reading. For this I take photo's of
> text, use convert from ImageMagick to make a good contrast (original
> paper is grey) and use lpr to print it a little bigger.
> import glob
> import subprocess
>
> treshold = 66
> co
Robin Becker writes:
> As part of a long running PyQT process running as a window app in Arch
> linux I needed an alert sound, I decided to use the beep command and
> the app code then looked like
>
> pid = Popen(['/home/robin/bin/mybeep', '-r3', '-f750', '-l100', '-d75']).pid
>
> the mybeep scri
Dave Angel writes:
> On 05/06/2015 11:36 AM, Alain Ketterlin wrote:
>> Yes, plus the time for memory allocation. Since the code uses "r *=
>> ...", space is reallocated when the result doesn't fit. The new size is
>> probably proportional to the current (in
Paul Rubin writes:
> Steven D'Aprano writes:
>> Multiplying upwards seems to be more expensive than multiplying
>> downwards... I can only guess that it has something to do with the way
>> multiplication is implemented, or perhaps the memory management
>> involved, or something. Who the hell kno
the.lo...@gmail.com writes:
> Given the following code:
>
> import ipaddress
> import socket
>
> ip = ipaddress.ip_address(mystring)
> sock_family = ip.
> socket = socket.socket(sock_family, socket.SOCK_STREAM)
>
> Am I crazy or is this undoable?
>
> sock.AF_INET == 2
> sock.AF_INET6 == 10
> i
Chris Angelico writes:
> On Thu, Apr 9, 2015 at 11:57 PM, Alain Ketterlin
> wrote:
>> Because, in:
>>
>> z = x+y; // all signed ints
>> if ( z < x )
>> ...
>>
>> either there was no overflow (and the condition is false), or
Marko Rauhamaa writes:
> Dave Angel :
>
>> So the C standard can specify such things as undefined. The
>> architecture still will do something specific, right or wrong, and
>> that's what Marko's claim was about. The C compiler has separate types
>> for unsigned and for signed, while the underlyi
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> No, it would not work for signed integers (i.e., with lo and hi of
>> int64_t type), because overflow is undefined behavior for signed.
>
> All architectures I've ever had dealings with have used 2's-complement
&g
Marko Rauhamaa writes:
> The basic arithmetic algorithms are independent of the base.
Right.
> For example, here's how you can add two 128-bit integers in C using
> 64-bit digits:
>
> typedef struct {
> uint64_t lo, hi;
> } uint128_t;
>
> uint128_t add128(uint128_t x, uint12
ermanolillo writes:
> HOST is send by the keyboard. It´s the IPv6 address of my interface eth0.
> For example, FE80::0202:B3FF:FE1E:8329.
This is a link-local address, you can't use it just like that (you may
have several interfaces with the same link-local addr). Use getaddrinfo
on "FE80...%et
jkn writes:
> I have a use case of a single 'master' machine which will need to
> periodically 'push' data to a variety of 'slave' devices on a small local
> subnet, over Ethernet. We are talking perhaps a dozen devices in all with
> comms occurring perhaps once very few seconds, to much less
Grant Edwards writes:
[...]
> With link-local addresses you also need to specify which interface to
> use. The normal way of doing this on Linux with command-line utilities
> is append % to the address/hostname (e.g. ping6 ff02::1%net1).
>
> That doesn't work:
>
> s.sendto(data, ("ff02::1%net1",p
Simon Kennedy writes:
> Just out of academic interest, is there somewhere in the Python docs where
> the following is explained?
>
3 == True
> False
if 3:
> print("It's Twue")
>
> It's Twue
>
> i.e. in the if statement 3 is True but not in the first
https://docs.python.or
Marko Rauhamaa writes:
> "BartC" :
>>> x = [f, g][cond]()
>> It will select f or g (which should refer to functions), and call one of
>> those depending on cond. That's not a problem.
>>
>> The problem is it will still evaluate both f and g,
>
> That's not really the problem. The problem is in
Terry Reedy writes:
> On 10/17/2014 6:43 AM, Cameron Simpson wrote:
>> On 17Oct2014 11:45, Dhananjay wrote:
>
>>> 2.1576318858 -1.8651195165 4.2333428278
>>> ...
>>> (total of 200 lines)
>>>
>>> Columns 1,2,3 corresponds to x,y,z axis data points.
>
>>for line in open('flooding-psiphi.dat','
Mark Lawrence writes:
> On 07/06/2014 09:20, Alain Ketterlin wrote:
>> Sturla Molden writes:
>>>>>> Many of these students suggest Python as the
>>>>>> development language (they learned it and liked it), and the suggestion
>>>>>
Sturla Molden writes:
> Alain Ketterlin wrote:
>> Sturla Molden writes:
>>
>>> Alain Ketterlin wrote:
>>>
>>>> Many of these students suggest Python as the
>>>> development language (they learned it and liked it), and the suggestio
Sturla Molden writes:
> On 05/06/14 22:27, Alain Ketterlin wrote:
>> I have seen dozens of projects where Python was dismissed because of the
>> lack of static typing, and the lack of static analysis tools.
[...]
> When is static analysis actually needed and for what purpose?
Chris Angelico writes:
> On Fri, Jun 6, 2014 at 7:23 AM, Mark Lawrence wrote:
>> On 05/06/2014 21:07, Alain Ketterlin wrote:
>>>
>>> Sturla Molden writes:
>>>
>>>> On 05/06/14 10:14, Alain Ketterlin wrote:
>>>>
>>>>>
Sturla Molden writes:
> Alain Ketterlin wrote:
>
>> Many of these students suggest Python as the
>> development language (they learned it and liked it), and the suggestion
>> is (almost) always rejected, in favor of Java or C# or C/C++.
>
> And it was almost a
Terry Reedy writes:
> On 6/5/2014 4:07 PM, Alain Ketterlin wrote:
>
>>> When I compile Cython modules I use LLVM on this computer.
>>
>> Cython is not Python, it is another language, with an incompatible
>> syntax.
>
> Cython compiles Python with optional e
Travis Griggs writes:
>> On Jun 5, 2014, at 1:14, Alain Ketterlin wrote:
>>
>> Swift's memory management is similar to python's (ref. counting). Which
>> makes me think that a subset of python with the same type safety would
>> be an instant success.
Chris Angelico writes:
> On Fri, Jun 6, 2014 at 6:07 AM, Alain Ketterlin
> wrote:
>>> Perhaps, perhaps not. My experience is that only a small percentage of
>>> the CPU time is spent in the Python interpreter.
>>
>> Basically, you're saying that a major
Chris Angelico writes:
> On Thu, Jun 5, 2014 at 7:42 PM, Alain Ketterlin
> wrote:
>> Chris Angelico writes:
>>
>>> On Thu, Jun 5, 2014 at 6:14 PM, Alain Ketterlin
>>> wrote:
>>>> Swift's memory management is similar to python's (
Sturla Molden writes:
> On 05/06/14 10:14, Alain Ketterlin wrote:
>
>> Type safety.
>
> Perhaps. Python has strong type safety.
Come on.
[...]
>>(And with it comes better performance ---read battery
>> life--- and better static analysis tools, etc.)
>
> Pe
Chris Angelico writes:
> On Thu, Jun 5, 2014 at 6:14 PM, Alain Ketterlin
> wrote:
>> Swift's memory management is similar to python's (ref. counting). Which
>> makes me think that a subset of python with the same type safety would
>> be an instant success.
Sturla Molden writes:
> Dear Apple,
>
> Why should I be exited about an illegitmate child of Python, Go and
> JavaScript?
[...]
Type safety. (And with it comes better performance ---read battery
life--- and better static analysis tools, etc.) LLVM (an Apple-managed
project) for the middle- and b
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> The real nice thing that makes Julia a different language is the
>> optional static typing, which the JIT can use to produce efficient code.
>> It's the only meaningful difference with the current state of python.
Mark H Harris writes:
> On 5/12/14 3:44 AM, Alain Ketterlin wrote:
>> When you are doing scientific computation, this overhead is
>> unacceptable, because you'll have zillions of computations to perform.
>
> I'm still trying to sort that out. I have not teste
Mark H Harris writes:
> On 5/11/14 12:05 PM, Alain Ketterlin wrote:
>>> Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on
>>> steroids. Its amazing as a dynamic language, and its fast, like
>>> lightning fast as well as multiprocessing (parall
Mark H Harris writes:
> On 5/10/14 8:42 AM, Roy Smith wrote:
>> http://tinyurl.com/mr54p96
> 'Julia' is going to give everyone a not so small run for competition;
> justifiably so, not just against FORTRAN.
>
> Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on
> steroids. It
alb...@spenarnc.xs4all.nl (Albert van der Horst) writes:
[...]
> Now on some matrices the assert triggers, meaning that nom is zero.
> How can that ever happen? mon start out as 1. and gets multiplied
[several times]
> with a number that is asserted to be not zero.
Finite precision. Try: 1.*1e-
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> which does an exact traversal of potential the DOM tree... (assuming a
>> DOM is even defined on a non well-formed XML document).
>>
>> Anyway, my point was only to warn the OP that he is not doing XML.
>
> I c
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Marko Rauhamaa writes:
>>> Sometimes the XML elements come through a pipe as an endless
>>> sequence. You can still use the wrapping technique and a SAX parser.
>>> However, the other option is to write a t
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Technically speaking, this is not a well-formed XML document (it is a
>> well-formed external general parsed entity, though). If you have other
>> XML processors in your workflow, they will/should reject it.
>
> S
Percy Tambunan writes:
> Hai, I would like to parse this multiple root element XML
>
>
[...]
>
>
[...]
>
Technically speaking, this is not a well-formed XML document (it is a
well-formed external general parsed entity, though). If you have other
XML processors in your workflow, they will/sh
forman.si...@gmail.com writes:
> I ran across this and I thought there must be a better way of doing
> it, but then after further consideration I wasn't so sure.
>
> if key[:1] + key[-1:] == '<>': ...
>
> Some possibilities that occurred to me:
>
> if key.startswith('<') and key.endswith('>'):
luke.gee...@gmail.com writes:
> Can I make it that if
> C = int(sys.argv[3])
> But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
C = int(sys.argv[3]) if len(sys.argv) > 3 else 0
is one possibility.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Piet van Oostrum writes:
[...]
> I could define a auxiliary function like:
>
> def auxfunc(then, name):
> _, mn, dy, _, _, _, wd, _, _ = localtime(then)
> return somefunc(mn, day, wd, name)
>
> and then use
> [auxfunc(then, name) for then, name in mylist]
[...]
> labels = [somefunc(mn,
Ben Finney writes:
> Chris Angelico writes:
>
>> On Mon, Dec 2, 2013 at 10:34 PM, iMath wrote:
>> > ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$f'"; done) -c copy
>> > output.wav
>> > ffmpeg -f concat -i <(printf "file '%s'\n" ./*.wav) -c copy output.wav
>> > ffmpeg -f concat -i <(
Mark Lawrence writes:
> On 31/10/2013 13:17, Alain Ketterlin wrote:
>> "E.D.G." writes:
>>
>>>The calculation speed question just involves relatively simple
>>> math such as multiplications and divisions and trig calculations such
>>
Chris Angelico writes:
> On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin
> wrote:
>> "E.D.G." writes:
>>
>>> The calculation speed question just involves relatively simple
>>> math such as multiplications and divisions and trig calculation
"E.D.G." writes:
> The calculation speed question just involves relatively simple
> math such as multiplications and divisions and trig calculations such
> as sin and tan etc.
These are not "simple" computations.
Any compiled language (Fortran, C, C++, typically) will probably go much
fas
Antoon Pardon writes:
> Op 07-10-13 19:15, Alain Ketterlin schreef:
[...]
>> That's fine. My point was: you can't at the same time have full
>> dynamicity *and* procedural optimizations (like tail call opt).
>> Everybody should be clear about the trade-off.
>
random...@fastmail.us writes:
> On Mon, Oct 7, 2013, at 13:15, Alain Ketterlin wrote:
>> That's fine. My point was: you can't at the same time have full
>> dynamicity *and* procedural optimizations (like tail call opt).
>> Everybody should be clear about the trad
Terry Reedy writes:
> On 10/4/2013 5:49 AM, Alain Ketterlin wrote:
>
>> I think allowing rebinding of function names is extremely strange,
>
> Steven already countered the 'is extremely strange' part by showing
> that such rebinding is common, generally useful, an
Mark Janssen writes:
> def fact(n): return 1 if n <= 1 else n * fact(n-1)
>> class Strange:
>> ...
>> def __le__(dummy):
>> global fact
>> fact = someotherfun # this is "binding"
>> return false
>> You cannot prevent this in python.
> No, but you can't prevent a lot of bad
rusi writes:
> On Wednesday, October 2, 2013 3:00:41 AM UTC+5:30, Terry Reedy wrote:
>> Part of the reason that Python does not do tail call optimization is
>> that turning tail recursion into while iteration is almost trivial, once
>> you know the secret of the two easy steps. Here it is.
>
>
Terry Reedy writes:
> Part of the reason that Python does not do tail call optimization is
> that turning tail recursion into while iteration is almost trivial,
> once you know the secret of the two easy steps. Here it is.
>
> Assume that you have already done the work of turning a body recursive
matt.doolittl...@gmail.com writes:
>self.logfile.write('%s\t'%(str(time(
[...]
> 2013-08-0323:59:341375588774.89
[...]
> Why is it only giving me the centisecond precision? the docs say i
> should get microsecond precision with the code i put together.
Because of str()'s defau
Devyn Collier Johnson writes:
>I made a Python3 module that allows users to use certain Linux
> shell commands from Python3 more easily than using os.system(),
> subprocess.Popen(), or subprocess.getoutput(). This module (once
> placed with the other modules) can be used like this
Good, but
David T. Ashley writes:
> We develop embedded software for 32-bit micros using Windows as the
> development platform.
I'll mostly ignore the "Windows" qualifier. If you're stuck with Windows
CE or similar, then ask them what they suggest. If you're developing on
Windows and deploy on something e
Νικόλαος Κούρας writes:
[...]
> [Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] suexec failure: could
> not open log file
Here is a link to suexec documentation (at least some version of it,
this is the second link provided by google):
http://httpd.apache.org/docs/2.2/suexec.html
Rea
loial writes:
> I want to call a child process to run a shell script and wait for that
> script to finish. Will the code below wait for the script to finish?
> If not then how do I make it wait?
[...]
> process = subprocess.Popen(command,
> stdin=subprocess.PIPE,stdout=subprocess.PIPE, stderr=su
Victor Hooi writes:
> expression1 = re.compile(r'')
> expression2 = re.compile(r'')
[...]
Just a quick remark: regular expressions are pretty powerful at
representing alternatives. You could just stick everything inside a
single re, as in '...|...'
Then use the returned match to
ciscorucin...@gmail.com writes:
> Basically I am creating a program that will stream musical notes into
> a program called Lilypond one-by-one and it will create the sheet
> music for that stream of music via OS command. Your understanding of
> Lilypond is not needed, but you need to know that for
Julien Le Goff writes:
> Today I came accross a behaviour I did not expect in python (I am
> using 2.7). In my program, random.random() always seemed to return the
> same number; it turned out to be related to the fact that I was using
> os.fork.
The random number generator is initialized once,
I just came across Vigil, an extension to python for serious software
engineers, at https://github.com/munificent/vigil and thought everybody
in this group would be interested (sorry if it has been announced
before).
>From README:
| Vigil is a very safe programming language, and an entry in the
ALeX inSide writes:
> How to "statically type" an instance of class that I pass to a method
> of other instance?
Python does not do static typing.
> I suppose there shall be some kind of method decorator to treat an
> argument as an instance of class?
Decorators are an option. Another is the u
satyam writes:
> I have a text file like this
>
> A1980JE3937 2732 4195 12.527000
> A1980JE3937 3465 9720 22.00
> A1980JE3937 2732 9720 18.00
> A1980KK18700010 130 303 4.985000
> A1980KK18700010 7 4915 0.435000
[...]
> I want to split the file and get multiple files like
> A19
Thomas Rachel
writes:
> Am 19.10.2012 21:03 schrieb Pradipto Banerjee:
[...]
>> Still got MemoryError, but at least this time python tried to use the
>> physical memory. What I noticed is that before it gave me the error
>> it used up to 1.5GB (of the 2.23 GB originally showed as available) -
>>
Tharanga Abeyseela writes:
> I need to remove the parent node, if a particular match found.
It looks like you can't get the parent of an Element with elementtree (I
would love to be proven wrong on this).
The solution is to find all nodes that have a Rating (grand-) child, and
then test explici
Steven D'Aprano writes:
> On Sun, 14 Oct 2012 19:19:33 +0200, Alain Ketterlin wrote:
>
>> Usenet has no attachments.
>
> *snarfle*
>
> You almost owed me a new monitor. I nearly sprayed my breakfast all over
> it. [...]
I owe you nothing, and you can do whate
jjmeric writes:
> Our language lab at INALCO is using a nice language parsing and analysis
> program written in Python. As you well know a lot of languages use
> characters that can only be handled by unicode.
>
> Here is an example of the problem we have on some Windows computers.
> In the att
Steen Lysgaard writes:
> I am looking for a clever way to compute all combinations of two
> lists. Look at this example:
>
> h = ['A','A','B','B']
> m = ['a','b']
>
> the resulting combinations should be of the same length as h and each
> element in m can be used twice. The sought after result us
1 - 100 of 207 matches
Mail list logo