On Fri, 12 Mar 2010 08:15:49 -0500, Steve Holden wrote:
For shell=True I believe you should provide the command as a single
string, not a list of arguments.
Using shell=True with an argument list is valid.
On Unix, it's seldom what you want: it will invoke /bin/sh to execute the
first
On Wed, 03 Mar 2010 03:37:44 +0100, Victor Stinner wrote:
I see, makes perfect sense. This then raises the question whether it's
important to have a 100% fool proof python sandbox without help from
the OS, or this goal is not only too ambitious but also not really a
useful one.
This is
On Wed, 03 Mar 2010 09:05:47 -0800, enda man wrote:
cl_path = ms_vc_path + '\VC\bin'
The backslash is used as an escape character within string literals.
Either use raw strings:
cl_path = ms_vc_path + r'\VC\bin'
or escape the backslashes:
cl_path = ms_vc_path + '\\VC\\bin'
On Mon, 22 Feb 2010 22:27:54 -0800, sjdevn...@yahoo.com wrote:
Basically, multiprocessing is always hard--but it's less hard to start
without shared everything. Going with the special case (sharing
everything, aka threading) is by far the stupider and more complex way
to approach
On Wed, 24 Feb 2010 12:22:05 +1300, Lawrence D'Oliveiro wrote:
Java - The JVM code been hacked to death by Sun engineers (optimised)
Python - The PVM code has seen speed-ups in Unladen or via Pyrex..
ad-infinitum but nowhere as near to JVM
Python is still faster, though. I think a key
On Sun, 14 Feb 2010 21:43:22 +0100, Christian Heimes wrote:
Below is a test case that demonstrates this. Tests 1 2 concatenate the
command and the argument, Tests 3 4 mimic the python docs and use the form
Popen([mycmd, myarg], ...), which never seems to work.
It doesn't work with
On Tue, 16 Feb 2010 00:11:36 +0800, R (Chandra) Chandrasekhar wrote:
One other question I forgot to ask is this why is there a terminal
backslash in
subprocess.call(\
Removing the backslash makes the function fail.
I wonder why, because is supposed to allow multi-line strings. I am
On Fri, 12 Feb 2010 19:21:22 -0500, Echavarria Gregory, Maria Angelica
wrote:
I am developing a program using Python 2.5.4 in windows 32 OS. The amount
of data it works with is huge. I have managed to keep memory footprint
low, but have found that, independent of the physical RAM of the
On Wed, 10 Feb 2010 12:17:51 -0800, Anthony Tolle wrote:
4. Consider switching to Python 3.x, since there is only one string
type (unicode).
However: one drawback of Python 3.x is that the repr() of a Unicode string
is no longer restricted to ASCII. There is an ascii() function which
behaves
On Wed, 10 Feb 2010 23:03:29 -0500, Steve Holden wrote:
intervals = sorted(intervals, key = lambda x: x[0])
Since Python uses lexical sorting and the intervals are lists isn't the
key specification redundant here?
Yes, but I wanted to make it explicit.
Well, omitting the key= would
On Wed, 10 Feb 2010 21:23:08 +, Steven D'Aprano wrote:
The solution to this is to remember that Windows accepts forward slashes
as well as backslashes, and always use the forward slash. So try:
open(D:/file)
and see if that works.
The solution is not to hard-code pathnames in your
On Wed, 10 Feb 2010 15:23:42 -0800, Peng Yu wrote:
I'm wondering there is already a function in python library that can
merge intervals. For example, if I have the following intervals ('['
and ']' means closed interval as in
On Sun, 07 Feb 2010 05:49:28 +, Nobody wrote:
The size-8 tabs look really bad in an editor configured with tab size 4,
as is common in Windows. I'm concluding that the CPython programmers
configure their Visual Studio's to *nix convention.
8-column tabs aren't a *nix convention; that's
On Fri, 05 Feb 2010 21:05:53 -0800, darnzen wrote:
I've written an app using the wck library (widget construction kit,
see http://www.effbot.org), in addition to the wckGraph module. What
I'd like to do, is take the output of one of my windows (happens to be
a graph), and save it as a *.png
On Sat, 06 Feb 2010 11:09:31 -0800, Jim wrote:
I generate some HTML and I want to include in my unit tests a check
for syntax. So I am looking for a program that will complain at any
syntax irregularities.
I am familiar with Beautiful Soup (use it all the time) but it is
intended to cope
On Sun, 07 Feb 2010 00:26:36 +, Steven D'Aprano wrote:
So there isn't such a routine just because some of the regular
expressions cannot be enumerated.
No. There isn't a routine because no-one has yet felt any need to write
one.
However, some of them can be
enumerated. I guess I have to
On Sat, 06 Feb 2010 21:31:52 +0100, Alf P. Steinbach wrote:
The size-8 tabs look really bad in an editor configured with tab size 4,
as is common in Windows. I'm concluding that the CPython programmers
configure their Visual Studio's to *nix convention.
8-column tabs aren't a *nix convention;
On Fri, 05 Feb 2010 03:57:17 -0800, Ashok Prabhu wrote:
I very badly need this to work. I have been googling out for a week
with no significant solution. I open a process p1 which does keeps
running for 4+ hours. It gives some output in stdout now and then. I
open this process with
On Wed, 03 Feb 2010 21:33:08 -0600, Michael Gruenstaeudl wrote:
I am fairly new to Python and need advice on the urllib.urlopen()
function. The website I am trying to open automatically refreshes
after 5 seconds and remains stable thereafter. With
urllib.urlopen().read() I can only read
On Thu, 04 Feb 2010 04:28:20 -0800, Ashok Prabhu wrote:
I m trying a read the output of a process which is running
continuously with subprocess.Popen. However the readline() method
hangs for the process to finish. Please let me know if the following
code can be made to work with
On Tue, 02 Feb 2010 15:07:05 -0800, Aahz wrote:
If you have a problem and you think that regular expressions are the
solution then now you have two problems. Regex is really overkill for
the OP's problem and it certainly doesn't improve readability.
If you're going to use a quote, it works
On Wed, 03 Feb 2010 08:07:50 +1100, Astan Chee wrote:
Sorry for being vague but here my question about converting an xml into
a dict. I found some examples online but none gives the dict/result I
want.
Which is kinda wrong. I expect the dict to have the Space usage
summary, but it
On Tue, 02 Feb 2010 10:38:53 -0800, Carl Banks wrote:
I don't know if that's necessary. Only supporting the foo.h case would
work fine if Python behaved like gcc, i.e. if the current directory
referred to the directory contain the file performing the import rather
than in the process' CWD.
be
lexically scoped.
The general
pattern is:
1) You have something which refers to a resource by name.
2) There is a sequence of places which are searched for this
name.
Searching the current directory by default is the problem.
Nobody in their right mind has . in the shell PATH and IMO
On Sun, 31 Jan 2010 22:36:32 +, Steven D'Aprano wrote:
for example, in if you have a function 'f' which takes two parameters to
call the function and get the result you use:
f 2 3
If you want the function itself you use:
f
How do you call a function of no arguments?
There's
On Mon, 01 Feb 2010 14:35:57 -0800, Jonathan Gardner wrote:
If it was common-place to use Curried functions and partial application in
Python, you'd probably prefer f a b c to f(a)(b)(c) as well.
That's just the point. It isn't common to play with curried functions
or monads or anything
On Mon, 01 Feb 2010 14:13:38 -0800, Jonathan Gardner wrote:
I judge a language's simplicity by how long it takes to explain the
complete language. That is, what minimal set of documentation do you
need to describe all of the language?
That's not a particularly good metric, IMHO.
A simple
On Sun, 31 Jan 2010 20:57:31 +0100, Robert wrote:
I tried lxml, but after walking and making changes in the element
tree, I'm forced to do a full serialization of the whole document
(etree.tostring(tree)) - which destroys the human edited format
of the original HTML code.
makes it rather
On Sat, 30 Jan 2010 16:58:34 +, tanix wrote:
I'm not familiar with Ruby, but most languages are cleaner than Python
once you get beyond the 10-minute introduction stage.
I'd have to agree. The only ones that beat Python in that department are
Javascript and PHP. Plus CSS and HTML if you
On Sun, 31 Jan 2010 03:01:51 -0800, rantingrick wrote:
That's also true for most functional languages, e.g. Haskell and ML, as
well as e.g. Tcl and most shells. Why require f(x) or (f x) if f x
will suffice?
yuck! wrapping the arg list with parenthesis (python way) makes the most
sense.
On Sat, 30 Jan 2010 11:28:47 -0800, KB wrote:
I have a service I subscribe to that uses javascript to stream news.
There's a Python interface to SpiderMonkey (Mozilla's JavaScript
interpreter):
http://pypi.python.org/pypi/python-spidermonkey
Thanks! I don't see a documentation page,
On Sun, 31 Jan 2010 13:41:55 -0600, Tim Chase wrote:
The previous absolute-path fails in cmd.exe for a variety of apps because
the / is treated as a parameter/switch to the various programs.
Fortunately, the Python path-handling sub-system is smart enough to do the
right thing, even when
On Sun, 24 Jan 2010 15:08:15 +, Rotwang wrote:
Hi all, can anybody tell me whether there's a way to change the default
location for files to be opened by open()? I'd like to be able to create
files somewhere other than my Python folder without having to write the
full path in the filename
On Wed, 27 Jan 2010 12:56:10 -0800, John Nagle wrote:
Arguably, Python 3 has been rejected by the market.
Arguably, Python 3 has not yet been accepted by the market.
Part of it is down to a catch-22: applications won't use Python 3 if the
libraries on which they depend don't support it, and
On Wed, 27 Jan 2010 15:29:05 -0800, Jonathan Gardner wrote:
There's a lot of magic in Ruby as well. For instance, function calls are
made without parentheses.
That's also true for most functional languages, e.g. Haskell and ML, as
well as e.g. Tcl and most shells. Why require f(x) or (f x) if
On Fri, 29 Jan 2010 16:53:43 +, Mr.SpOOn wrote:
I'm using the raw_input method and it works fine, but I noted that I can't
use backspace and when I accidentally press shift space (because I need to
input uppercase letters separated by a space) it writes some strange
characters.
So, is
On Sat, 30 Jan 2010 06:21:01 -0800, KB wrote:
I have a service I subscribe to that uses javascript to stream news.
Ideally I would like to use python to parse the information for me. Note
there is an option to take a static snapshot of the current stream but
that is still done via Javascript.
On Thu, 21 Jan 2010 11:25:08 +0100, Tomas Pelka wrote:
have a problem with following piece of code:
--
import subprocess
paattern = python
cmd = /usr/bin/locate
arg1 = -i
arg2 = -d /var/www/books/mlocate.db
arg3 = str( + pattern)
p1
On Fri, 22 Jan 2010 16:09:03 -0800, Steve Howell wrote:
I just saw the thread for medians, and it reminded me of a problem
that I need to solve. We are writing some Python software for
sailing, and we need to detect when we've departed from the median
heading on the leg. Calculating
On Fri, 22 Jan 2010 21:23:37 -0800, Aleksey wrote:
I write crossplatform program and have next problem under windows
(under linux is all OK) :
I'm trying to get the UTC modification date of files on the flash
drive under windows. In the flash card system is FAT.
Timestamps stored on a FAT
On Mon, 18 Jan 2010 11:21:54 +0100, superpollo wrote:
what is the most pythonic way to substitute substrings?
say the subs are:
quuux -- foo
foo -- bar
baz -- quux
then i cannot apply the subs in sequence (say, .replace() in a loop),
otherwise:
fooxxxbazyyyquuux -- fooxxxbazyyyfoo
On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:
Actually, no. It's quite possible to make a Python implementation that
runs fast. It's just that CPython, a naive interpreter, is too primitive
to do it. I was really hoping that Google would put somebody good at
compilers in charge
On Fri, 15 Jan 2010 10:42:43 -0800, W. eWatson wrote:
I thought I'd put a page break, chr(12), character in a txt file I wrote
to skip to the top of the page. It doesn't work. Comments?
The 1970's are over, and neither Notepad nor your printer attempts to
maintain compatibility with a
On Sun, 10 Jan 2010 23:13:55 -0800, Dan Bishop wrote:
If you actually need to perform comparisons across types, you can rely
upon the fact that tuple comparisons are non-strict and use e.g.:
a = 5
b = '5'
(type(a).__name__, a) (type(b).__name__, b)
True
On Mon, 11 Jan 2010 10:09:36 +0100, Martin v. Loewis wrote:
In Python 3.1 is there any difference in the buffering behavior of the
initial sys.stdout and sys.stderr streams?
No.
Were they different at some earlier point in Python's evolution?
That depends on the operating system. These
On Mon, 11 Jan 2010 23:27:03 +0800, Steven Woody wrote:
I am using pyserial. But I always get the local echo after I write
some characters onto serial port and I find no way to disable this
behavior. When I say 'local echo', I mean the next read operation will
get characters that was just
On Mon, 11 Jan 2010 18:57:24 +0100, mk wrote:
I have two lists of IP addresses:
hostips = [ 'a', 'b', 'c', 'd', 'e' ]
thread_results = [ 'd', 'b', 'c' ]
I need to sort thread_results in the same order as hostips.
P.S. One clarification: those lists are actually more complicated
On Wed, 06 Jan 2010 19:05:40 -0800, Steven K. Wong wrote:
Well, the example code at
http://www.python.org/ ... /subprocess.html#replacing-shell-pipeline
has the same issue:
Perhaps the doc can be improved to remind folks to close p1.stdout if
the calling process doesn't need it, unless
On Fri, 08 Jan 2010 11:44:48 +0800, Water Lin wrote:
I am a new guy to use Python, but I want to parse a html page now. I
tried to use HTMLParse. Here is my sample code:
--
from HTMLParser import HTMLParser
Note that HTMLParser only tokenises HTML; it doesn't actually
On Fri, 08 Jan 2010 20:14:51 +0100, Daniel Fetchinson wrote:
I have a plain text file which I would like to protect in a very
simple minded, yet for my purposes sufficient, way. I'd like to
encrypt/convert it into a binary file in such a way that possession of
a password allows anyone to
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote:
Thanks, this looks very simple too, but where is the decryption code?
Wikipedia seems to suggest that encryption and decryption are both the
same but running crypt on the output of crypt doesn't give back the
original string. So
On Sun, 10 Jan 2010 15:30:12 +, Steven D'Aprano wrote:
Thanks, this looks very simple too, but where is the decryption code?
Wikipedia seems to suggest that encryption and decryption are both the
same but running crypt on the output of crypt doesn't give back the
original string. So
Hellmut Weber wrote:
being a causal python user (who likes the language quite a lot)
it took me a while to realize the following:
max = '5'
n = 5
n = max
False
Section 5.9 Comparison describes this.
Can someone give me examples of use cases
Peter Otten wrote:
The use cases
On Sun, 10 Jan 2010 08:54:51 -0800, Paul Rubin wrote:
Nobody nob...@nowhere.com writes:
RC4 (aka ArcFour) is quite trivial to implement, and better than inventing
your own cipher or using a Vignere: ...
That's a cute implementation, but it has no authentication and doesn't
include any
On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote:
I'd like it a lot if the Python stdlib could include a serious
cryptography module.
And I'd like a truckload of gold ;)
Right now, even asking for HTTPS support is too much to ask. Heck,
even asking for the fake HTTPS support to be
On Wed, 06 Jan 2010 11:39:37 -0800, Steven K. Wong wrote:
Suppose now all the prog1.poll() calls/loop are replaced by a single
prog1.wait(). Without the explicit prog1.stdout.close(), prog1.wait()
will not return, so the calling process still hangs. Because calling
prog1.wait() means that the
On Tue, 05 Jan 2010 11:40:25 -0800, KvS wrote:
Hardcopy document formats such as PostScript and PDF use positions
relative to the edges of the page, not the margins.
Right. Still, Acrobat Reader by default scales the contents to fit on
a page and creates some margins by doing so, no? So if
On Tue, 05 Jan 2010 12:20:58 -0800, Marco Nawijn wrote:
You could use the build-in function enumerate inside a list
comprehension.
seq = range(5)
[ (i,s) for i,s in enumerate(seq) ]
[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4)]
Just use list(), i.e. list(enumerate(seq)).
--
On Tue, 05 Jan 2010 19:46:01 -0800, alex23 wrote:
They will tell me how to use except: (which is a good example why a
program should not use exceptions for its normal control flow if at
all possible).
Really? Magic functions that coerce and eat errors are a better coding
technique than
On Tue, 05 Jan 2010 15:50:39 -0800, Steven K. Wong wrote:
Below, I have a Python script that launches 2 child programs, prog1
and prog2, with prog1's stdout connected to prog2's stdin via a pipe.
(It's like executing prog1 | prog2 in the shell.)
If both child programs exit with 0, then the
On Mon, 04 Jan 2010 21:30:31 -0800, cassiope wrote:
One more tidbit observed: my last note, that it works when using
seteuid/setegid?
Well - that only applies if the daemon is running under strace (!).
It fails
if started directly by root, or if the strace session has ended,
leaving the
On Mon, 04 Jan 2010 08:09:56 -0800, Brian D wrote:
If I'm running a process in a loop that runs for a long time, I
occasionally would like to look at a log to see how it's going.
I know about the logging module, and may yet decide to use that.
Still, I'm troubled by how fsync() doesn't
On Sun, 03 Jan 2010 13:56:24 -0800, cassiope wrote:
I'm changing the uid and gid in the daemon (which runs with root
permissions
until the fork and uid/gid change). The uid and gid are confirmed by
printing os.getuid() and os.getgid() in the script.
Those tell you the *real* UID/GID.
On Fri, 01 Jan 2010 17:37:40 -0800, W. eWatson wrote:
I suspect that if one installs v2.4 and 2.5, or any two versions, that
one will dominate, or there will be a conflict. I suppose it would not
be possible to choose which one should be used. Comments?
The only inherent conflict is that
On Sat, 26 Dec 2009 20:06:02 +, Tim Golden wrote:
I'm trying to come up with something which will illustrate
the usefulness of a distributed processing model. Since I
may not be using the term distributed exactly, my
criteria are:
* It should be clear that the application produces
On Mon, 28 Dec 2009 17:12:23 +0100, Emmanuel wrote:
I'm using Python 2.6 and the new subprocess module to get the exit value
of an external executable. It appears the return value given by wait()
or poll() operations is masked under Unix: I only get the lower 8 bits.
So an exit value of
On Tue, 29 Dec 2009 12:35:11 +0430, Laszlo Nagy wrote:
Suppose we have a program that writes its process id into a pid file.
Usually the program deletes the pid file when it exists... But in some
cases (for example, killed with kill -9 or TerminateProcess) pid file is
left there. I would
On Tue, 22 Dec 2009 23:41:31 -0800, edgue wrote:
How do I use gtk to enter a (hidden) text press ENTER ... done?
Connect the gtk.Entry's activate signal to the click() method:
self.entry.connect(activate, self.click)
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 18 Dec 2009 09:49:26 -0500, Colin W. wrote:
You don't say, but seem to imply that the slice components include None.
That's how missing components are implemented at the language level:
class foo:
= def __getitem__(self, s):
= return s
=
On Mon, 14 Dec 2009 14:18:49 -0500, Terry Reedy wrote:
Many more people uses range objects (xrange in 2.x). A range object has
the same info as a slice object *plus* it is iterable.
This isn't quite true, as a range cannot have a stop value of None, i.e.
you can't represent [n:] or [:] etc as
On Mon, 14 Dec 2009 21:37:33 -0300, Gabriel Genellina wrote:
There are no file objects in 3.x. The file() function no longer
exists. The return value from open(), will be an instance of
_io.something depending upon the mode, e.g. _io.TextIOWrapper for 'r',
_io.BufferedReader for 'rb',
On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
The 3.1 documentation specifies that file.read returns bytes:
Does it need fixing?
There are no file objects in 3.x. The file() function no longer
exists. The return value from open(), will be an instance of
_io.something
On Mon, 14 Dec 2009 03:14:11 +, MRAB wrote:
You originally stated that you want to scramble the bytes -- if
you mean to implement some sort of encryption algorithm you should know
that most of them work in blocks as the key is longer than one byte.
Block ciphers work in blocks.
On Mon, 14 Dec 2009 10:03:16 -0800, Dave wrote:
Just as sets may now be written as {3,'hi'}, I propose that slices
should be available using [start:end] syntax. Following example comes
from projecteuler.net problem 166. The Numeric community would also
like this, as would the general python
On Fri, 11 Dec 2009 12:26:30 +0200, Sancar Saran wrote:
1-) Can I create Global (read/write access anywhere from my code) Multi
dimensional, associative array (or hash) and store any kind of variable type.
Global, no; at least not in the sense of e.g. C. Python doesn't have a
global
On Sun, 13 Dec 2009 12:39:26 -0800, Dennis Lee Bieber wrote:
You originally stated that you want to scramble the bytes -- if
you mean to implement some sort of encryption algorithm you should know
that most of them work in blocks as the key is longer than one byte.
Block ciphers work in
On Fri, 11 Dec 2009 12:49:42 -0800, Ed Keith wrote:
the following works:
r = re.compile('\*(.+)\*')
def f(s):
m = r.match(s)
if m:
return m.group(1)
else:
return ''
n = [f(x) for x in l if r.match(x)]
But it is inefficient, because it is
On Thu, 10 Dec 2009 05:47:19 +, Steven D'Aprano wrote:
I string together a bunch of elif statements to simulate a switch
if foo == True:
blah
elif bar == True:
blah blah
elif bar == False:
blarg
elif
This isn't what would normally be considered a switch (i.e.
On Mon, 07 Dec 2009 11:04:06 +0100, Jean-Michel Pichavant wrote:
When using shell=True, your process is started in a shell, meaning the
PID of your subprocess is not self.luca.pid, self.luca.pid is the PID of
the shell.
This isn't true for a simple command on Unix (meaning a program name
On Sun, 06 Dec 2009 22:10:15 +, Edward A. Falk wrote:
I recently read that many libraries, including Numpy have not been
ported to Python 3.
When do you think that Python 3 will be fully deployed?
It will never be fully deployed. There will always be people out there who
haven't felt it
On Tue, 08 Dec 2009 21:02:44 -0800, Kee Nethery wrote:
I string together a bunch of elif statements to simulate a switch
if foo == True:
blah
elif bar == True:
blah blah
elif bar == False:
blarg
elif
This isn't what would normally be considered a switch (i.e.
On Wed, 09 Dec 2009 10:28:40 -0800, Rami Chowdhury wrote:
But on Unix, it's a square-peg-round-hole situation.
I dunno, I find it rather useful not to have to faff about with
encoding to/from when working with non-ASCII files (with non-ASCII
filenames) on Linux.
For the kind of task I'm
On Fri, 04 Dec 2009 00:33:57 +, Steven D'Aprano wrote:
Just to be contrary, I *like* mbox.
Me too. :-)
Me too.
Why? What features or benefits of mbox do you see that make up for it's
disadvantages?
Simplicity and performance.
Maildir isn't simple when you add in the filesystem or
On Fri, 04 Dec 2009 13:38:11 -0800, Ross Boylan wrote:
If one uses subprocess.Popen(args, ..., shell=True, ...)
When args finishes execution, does the shell terminate? Either way
seems problematic.
That depends upon what args is. On Unix, if args ends with a , the
shell will terminate as
On Fri, 04 Dec 2009 13:51:15 -0800, tyler wrote:
Howdy folks, I'm working on a JSON Python module [1] and I'm struggling with
an appropriate syntax for dealing with incrementally parsing streams of data
as they come in (off a socket or file object).
The underlying C-level parsing library
On Thu, 03 Dec 2009 07:55:19 +, r0g wrote:
I have to recommend to opposite, stick with wx. What's the point of
tying yourself into GTK when wx works on Mac, PC and Linux?
The main drawbacks are that wxWidgets sucks compared to GTK or Qt (mostly
due to being modelled on the Win32 API, which
On Mon, 30 Nov 2009 01:07:53 -0500, Mel wrote:
In FORTRAN and PL/I words were un-reserved to a degree that's really
bizarre. A short post can't begin to do it justice -- let's just mention
that IF and THEN could be variable names, and DO 100 I=1.10 . The syntaxes
were carefully crafted
On Sun, 22 Nov 2009 18:29:25 +, MRAB wrote:
os.open(C://Users//lutfi//Documents//te//log.txt , a )
open(C://Users//lutfi//Documents//te//log.txt , a )
Backslashes need to be doubled; forward slashes don't.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 30 Nov 2009 21:02:00 +1100, Daniel Dalton wrote:
That did the trick, thanks, after I append
[-2]
Further testing under screen says otherwise -- it seems to give me the
tty number, not the virtual console number. Is there any way to figure
out what virtual console I'm am in
I'm
On Tue, 01 Dec 2009 08:51:20 +0200, Johann Spies wrote:
After reading about peppy on Freshmeat I decided to try it out after
installing it using easy_install. But:
$ peppy
File
/usr/lib/python2.5/site-packages/peppy-0.13.2-py2.5.egg/peppy/lib/multikey.py,
line 120, in module
On Mon, 23 Nov 2009 17:45:24 +0100, Thomas Lotze wrote:
What's your real problem, or use case? Are you just concerned with
diffing, or are others likely to read the xml, and want it formatted the
way it already is?
I'd like to put the XML under revision control along with other stuff.
On Tue, 24 Nov 2009 02:23:19 +0100, Christian Heimes wrote:
Gregory Ewing wrote:
ntpath.join('d:\\foo', '\\bar')
'\\bar'
This does seem like a bug, though -- the correct result
should really be 'd:\\bar', since that's what you would
get if you used the name '\\bar' with 'd:' as your
On Mon, 23 Nov 2009 22:06:29 +0100, Alf P. Steinbach wrote:
10. It says UnicodeDecodeError on mail nr. something something.
That's what you get for using Python 3.x ;)
If you must use 3.x, don't use the standard descriptors. If you must use
the standard descriptors in 3.x, call detach() on
On Mon, 23 Nov 2009 23:08:25 +0100, Diez B. Roggisch wrote:
Try printing
stdout.write('\r--%d')
^M--0^M--1^M--2^M--3... ;)
But it's probably good enough for the OP's purposes.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 22 Nov 2009 03:43:31 +0100, Ivan Voras wrote:
The problem is: poll() always returns that the fd is ready (without
waiting), but read() always returns an empty string. Actually, it
doesn't matter if I turn O_NDELAY on or off. select() does the same.
Regular files are always ready for
On Fri, 20 Nov 2009 09:51:49 -0800, sturlamolden wrote:
You can make a user-space scheduler and run a 10 tasklets on a
threadpool. But there is a GIL in stackless as well.
Nobody wants 10 OS threads, not with Python, not with Go, not with
C.
Also note that Windows has native
On Fri, 20 Nov 2009 17:12:36 -0800, Aahz wrote:
Comparing Go to another computer language -- do you recognize it?
Here is a language so far ahead of its time that it was not only an
improvement on its predecessors but also on nearly all its successors.
- C. A. R. Hoare (although he was
On Thu, 19 Nov 2009 06:21:09 -0800, Bas wrote:
Below is the script I use to automatically kill firefox if it is not
behaving, maybe you are looking for something similar.
lines = os.popen('ps ax|grep firefox').readlines()
This isn't robust. It will kill any process with firefox anywhere in
On Tue, 17 Nov 2009 23:57:55 +, Rhodri James wrote:
Quote the filenames or escape the spaces:
C:\Python26\Python.exe C:\echo.py C:\New Folder\text.txt
We've been living with this pain ever since windowed GUIs encouraged
users
to put spaces in their file names (Apple, I'm looking at
On Wed, 18 Nov 2009 12:25:14 +0100, Jean-Michel Pichavant wrote:
I'm currently inspecting my Linux process list, trying to parse it in
order to get one particular process (and kill it).
I ran into an annoying issue:
The stdout display is somehow truncated (maybe a terminal length issue,
I
501 - 600 of 724 matches
Mail list logo