On Thu, 16 Sep 2010 15:51:38 +1000, James Mills wrote:
> On Thu, Sep 16, 2010 at 2:49 PM, Ned Deily wrote:
>> If the problem is that the socket object in question no longer exists,
>> you can protect your code there by enclosing the remove operation in a
>> try block, like:
>
>
> The question t
John O'Hagan wrote:
> I find this surprising:
>
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--test', action='append', default=['default'])
> [...]
parser.parse_args(['--test', 'arg'])
> Namespace(test=['default', 'arg'])
>
> As an argument is provi
Lawrence D'Oliveiro wrote:
> Why not just call Scriptomatic directly from within the Python script, then?
Because Scriptomatic _generates scripts to access WMI_, that's what it
_does_. Are you _seriously_ advocating writing Python code to fire up
a Windows application, programmatically manipulati
MAKE UPTO $5000 P/M $2000 IN FIRST 30 DAYS! NO INVESTMENT
Generate $50 to $100 whenever you
have a couple of hours free time to spare.
You could make $50 or more in the next 2 hours.
Starting right Now!Today!
http://snipurl.com/11i6lw
GET PAID TO:
Take online surveys and make from $5 to $75, or
On 2:59 PM, Douglas wrote:
@Diez and @David
Thanks guys. Both excellent leads. Colour me happy. I can now make
progress and meet some deadlines. :)
@Lawrence
Why reinvent rsync?
In what way is rsync relevant to the stated problem? Did you actually
READ the question?
Note: I use Linux at hom
On 13/09/2010 18:06, Chris Withers wrote:
Hi All,
I'm wondering what libraries people would use to answer the following
questions relating to business days:
- on a naive level; "what's give me the last business day" (ie:
skipping weekends)
- on a less-naive level; same question but taking
On Sep 9, 10:09 pm, Nobody wrote:
> On Wed, 08 Sep 2010 03:30:00 -0700, Baba wrote:
> > Who is licensed to judge what can and cannot be posted as a question?
>
> Exactly the same set of people who are licensed to judge what can and
> cannot be posted as an answer.
>
> If you don't like the respons
@Dave
Grateful thanks for your web site suggestions, and I will look them
up.
@Lawrence
Pleasee accept my apologies. I mistook your brevity for a superior
snotty attitude.
--
http://mail.python.org/mailman/listinfo/python-list
Is there a python module to make autocomplete suggestion easy.
I would build an api reference as a string:
CATALOG1.SCHEME1.TABLE1.column1
CATALOG1.SCHEME1.TABLE1.column2
CATALOG1.SCHEME1.TABLE1.column3
.
.
CATALOG10.SCHEME10.TABLE100.column1
CATALOG10.SCHEME10.TABLE100.column2
CATALOG10.SCHEME1
On Thu, Sep 16, 2010 at 5:34 PM, dusans wrote:
> Is there a python module to make autocomplete suggestion easy.
>
Try 'rlcompleter' module. Though I haven't tried it myself, just used it in
.pythonrc for auto-completion in intepretor mode.
http://docs.python.org/library/rlcompleter.html
--
~l
Hi, thanks for the answer.
I thought about that, but the problem is that I found the problem in code
that *was* using the Queue between processes. This code for example fails
around 60% of the time in one of our linux machines (raising an Empty
exception):
from processing import Queue, Process
im
On Sep 16, 12:39 pm, alex23 wrote:
> Lawrence D'Oliveiro wrote:
> > Why not just call Scriptomatic directly from within the Python script, then?
>
> Because Scriptomatic _generates scripts to access WMI_, that's what it
> _does_. Are you _seriously_ advocating writing Python code to fire up
> a W
I'm looking for an example (perhaps with red5) for this scenario:
1. I install some server tools on my ubuntu box
2. I place an mp3 and an m4a in a special location
3. I click a play button on a web page and both songs play in random order
AJ ONeal
--
http://mail.python.org/mailman/listinfo/pyth
Hi,
I have some trouble with Python on Snow Leopard (10.6.3). I compile
Python as a framework(for 32/64bit) without any problems.
But implementing the lib in my C app, I get the following error on
linking:
Undefined symbols:
"_Py_InitModule4_64", referenced from:
RegisterModule_BPY(char c
OK, this is a very stupid question about a very simple topic, but
Google is failing me this morning...
I'm trying to print a string that looks like this:
Reported memory amounts are within 10% tolerance
and the print line looks (for now) like this:
print "Reported memory amounts are within %s%s
On 17 September 2010 01:25, J wrote:
> Is there a better way to print a '%' in the string when also using
> formating?
>
I believe %% will escape the % and prints it straight out.
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-09-16, J wrote:
> Reported memory amounts are within 10% tolerance
>>> "Reported memory amounts are within %d%% tolerance" % 10
'Reported memory amounts are within 10% tolerance'
--
Grant Edwards grant.b.edwardsYow! It's the RINSE CYCLE!!
On 09/16/10 10:25, J wrote:
OK, this is a very stupid question about a very simple topic, but
print "Reported memory amounts are within %s%s tolerance" %
(self.mem_tolerance,'%')
Is there a better way to print a '%' in the string when also using formating?
I've tried things like this:
print "b
On Thu, Sep 16, 2010 at 12:09, Grant Edwards wrote:
> On 2010-09-16, J wrote:
>
>> Reported memory amounts are within 10% tolerance
>
"Reported memory amounts are within %d%% tolerance" % 10
> 'Reported memory amounts are within 10% tolerance'
Thanks for the replies... I KNEW there was a si
Ha, I had this same problem, but I was trying to do dynamic formatting:
("%%%s" % format) % number
where "format" is a python-ized fortran format string (i.e. "9.4E"). Looks
kinda weird and less elegant than the {0:{1}}-type .format() syntax, but at
least it preserves backwards compatibility to
I am trying to rebujild the 2.7 maintenance branch and get this error
on Ubuntu 10.04.1 LTS:
XXX lineno: 743, opcode: 0
Traceback (most recent call last):
File "/usr/local/src/python-2.7-maint-svn/Lib/site.py", line 62, in
import os
File "/usr/local/src/python-2.7-maint-svn/Lib/os.py", li
On Sep 15, 5:51 pm, "jipalaciosort...@gmail.com"
wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> El 15/09/2010 20:58, Grant Edwards escribió:
>
>
>
> > On 2010-09-15, cerr wrote:
>
> >> I get a socket error "[Errno 98] Address already in use" when i
> >> try to open a socket that got
On Sep 15, 11:58 am, Grant Edwards wrote:
> On 2010-09-15, cerr wrote:
>
>
>
>
>
> > I get a socket error "[Errno 98] Address already in use" when i try to
> > open a socket that got closed before with close(). How come close()
> > doesn't close the socket properly?
> > My socket code :
>
> > s
For some reason, the tasks I put into my thread pool occasionally get
run more than once.
Here's the code:
#
---
from threading import Thread
from queue import Queue
import subprocess
On Sep 15, 5:33 pm, James Mills wrote:
> On Thu, Sep 16, 2010 at 10:14 AM, Hans wrote:
> > I'm new to this area. Please allow me to ask some (maybe stupid)
> > questions.
>
> Without reading the rest of your post too much. Designs are up to you,
> I can't comment.
>
> I can only share in a fairly
Hello,
I've build python 2.7 successfully by just calling configure, make and
make install. But to use python within PostgreSQL, I need to built
python with --enable-shared.
I tried to do so (configure --enable-shared), but I see these lines
several times in the log (but compiling continues)
On 16/09/2010 18:19, Hans wrote:
On Sep 15, 5:33 pm, James Mills wrote:
On Thu, Sep 16, 2010 at 10:14 AM, Hans wrote:
I'm new to this area. Please allow me to ask some (maybe stupid)
questions.
Without reading the rest of your post too much. Designs are up to you,
I can't comment.
I can on
Another pretty web framework is Bottle (http://bottle.paws.de). It is very
easy to setup and use. I use it to tasks like this one you want.
[]s
iuri
On Thu, Sep 16, 2010 at 3:01 PM, MRAB wrote:
> On 16/09/2010 18:19, Hans wrote:
>
>> On Sep 15, 5:33 pm, James Mills wrote:
>>
>>> On Thu, Sep 1
On Thursday 16 September 2010, it occurred to Marten Lehmann to exclaim:
> Hello,
>
> I've build python 2.7 successfully by just calling configure, make and
> make install. But to use python within PostgreSQL, I need to built
> python with --enable-shared.
>
> I tried to do so (configure --enable
The strange thing is: This only happens when I'm compiling through
rpmbuild. Issuing the same commands (configure --enable-shared, make,
make install) directly on the shell works fine...
--
http://mail.python.org/mailman/listinfo/python-list
I digged into this one step further:
I compared the output of configure and make. For configure, there is no
change. But for make, I found out something, that I didn't expected:
When configure is called with a prefix to a location, where a valid
python installation already exists, it uses the
I need to create a simple utility to remove characters from either the
right or left side of directories.
This works, but there has to be a better way. I tried to use a
variable inside the brackets but I can't get
that to work. Can anyone think of a way to do this with less code?
Thanks!
import
On Thu, Sep 16, 2010 at 3:35 PM, DataSmash wrote:
> I need to create a simple utility to remove characters from either the
> right or left side of directories.
> This works, but there has to be a better way. I tried to use a
> variable inside the brackets but I can't get
> that to work. Can anyo
On 09/16/2010 03:47 PM, Benjamin Kaplan wrote:
On Thu, Sep 16, 2010 at 3:35 PM, DataSmash wrote:
I need to create a simple utility to remove characters from either the
right or left side of directories.
This works, but there has to be a better way. I tried to use a
variable inside the brackets
On Sep 16, 2:47 pm, Benjamin Kaplan wrote:
> On Thu, Sep 16, 2010 at 3:35 PM, DataSmash wrote:
> > I need to create a simple utility to remove characters from either the
> > right or left side of directories.
> > This works, but there has to be a better way. I tried to use a
> > variable inside
> Where line 75 contains following:
> s.bind((host, port))
As Tomas pointed out, you close conn, but you do not close the server
socket 's'
/Björn
--
http://mail.python.org/mailman/listinfo/python-list
There's a tendency to use "dynamic attributes" in Python when
trying to encapsulate objects from other systems. It almost
works. But it's usually a headache in the end, and should be
discouraged. Here's why.
Some parsers, like BeautifulSoup, try to encapsulate HTML tag
fields as Python a
On Fri, Sep 17, 2010 at 7:46 AM, John Nagle wrote:
> There's a tendency to use "dynamic attributes" in Python when
> trying to encapsulate objects from other systems. It almost
> works. But it's usually a headache in the end, and should be
> discouraged. Here's why.
What do you mean by "dynam
Hi all,
I'd like to ask for suggestions regarding suitable datastracture for
storing textual metadata along with a plain text string.
The input format I have is simply text with custom tags like ; I'd prefer to have this human readable format the original
data source.
For the application, the tags
On Wednesday 15 September 2010 18:53, Andrew wrote:
> I'm trying to remove the widgets from the QFormLayout widget from
> PyQt4. According to the documentation I should be able to use the
> command .takeAt(int) which will delete the widget from the layout and
> then return to me the QLayoutWidget.
On 16/09/2010 23:11, Vlastimil Brom wrote:
Hi all,
I'd like to ask for suggestions regarding suitable datastracture for
storing textual metadata along with a plain text string.
The input format I have is simply text with custom tags like; I'd prefer to have this human readable format the original
On 16/09/2010 22:46, John Nagle wrote:
There's a tendency to use "dynamic attributes" in Python when
trying to encapsulate objects from other systems. It almost
works. But it's usually a headache in the end, and should be
discouraged. Here's why.
Some parsers, like BeautifulSoup, try to encaps
On Fri, Sep 17, 2010 at 9:27 AM, MRAB wrote:
> For the work on updating the re module there was a discussion about
> whether named capture groups should be available as attributes of the
> match object or via subscripting (or both?). Subscripting seemed
> preferable to me because:
>
> 1. Adding at
Hello,
I am trying to read from stdin and dump what's read to a temporary
file. My code works for small files but as soon as I have a file that
has, e.g., more than 300 lines, there is always one and only one line
that is truncated compared to the input.
Here is my code:
#
2010/9/17 MRAB :
> On 16/09/2010 23:11, Vlastimil Brom wrote:
>>
>>...
>> I put together some code, which works as expected, but I suspect
>> somehow, that there must be better ways of doing it.
>>
>> Two things I am not quite clear about are using the placeholders for
>> the data identifiers and "
On Thu, Sep 16, 2010 at 7:36 PM, Jean Luc Truchtersheim <
jeanluc...@gmail.com> wrote:
> Hello,
>
> I am trying to read from stdin and dump what's read to a temporary
> file. My code works for small files but as soon as I have a file that
> has, e.g., more than 300 lines, there is always one and o
On 17/09/2010 00:36, Jean Luc Truchtersheim wrote:
Hello,
I am trying to read from stdin and dump what's read to a temporary
file. My code works for small files but as soon as I have a file that
has, e.g., more than 300 lines, there is always one and only one line
that is truncated compared to t
On Fri, Sep 17, 2010 at 9:36 AM, Jean Luc Truchtersheim
wrote:
> Can anybody reproduce this behavior.
Jean it would help if you could provide samples of
your input and output files. I'm pretty sure I might
have a clue as to what your problem might be, but
I can't be sure until I see the input and
On Fri, Sep 17, 2010 at 10:06 AM, MRAB wrote:
> You're not closing f_in. That line should be:
Although this _could_ be the problem (buffers not being flushed and
the file being properly closed, etc)
it could be something else...
--James
--
-- James Mills
--
-- "Problems are solved by method"
-
On 17/09/2010 00:56, Vlastimil Brom wrote:
2010/9/17 MRAB:
On 16/09/2010 23:11, Vlastimil Brom wrote:
...
I put together some code, which works as expected, but I suspect
somehow, that there must be better ways of doing it.
Two things I am not quite clear about are using the placeholders for
Dear Fellow python users,
Many thanks for your help.
Those missing brackets were the cause of my problem.
Now my program works as expected.
Many, many heartfelt thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Sep 17, 2010 at 10:25 AM, Jean Luc Truchtersheim
wrote:
> Dear Fellow python users,
>
> Many thanks for your help.
>
> Those missing brackets were the cause of my problem.
>
> Now my program works as expected.
>
> Many, many heartfelt thanks.
Glad to hear it! Do you understand why ?
chee
I am really sorry, but what are you talking about ? Hmmm, ...I have
problems to compile Python on SL, I did not ask anything about
"dynamic attribute". I don't get it...
--
http://mail.python.org/mailman/listinfo/python-list
In message
<257b2d99-03d4-491b-8f8b-dccd2bc10...@p22g2000pre.googlegroups.com>, alex23
wrote:
> Lawrence D'Oliveiro wrote:
>
>> Why not just call Scriptomatic directly from within the Python script,
>> then?
>
> Because Scriptomatic _generates scripts to access WMI_, that's what it
> _does_.
P
On Fri, Sep 17, 2010 at 11:33 AM, moerchendiser2k3
wrote:
> I am really sorry, but what are you talking about ? Hmmm, ...I have
> problems to compile Python on SL, I did not ask anything about
> "dynamic attribute". I don't get it...
You are subscribed to the python mailing list.
Check your subs
On Wed, 15 Sep 2010 14:49:09 +0100, Chris Withers wrote:
> I'm curious as to why, with a file called "Foo.txt"
> os.path.normcase('FoO.txt') will return "foo.txt" rather than "Foo.txt"?
normcase() doesn't look at the filesystem; it's just string manipulation.
--
http://mail.python.org/mailman
On Thu, 16 Sep 2010 07:12:16 +1000, Ben Finney wrote:
>> Yes, I know the behaviour is documented
>
> The docstring is fairly poor, IMO. You might want to submit a bug report
> to improve it.
The description in the library documentation is misleading:
os.path.normcase(path)
Normalize the cas
On 9/16/2010 5:46 PM, John Nagle wrote:
By mistakenly posted this as a response to "compile Py2.6 on SL", you
1) confused the OP and
2) limited it audience -- I agree with your points, but would have
missed this if I had had threads collapsed, as I usually do, since I
have no interest in 2.6 co
On 9/16/2010 12:23 PM, J wrote:
Thanks for the replies... I KNEW there was a simple way to escape the
% but I had no idea what it was (I just had conviction).
I was thrown when the \ didn't escape it... never knew about %%. But
now I do! Thanks for the replies!
Doubling an escape char, what
On 16Sep2010 09:55, mark.pellet...@asrcms.com wrote:
| For some reason, the tasks I put into my thread pool occasionally get
| run more than once.
|
| Here's the code:
You need to post your _exact_ code. I had to change:
from queue import Queue
into
from Queue import Queue
So: _do_ you have
In article <20100917043826.ga21...@cskk.homeip.net>,
Cameron Simpson wrote:
> On 16Sep2010 09:55, mark.pellet...@asrcms.com
> wrote:
> | For some reason, the tasks I put into my thread pool occasionally get
> | run more than once.
> |
> | Here's the code:
>
> You need to post your _exact_ co
On 16Sep2010 22:14, Ned Deily wrote:
| In article <20100917043826.ga21...@cskk.homeip.net>,
| Cameron Simpson wrote:
|
| > On 16Sep2010 09:55, mark.pellet...@asrcms.com
| > wrote:
| > | For some reason, the tasks I put into my thread pool occasionally get
| > | run more than once.
| > |
| >
In article <20100917052259.ga28...@cskk.homeip.net>,
Cameron Simpson wrote:
> On 16Sep2010 22:14, Ned Deily wrote:
> | In article <20100917043826.ga21...@cskk.homeip.net>,
> | Cameron Simpson wrote:
> |
> | > On 16Sep2010 09:55, mark.pellet...@asrcms.com
> | > wrote:
> | > | For some reason
63 matches
Mail list logo