I'd like to write some small command-line utilities to do some tasks
in subversion:
* Do a commit that includes all modified externals.
* Do a status that includes status of all externals.
* Do a log that combines logs of . and all externals.
There appear to be three options:
1) pysvn
On Tue, Oct 27, 2015 at 4:01 AM, Israel Brewster wrote:
> Sounds similar to MRAB's suggestion of starting the process before any
> sockets have been opened. Certainly worth investigating, and I think it
> should be doable. Thanks!
Yep, either would work. My suggestion would be to not fork off f
On Oct 25, 2015, at 6:48 PM, Chris Angelico wrote:
>
> On Sat, Oct 24, 2015 at 3:35 AM, Israel Brewster
> wrote:
>>
>> Ideally, this recalculation process would happen in the background. There is
>> no need for the user to wait around while the system crunches numbers - they
>> should be able
On Oct 25, 2015, at 3:40 PM, Dennis Lee Bieber wrote:
>
> On Fri, 23 Oct 2015 08:35:06 -0800, Israel Brewster
> declaimed the following:
>
>> tl;dr: I've been using the multiprocessing module to run some calculations
>> in the background of my CherryPy web app, but apparently this process
>>
On Oct 25, 2015, at 4:05 PM, MRAB wrote:
>
> On 2015-10-23 17:35, Israel Brewster wrote:
>> tl;dr: I've been using the multiprocessing module to run some
>> calculations in the background of my CherryPy web app, but apparently
>> this process sometimes gets stuck, causing problems with open socke
On Sat, Oct 24, 2015 at 3:35 AM, Israel Brewster wrote:
>
> Ideally, this recalculation process would happen in the background. There is
> no need for the user to wait around while the system crunches numbers - they
> should be able to move on with entering another log or whatever else they
> need
Israel Brewster writes:
[no text]
Please ensure your email message body is “text/plain” (and preferably
not HTML) when posting to unfamiliar recipients — which is always, on a
public forum like this.
--
\“Pinky, are you pondering what I'm pondering?” “Umm, I think |
`\ so, Bra
On 2015-10-23 17:35, Israel Brewster wrote:
tl;dr: I've been using the multiprocessing module to run some
calculations in the background of my CherryPy web app, but apparently
this process sometimes gets stuck, causing problems with open sockets
piling up and blocking the app. Is there a better w
tl;dr: I've been using the multiprocessing module to run some calculations in the background of my CherryPy web app, but apparently this process sometimes gets stuck, causing problems with open sockets piling up and blocking the app. Is there a better way?The (rather wordy) details:I have a moderat
eta = hndl.PropsSI('V','P',p,'H',h,'Water')
> return rho,t,eta,x
>
> h = 1e3*np.linspace(700,1500,len)
> p = 1e6*np.linspace(2.8,3,len)
>
> t1 = time.time()
> (rho,t,eta,x) = PyDir(p,h,CPpy)
> t2 = time.time()
> print(
P',p,'H',h,'Water')
x = hndl.PropsSI('Q','P',p,'H',h,'Water')
eta = hndl.PropsSI('V','P',p,'H',h,'Water')
return rho,t,eta,x
h = 1e3*np.linspace(700,1500,len)
p = 1e6*np.linspace(2.8,
On 01/09/2013 06:24 PM, andydtay...@gmail.com wrote:
> Thanks for your help - this is what I did - though it's probably obvious to
> most people reading this.
>
>for rowcount in range (0, stn_count):
> row_durations.append(stn_list_short[rowcount])
> for colcount in range (0, stn_c
Thanks for your help - this is what I did - though it's probably obvious to
most people reading this.
for rowcount in range (0, stn_count):
row_durations.append(stn_list_short[rowcount])
for colcount in range (0, stn_count):
# 3. Determine Station pairs for API query
On Wed, Jan 9, 2013 at 11:19 AM, wrote:
>stn_count = len(stn_list_short)
>for rowcount in range (0, stn_count):
> for colcount in range (0, stn_count):
> print stn_list_long[rowcount] stn_list_long[colcount]
First off, you can iterate over the list directly:
for row in st
On Tue 08 Jan 2013 07:19:59 PM EST, andydtay...@gmail.com wrote:
Hi!
I might be missing the obvious, or I may have found something more complicated
than the VBA I am used to. Could it be I need to use a maths library?
For a given list of k items I'd like to turn it into an k*k matrix of item
Hi!
I might be missing the obvious, or I may have found something more complicated
than the VBA I am used to. Could it be I need to use a maths library?
For a given list of k items I'd like to turn it into an k*k matrix of item
pairs.
List_sample = ['a', 'b', 'c']
Output:
aa ab ac
ba bb bc
c
On Dec 3, 1:38 pm, thor <[EMAIL PROTECTED]> wrote:
> >>> c = [(5, 3), (6, 8)]
> >>> [x for t in zip(*c) for x in t]
> [5, 6, 3, 8]
The zip here is superfluous.
>>> c = [(5, 3), (6, 8)]
>>> zip(*c)
[(5, 6), (3, 8)]
Unless you're -only- using it to ensure your result is the same order
as the OP...
On Dec 2, 10:09 pm, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> >>> c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
> >>> [i for (i,j) in c] + [ j for (i,j) in c]
>
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
>
>>> c = [(5, 3), (
On Dec 2, 2:09 pm, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> >>> c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
> >>> [i for (i,j) in c] + [ j for (i,j) in c]
>
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
>
One list comprehens
TP <[EMAIL PROTECTED]> writes:
> Hi everybody,
>
c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
[i for (i,j) in c] + [ j for (i,j) in c]
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
Quicker? Hard to say. Using itertools el
TP wrote:
> Hi everybody,
>
c=[(5,3), (6,8)]
>
> From c, I want to obtain a list with 5,3,6, and 8, in any order.
> I do this:
>
[i for (i,j) in c] + [ j for (i,j) in c]
> [5, 6, 3, 8]
>
> Is there a quicker way to do this?
dunno if it's faster, but less cluttered:
list(sum(c, ()))
Hi everybody,
>>> c=[(5,3), (6,8)]
>From c, I want to obtain a list with 5,3,6, and 8, in any order.
I do this:
>>> [i for (i,j) in c] + [ j for (i,j) in c]
[5, 6, 3, 8]
Is there a quicker way to do this?
Thanks
Julien
--
python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.9&1+,\
On Dec 31, 1:24 am, [EMAIL PROTECTED] wrote:
> Hi list and python gurus :-)
>
> I'm playing with somemod_pythonand web development. And in me code I
> need to do som dynamic imports.
> Right now I just do a:
>
> exec 'import '+some_modulename
>
> But it seems to easy, is there a "dark side" to doin
[EMAIL PROTECTED] schrieb:
> First of thanks to all for you, especially for the quick replys.
>
> Just need to walk the dog then I giv it a short.
Please, don't kill your dog! We're a peace-loving community here that
respects dogs, and snakes and even trolls.
SCNR,
Diez
--
http://mail.python.
First of thanks to all for you, especially for the quick replys.
Just need to walk the dog then I giv it a short.
On Dec 30, 3:57 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
>
> > Do anybody now a good howto or tutorial to this?
>
> No... what do you want covered?
Nothing, think you repl
En Sun, 30 Dec 2007 12:24:53 -0200, <[EMAIL PROTECTED]> escribi�:
> I'm playing with some mod_python and web development. And in me code I
> need to do som dynamic imports.
> Right now I just do a:
>
> exec 'import '+some_modulename
>
> But it seems to easy, is there a "dark side" to doing it this
Hallöchen!
[EMAIL PROTECTED] writes:
> I'm playing with some mod_python and web development. And in me
> code I need to do som dynamic imports. Right now I just do a:
>
> exec 'import '+some_modulename
>
> But it seems to easy, is there a "dark side" to doing it this way?
> (memory use,processin
On Dec 30, 8:24 am, [EMAIL PROTECTED] wrote:
> Hi list and python gurus :-)
>
> I'm playing with some mod_python and web development. And in me code I
> need to do som dynamic imports.
> Right now I just do a:
>
> exec 'import '+some_modulename
The correct way to do this is use the __import__ funct
Hi list and python gurus :-)
I'm playing with some mod_python and web development. And in me code I
need to do som dynamic imports.
Right now I just do a:
exec 'import '+some_modulename
But it seems to easy, is there a "dark side" to doing it this way?
(memory use,processing ,etc)
And have to I
On Sep 26, 12:25 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 25 Sep 2007 22:41:31 -0300,KenKuhlman<[EMAIL PROTECTED]>
> escribi?:
>
> > Replying to myself in case someone finds this interesting.
>
> > Anyway, I took another shot at this with a little fresher mind, and it
> > was qu
En Tue, 25 Sep 2007 22:41:31 -0300, Ken Kuhlman <[EMAIL PROTECTED]>
escribi�:
> Replying to myself in case someone finds this interesting.
>
> Anyway, I took another shot at this with a little fresher mind, and it
> was quickly obvious that I was trying to force attributes to behave
> more like
Replying to myself in case someone finds this interesting.
Anyway, I took another shot at this with a little fresher mind, and it
was quickly obvious that I was trying to force attributes to behave
more like classes. It was a small step from there to creating a
factory function to return instance
Thanks for the response! It was just the kick I needed to realize
that I was letting my frustration get the best of me and that I was
going down a dead-end. I blame the fact that I was coding on little
sleep :-)
I went with the solution of giving a naming convention to the
docstrings and relyin
En Fri, 07 Sep 2007 17:06:07 -0300, Ken Kuhlman <[EMAIL PROTECTED]>
escribi�:
> What's the best method for annotating attributes with a docstring?
> I'm looking to be able to introspect my class & get the comments back
> out.
I don't know which is the *best* method. Perhaps you might use proper
What's the best method for annotating attributes with a docstring?
I'm looking to be able to introspect my class & get the comments back
out.
The technique I'm using is a little hoaky, but works.. basically I
create subclasses of the builtin types that I want to be able to use &
then instantiate
Arthur Pemberton wrote:
> What is the best way to do data source abtraction? For example have
> different classes with the same interface, but different
> implementations.
>
> I was thinking of almost having classA as my main class, and have
> classA dynamically "absorb&q
Arthur Pemberton wrote:
> What is the best way to do data source abtraction? For example have
> different classes with the same interface, but different
> implementations.
>
> I was thinking of almost having classA as my main class, and have
> classA dynamically "absorb&q
Arthur Pemberton enlightened us with:
> What is the best way to do data source abtraction?
That depends on your data source. For files, file-like objects are an
abstraction. For databases there is PEP 249.
> I was thinking of almost having classA as my main class, and have
> classA dy
What is the best way to do data source abtraction? For example have
different classes with the same interface, but different
implementations.
I was thinking of almost having classA as my main class, and have
classA dynamically "absorb" classFood into to based on the extension
of the
hmm - but I want to store the data in memory eather than a filesystem
... it is not an issue if the program terminates - it is almost needed
while running and does not need to remember where it is ..
the dirctionary is detail = {}
will try the list() function - thanks
Tonino
--
http://mail.pyt
Am Tue, 17 May 2005 05:26:15 -0700 schrieb Tonino:
> Hi ALL,
>
> I am having a issue with a particular storage of data problem and
> wanted to know if I am going about it the wrong way.
>
> I have a list of reference numbers associated with a product and I have
> a socket that listens on a port.
Hi ALL,
I am having a issue with a particular storage of data problem and
wanted to know if I am going about it the wrong way.
I have a list of reference numbers associated with a product and I have
a socket that listens on a port. Now what happens is the client app
connects to the server - send
This is the kind of thing I meant. I think I have to get used to writing
small, light-weight classes. You inspired this variation which is a little
more verbose in the class definition, but less so in the use:
class Matcher:
def search(self, r,s):
self.value = re.search(r,s)
return
Mark Fanty wrote:
In perl, I might do (made up example just to illustrate the point):
if(/add (\d+) (\d+)/) {
do_add($1, $2);
} elsif (/mult (\d+) (\d+)/) {
do_mult($1,$2);
} elsif(/help (\w+)/) {
show_help($1);
}
or even
do_add($1,$2) if /add (\d+) (\d+)/;
do_mult($1,$2) if /mult (\d+) (\d+)
Steven Bethard <[EMAIL PROTECTED]> wrote:
> I get a bit uneasy from the repeated calls to m.group... If I was going
> to build a class around the re, I think I might lean towards something like:
>
> class ReWithMemory(object):
> def search(self, are, aline):
> self.mo = re.search(a
Alex Martelli wrote:
class ReWithMemory(object):
def search(self, are, aline):
self.mo = re.search(are, aline)
return self.mo
def group(self, n):
return self.mo.group(n)
m = ReWithMemory()
if m.search(r'add (\d+) (\d+)', line):
do_add(m.group(1), m.group(2))
elif
Mark Fanty wrote:
> No nesting, but the while is misleading since I'm not looping and this
> is a bit awkward. I don't mind a few more key strokes, but I'd like
> clarity. I wish I could do
>
> if m = re.search(r'add (\d+) (\d+)', $line):
> do_add(m.group(1), m.group(2))
> elif m = re.sear
Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> Here is a different solution...
>
> class Result:
> def set(self, value):
> self.value = value
> return value
>
> m = Result()
>
> if m.set(re.search(r'add (\d+) (\d+)', line)):
> do_add(m.value.group(1), m.value.group(2))
> e
Mark Fanty <[EMAIL PROTECTED]> wrote:
> In perl, I might do (made up example just to illustrate the point):
>
> if(/add (\d+) (\d+)/) {
>do_add($1, $2);
> } elsif (/mult (\d+) (\d+)/) {
>do_mult($1,$2);
> } elsif(/help (\w+)/) {
>show_help($1);
> }
There was a thread about this r
what about something like this?
>>> import re
>>> m = re.match(r"""(?Padd|mult) (?P\d+)
(?P\d+)""", 'add 3 5')
>>> from operator import add, mul
>>> op = {'add': add, 'mult: mul}
>>> op[m.groupdict()['operator']](int(m.groupdict()['int_1']),
int(m.groupdict()['int_2']))
8
--
http://mail.python.or
In perl, I might do (made up example just to illustrate the point):
if(/add (\d+) (\d+)/) {
do_add($1, $2);
} elsif (/mult (\d+) (\d+)/) {
do_mult($1,$2);
} elsif(/help (\w+)/) {
show_help($1);
}
or even
do_add($1,$2) if /add (\d+) (\d+)/;
do_mult($1,$2) if /mult (\d+) (\d+)/;
show_help($1
Paul Rubin wrote:
Steve Holden <[EMAIL PROTECTED]> writes:
You can read about it in Philip Eby's excellent PEP at
http://www.python.org/peps/pep-0333.html
I looked at this and I have the impression that it tries to do
something worthwhile, but I can't tell precisely what. The "rationale
and goa
Steve Holden <[EMAIL PROTECTED]> writes:
> You can read about it in Philip Eby's excellent PEP at
>
>http://www.python.org/peps/pep-0333.html
I looked at this and I have the impression that it tries to do
something worthwhile, but I can't tell precisely what. The "rationale
and goals" sectio
worzel wrote:
What is the best way to web developemnt with Python? Is there anything
close to PHP style in-page script placement that can create and use
other Python objects?
Spyce ( http://spyce.sf.net ) is what you're looking for. I
was looking exactly for the same thing as you are - a PHP w
On Sat, 8 Jan 2005 21:11:49 +0800, worzel <[EMAIL PROTECTED]> wrote:
>
> What is the best way to web developemnt with Python? Is there anything close
> to PHP style in-page script placement that can create and use other Python
> objects? I am not really interested in Zope (I believe that is more
Steve Holden wrote:
More ways than you can shake a stick at, but nowadays you should
consider using WSGI if you want your code to be portable across many
frameworks. The Web SIG worked very hard last year on defining this
gateway interface, with the intention that it should become widely
availa
worzel wrote:
What is the best way to web developemnt with Python? Is there
anything close to PHP style in-page script placement that can create
and use other Python objects? I am not really interested in Zope (I
believe that is more a CMS than anything else?) I am also looking for
something a litt
Holy Moly - there's quite a few choices out there! I like the look of
Karrigel for my immediate needs.
Looking forward to the day there is a more 'j2ee' like standard in place for
Python - looks like this is in the works.
Thanks for all the feedback guys.
"worzel" <[EMAIL PROTECTED]> wrote i
worzel wrote:
What is the best way to web developemnt with Python? Is there anything
close to PHP style in-page script placement that can create and use
other Python objects? I am not really interested in Zope (I believe that
is more a CMS than anything else?) I am also looking for something a
>
>
>
>
>
>
>
> What is
Just FYI -- the post you posted was in HTML -- you might want to avoid
this in the future. 99% of all posts to news groups are in text, not
html. Html is hard for everyone to read with normal news readers and not
usually of any extra value. It's also more of a se
Dnia Sat, 8 Jan 2005 21:11:49 +0800, worzel napisał(a):
> What is the best way to web developemnt with Python?
Hmm. :) I prefer http://cherrypy.org + http://cheetahtemplate.org/. Very
easy to learn and develop, yet powerfull.
> Is there anything close to PHP style in-page script
> placement th
worzel a écrit :
What is the best way to web developemnt with Python? Is there anything
close to PHP style in-page script placement that can create and use
other Python objects? I am not really interested in Zope (I believe that
is more a CMS than anything else?) I am also looking for something
"worzel" <[EMAIL PROTECTED]> writes:
> What is the best way to web developemnt with Python? Is there
> anything close to PHP style in-page script placement that can create
> and use other Python objects? I am not really interested in Zope (I
> believe that is more a CMS than anything else?) I am al
What is the best way
to web developemnt with Python? Is there anything close to PHP style in-page
script placement that can create and use other Python objects? I am not really
interested in Zope (I believe that is more a CMS than anything else?) I am also
looking for something a little more
64 matches
Mail list logo