ird parties.
I started a major project about a year ago with PyProtocols. About half
way through, RuleDispatch came out, and now all new additions to the
project use RuleDispatch instead.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
fine your own key function:
def my_key(x):
return x.split("~")[1]
lines.sort(key=my_key)
The key function is faster because you only have to do the
split("~")[1] once for each line, whereas it will be done many times
for each line if you use a comparison function.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
ew 0.9 branch uses a plugin system for some of the extra
functionality, so you don't even have to install all the things it's
capable of doing.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
ut is that really the best way?
>
If it is just a single standalone script, then yeah, do it that way.
Once your program becomes a few files though, you might want a separate
"test" file that runs doctest.testmod on each of them.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
p", zipBase + "\\" + zip]).wait()
>
Ouch... Is there any reason that you're using subprocess+'unzip', as
opposed to using the 'zipfile' module from the standard library?
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
y one manually.
>
> For those of you who work in C++, where do you go to discuss it
> online? I'm interested in any newsgroups, mailing lists, or web
> boards you can recommend.
>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
/webtoolkit/
Or its python counterpart, pyjamas?
http://code.google.com/p/pyjamas/
...
jay graves
--
http://mail.python.org/mailman/listinfo/python-list
instance).
> > What I need to do is very simple GUI automation : moving the
> > mouse cursor to and from specified screen coordinates, clicking, etc.
> > Thanks a lot.
>
> For Windows, try pyWinAutohttp://pywinauto.openqa.org/
dogtail is another
http://people.redhat.com/zc
z
> bal
>
If it is XML why not use ElementTree or some other XML DOM library?
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
27;t comment on how it stacks up against Perl but I've pointed to
Tim Golden's collection several times. Lots of good stuff there.
http://tgolden.sc.sabren.com/python/index.html
...
Jay
--
http://mail.python.org/mailman/listinfo/python-list
alues in column 'C'
count of unique combinations of columns 'A' and 'B'
count of unique combinations of columns 'A' and 'C'
count of unique combinations of columns 'B' and 'C'
in all cases, sum(D) and avg(E)
Since I need 'C
mirror.py script for
inspiration.
It should be in your Tools/scripts/ subdirectory of your Python
installation.
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 10, 8:57 am, royG <[EMAIL PROTECTED]> wrote:
> i wrote a function to parse a given directory and make a sorted list
> of files with .txt,.doc extensions .it works,but i want to know if it
> is too bloated..can this be rewritten in more efficient manner?
Try the 'gl
lob(path) ]
> lst.sort()
> return lst
>
Why the 'no-op' list comprehension? Typo?
...
Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 11, 12:21 am, royG <[EMAIL PROTECTED]> wrote:
> On Mar 10, 8:03 pm, Tim Chase wrote:
> in the version using glob()
>
> >path = os.path.normpath(os.path.join(folder, '*.txt'))
> >lst = glob.glob(path)
>
> is it possible to check for more than one file extension? here i will
> have to create
Is there a nice cross-platform way to figure out the Right (tm) place to
store configuration files and other data?
Jay
--
http://mail.python.org/mailman/listinfo/python-list
I'm attending Pycon this year and for the first time I have to pay for
myself. (All training/conference budgets have been zeroed out at my
company.)
I would like to take the cheaper option by staying at the Crowne Plaza
but as I understand it, the part of the conference I'll be attending
will be
On Feb 11, 9:13 am, jay graves wrote:
> I'm attending Pycon this year and for the first time I have to pay for
> myself. (All training/conference budgets have been zeroed out at my
> company.)
>
> I would like to take the cheaper option by staying at the Crowne Plaza
>
1) time for 50 passes = 6.00515
This machine benchmarks at 83261.8 pystones/second
I tried many times, and get the same result.
Why optimization mode is slower than normal mode?
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
indows. I'm hoping the core python library has
> a library for this. Note that I'll be using Python 3.0.
>
You can get Wget for Windows here:
http://gnuwin32.sourceforge.net/packages/wget.htm
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 11, 7:06 am, Luis M. González <[EMAIL PROTECTED]> wrote:
> On Dec 10, 3:42 pm, cm_gui <[EMAIL PROTECTED]> wrote:
>
>
>
> >http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-...
>
> > I fully agree with Krzysztof Kowalczyk .
> > Can't they build a faster VM for Python since
Any special reasons?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
on, and platform variations are common.
>
> So if your underlying C implementation of strftime() supports "%e", then
> Python will. My guess is that the same applies to time.strftime as it does
> to datetime.strftime
>
> The docs list ones that are fairly cross-platform. However, it would seem
> that not all platforms support "%e"
>
>
> -tkc
>
>
> [1]
> http://docs.python.org/library/datetime.html#module-datetime
>
>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
init__.py file (it doesn't matter if it's empty) in the
directory to turn it into a package.
http://www.python.org/doc/2.5.2/tut/node8.html#SECTION00840
HTH.
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 7, 8:47 pm, Raymond Hettinger wrote:
> The existing groupby() itertool works great when every element in a
> group has the same key, but it is not so handy when groups are
> determined by boundary conditions.
>
> For edge-triggered events, we need to convert a boundary-event
> predicate to
On Apr 1, 2:35 am, daku9...@gmail.com wrote:
> On Mar 31, 6:47 pm, "Rhodri James"
> wrote:
>
> > What you're doing (pace error checking) seems fine for the data
> > structures that you're using. I'm not entirely clear what your usage
> > pattern for "dip" and "dir" is once you've got them, so I c
On Apr 1, 11:05 am, jay logan wrote:
> On Apr 1, 2:35 am, daku9...@gmail.com wrote:
>
>
>
> > On Mar 31, 6:47 pm, "Rhodri James"
> > wrote:
>
> > > What you're doing (pace error checking) seems fine for the data
> > > structure
On May 15, 3:47 pm, [EMAIL PROTECTED] wrote:
> I'm cleaning up some old code, and want to see what orphan
> functions might be sitting around.
>
> Is there a static call tree analyzer for python?
How about
http://pycallgraph.slowchop.com/
...
Jay Graves
--
http://mail.python.org
.
use the 'pickle' module.
http://docs.python.org/lib/module-pickle.html
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
On May 16, 3:24 pm, globalrev <[EMAIL PROTECTED]> wrote:
> On 16 Maj, 21:22, jay graves <[EMAIL PROTECTED]> wrote:
> > On May 16, 2:17 pm, globalrev <[EMAIL PROTECTED]> wrote:
> > > i extract info from one file and put it into a dictionary.
> > > i wa
rogramming Collective Intelligence" by Toby Segaran is
great and has examples of clustering algorithms written in Python.
http://www.amazon.com/Programming-Collective-Intelligence-Building-Applications/dp/0596529325/
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
nt want to iterate the first
> row...how do i start at the second?
How about this?
mov = open(afile)
first = mov.next()
# check first for ':' and do whatever you need to do
# including the 'y' processing from below if required
for line in mov:
do y
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
On May 29, 4:30 pm, Nikhil <[EMAIL PROTECTED]> wrote:
> or a string iterable ? How can I do that. I have lots of '\r\n'
> characters in the string which I think can be easier if it were made
> into a list and I can easily see if the required value (its a numeral)
> is present in it or not after som
nerator expression instead of a list comprehension to avoid building
and throwing away a list.
"\n".join(str(o) for o in args)
http://www.python.org/dev/peps/pep-0289/
Very unlikely to yield a material time difference in this case but
cleaner IMO.
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
nd contrast, I looked up the 'sum' built in and saw that
it used the iterator protocol, (PyObject_GetIter). I assume that the
other similar functions (min,max, etc) would do the same.
Thanks for setting me straight.
...
Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 3, 1:44 pm, tmallen <[EMAIL PROTECTED]> wrote:
> Is there a way to pick apart this text without resorting to regular
> expressions?
>
> p {
> color: black;
>
> }
>
> p -> element
> color -> property
> black -> value
http://code.google.com/p/cssutils/
--
http://mail.python.org/mailman/l
on Windows natively?
Get rid of the 'posix' check and use os.path.join to create
'tempfileName' and see if it works.
HTH.
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
hibits the behavior without the rest of your program?
...
Jay
--
http://mail.python.org/mailman/listinfo/python-list
I'm really at a loss.
Sorry.
...
Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 11, 2:25 pm, geoffbache <[EMAIL PROTECTED]> wrote:
> Anyone have any better ideas?
How about ExeMaker?
http://effbot.org/zone/exemaker.htm
I have not used it but it seems to do what you want.
...
Jay
--
http://mail.python.org/mailman/listinfo/python-list
r("Content-Length", str(fs[6]))# <--
obviously, this is not the same with len(f.read()) in windows.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
r of python:
>>> a = 10
>>> b = 10
>>> a is b
False
>>> a == b
True
>>> a = 5
>>> b = 5
>>> a is b
True
>>> a == b
True
>>>
which is caused by small object cache mechanism.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
he updates are inserted into one transaction and committed
> as one, it is substantially faster.
In addition, if this is a one time conversion, look into using the
bulk import functions. (.import FILE TABLE)
Since you are coming from another database you know your constraints
are satisf
ror:
> from svn import core as svn_core
> ImportError: No module named svn
> Best regards
I believe that it is the python binding provided by Subversion.
You didn't say what platform you are on or what version of SVN you are
using so I can't point you any closer than:
http://su
you go about running a Python app as a Windows
> service without SRVANY?
I have used CherryPy sucessfully as a windows service.
You can probably glean what you need from.
http://tools.cherrypy.org/wiki/WindowsService
HTH.
...
Jay Graves
--
http://mail.python.org/mailman/listinfo/python-list
ntation it should. But catching an exception
> can't be the standard way to stop iterating right?
>
you can use for loop:
for line in movie_iter:
...
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
te port, the program works.
But if the first element of the tuple is 's', the program doesn't work.
Is it possible to read and write the same socket in different threads?
Thanks in advance.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Aug 23, 2008 at 1:58 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Sat, 23 Aug 2008 01:47:23 +0800, Leo Jay <[EMAIL PROTECTED]> wrote:
>>
>> I'd like to read and write the same socket in different threads.
>> one thread is only used to read
gt; ','.join(string.ascii_lowercase)
'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'
>>>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
this is not an accepted
> and pythonic way of doing things then please let me know... and I'll
> stop!
>
how about this one:
>>> h = { "1" : "a\r", "2" : "b\n" }
>>> dict((k, h[k].strip()) for k in h)
{'1': 'a', '2': 'b'}
>>>
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 2, 1:02 pm, cnb <[EMAIL PROTECTED]> wrote:
> over 17000 files...
>
> netflixprize.
http://wiki.python.org/moin/NetflixPrizeBOF
specifically:
http://pyflix.python-hosting.com/
--
http://mail.python.org/mailman/listinfo/python-list
would be Perl.
A lot of it of course comes down to one's definitions of strong/weak,
but general consensus (at least around c.l.p.) is that Python is a
strongly typed language.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
h it, you should look at the 2.5
branch of the CPython code, as the new AST is supposed to make it
*much* easier to experiment with changes to the language.
Good luck!
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
hon
code. (Of course, adaption would result in the same issue, but I
*think* more people would be willing to use adaption, as it doesn't
break duck typing).
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
with a Java/C++ mindset. We'll have to do
what we can to get you out of that :)
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
ke origin[1] and 'width' are both tuples. Substraction is
not defined on tuples. That's what the error message is saying at
least:
"TypeError: unsupported operand type(s) for -:" -This means that the
'-' operator received some bad types, types it doesn
dibly easy
to get into, that many people think they fully understand it after a
few days use.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
ot; or maybe I'm just imagining that.
Also Mark Pilgrim's diveintomark.org blog
(http://diveintomark.org/archives/rooms/) has categories that are
reminiscent of the list. I think this was my first exposure to it.
HTH.
...
jay graves
--
http://mail.python.org/mailman/listinfo/python-list
I just downloaded, built, and installed the new 2.5 alpha on OS X 10.3,
and it seems that the new 'functional' didn't get installed.
I know that it got built (done from the 2.5 source directory):
Jay-Computer:~/Desktop/Python-2.5a1 jayparlar$ find . -iname functional*
./build/l
On Apr 6, 2006, at 3:25 PM, Jay Parlar wrote:
> I just downloaded, built, and installed the new 2.5 alpha on OS X
> 10.3, and it seems that the new 'functional' didn't get installed.
>
> I know that it got built (done from the 2.5 source directory):
>
> Ja
will probably make me choose it over Perl. :)
>
> Thanks in advance. :)
Well, there's always the 'email' module, part of the standard library:
http://docs.python.org/lib/module-email.html
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
Jay wrote:
> Is their any way of setting wear the Python Shell window appears on the
> screen when I run my program?
>
> I am testing a full screen program with no Window Frame on a comp with
> 2 monitors and I have to keep pressing the Key to bring the
> Shell to the front
> find the errand CMD prompt and move it.
errand -> errant
--
http://mail.python.org/mailman/listinfo/python-list
C and Pascal2C translators in the past. Would like to see
> how
> well these
>work with Python.
>
> Thanks in advance:
You want this: http://shed-skin.blogspot.com/ It can only do a subset
of Python, but it does generate C++ code, and it can see some big
speedups.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
ven easier (if you only want to replace blank spaces, and not all
whitespace):
string = 'D c a V e r " = d w o r d : 0 0 0 0 0 6 4 0'
string.replace(" ", "")
Note to the original poster: It's a *bad* idea to call a variable
'string', as there's already a module in the standard library called
'string'.
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
import time, sleep
>
>
Your problem is that the 'print' statement is sending the text to
sys.stdout, and sys.stdout is buffered.
There are other ways to do this, but try this:
from time import time, sleep
import sys
st = time()
print 'Start: %f,'% st,
sys.stdout.flush()
sleep(10)
sp = time()
print 'Stop: %f, Duration: %f' % (sp, (st-sp))
Jay P.
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 14, 2006, at 9:44 AM, Philippe Martin wrote:
> Thanks,
>
> It's a pretty big structure: painfull to pass each item as a param.
>
> Regards,
>
> Philippe
>
Maybe this can do something for you?
http://pyconstruct.sourceforge.net/
Jay P.
--
http://mai
Hi all,
I'd like to know how do you guys find out what's happening in your
code if the process seems not work.
In java, I will use jstack to check stacks of threads and lock status.
But I don't know how to do it in python.
--
Best Regards,
Leo Jay
--
http://mail.python.org/m
gt; dont know how to catch them.
>>
> The files and subfolders of Python are all installed into a single
> folder, for example C:\Python26, and none into the system folder or
> other places, if you are worried about that.
>
I don't think so. At least, the pythonXX.d
ult of
'aaa'.encode('base64')
has a '\n' at the end, but the other method doesn't.
Why the inconsistent?
Thanks.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
3-6
d 15-20
e 18-23
And here is what I need for an output:
part name location
c.a.b3-10
d.e 15-23
I've tried various methods, which all fail. Does anyone have an idea
how to do this?
Thank you very much!
Jay
--
http://mail.python.o
Hello,
I posted in regard to this in the past but it didn't go very far, no ones
fault, but I'm again atempting to make this work and could use some help.
I would like to use libraw.dll (http://www.libraw.org/ version 0.10) from
python and can access all the functions fine and produce images but
?
Alternatively I could also write a new function in libraw that can access
this struct and be exposed to ctypes.
jt
On Thu, Sep 23, 2010 at 12:28 AM, Simon Brunning
wrote:
> On 22 September 2010 21:13, jay thompson
> wrote:
> > Hello,
> >
> > I posted in regard to this
As nice as it would be to use 64bit offsets I am instead mmapping the file
in 1GB chunks and getting the results I need. I would still be interested in
a 64bit solution though.
jt
On Wed, Oct 6, 2010 at 2:41 PM, jay thompson wrote:
> Hello everyone,
>
> I'm trying to extract so
Hello everyone,
I'm trying to extract some data from a large memory mapped file (the largest
is ~30GB) with re.finditer() and re.start(). Pythons regular expression
module is great but the size of re.start() is 32bits (signed so I can really
only address 2GB). I was wondering if any here had some
us. What we are having to manage is us." ...Bill Ballantine,
marine biologist.
On 2010-10-07 8:42 AM, "MRAB" wrote:
On 06/10/2010 22:41, jay thompson wrote:
>
> Hello everyone,
>
> I'm trying to extract some data fro...
I would've thought that a 64-bit ver
On Wednesday, March 29, 2017 at 10:28:58 AM UTC-7, eryk sun wrote:
> On Wed, Mar 29, 2017 at 4:06 PM, wrote:
> > I wrote a Python script, which executed as intended on Linux and
> > from cmd.exe on Windows. Then, I ran it from the PowerShell
> >command line, all print statements added ^@ after e
On Wednesday, March 29, 2017 at 11:20:45 AM UTC-7, eryk sun wrote:
> On Wed, Mar 29, 2017 at 5:42 PM, Jay Braun wrote:
> >
> > I'm not using ISE. I'm using a pre-edited script, and running it with the
> > python command.
> >
> > Consider the followi
I hear people say it like the plural of "panda", and others as "panduss". Is
there a correct way?
j
--
https://mail.python.org/mailman/listinfo/python-list
On 12-01-2005 03:06, in article
[EMAIL PROTECTED],
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> python.org
"Python - why settle for snake oil when you can have the whole snake?"
Greetz
--
http://mail.python.org/mailman/listinfo/python-list
r package *is* and does, at the top of all such
announcements?
Cheers,
-- jra
--
Jay R. Ashworth[EMAIL PROTECTED]
Designer Baylink RFC 2100
Ashworth & AssociatesThe Things I Think
se:
main(sys.argv[1], sys.argv[2])
The SVNLOOK_PATH is not working and python says its null when run as SVN
hook-script. Do I need to load the os environment variable? How do i pass
the value of 'which svnlook' to SVNLOOK_PATH variable.
Thanks for your help.
Jay
--
http://mail.python.org/mailman/listinfo/python-list
am/project/xlrd.py", line 6, in
mySpreadsheet = xlrd.open_workbook(open(sys.argv[1]))
AttributeError: 'module' object has no attribute 'open_workbook'
Thanks,
Jay
--
http://mail.python.org/mailman/listinfo/python-list
0]*
This is the content of my test.xls:
thisislineone 343
thisislinetwo 344
thisislinethree 345
How do i remove the bold part of the output (*[u'*. *'* and *.0]* and store
the output in a 2 dimensional array?
Many thanks.
PythonNewbie,
Jay
--
http://mail.python.org/mailman/listinfo/python-list
eex",215
Please help me parse the csv file and run chown $csvfile_secondcolumn
$csvfile_firstcolumn.
Here's how i want to run it.
./parsecsv.py test.csv
Many thanks.
Jay
--
http://mail.python.org/mailman/listinfo/python-list
te2prod.py", line 12, in ?
sys.exit('file %s, line %d: %s' % (filename, reader.line_num, e))
AttributeError: '_csv.reader' object has no attribute 'line_num'
On Thu, Dec 4, 2008 at 2:25 AM, Jay Jesus Amorin <[EMAIL PROTECTED]>wrote:
> Hi all,
>
&
equired
Please help I'm a complete newbie to python.
Many thanks.
Jay
On Thu, Dec 4, 2008 at 4:32 AM, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
> MRAB wrote:
>
>> Jay Jesus Amorin wrote:
>>
>>> This is how i do it, but it runs with error. Kindl
ultiple times.
Even though I get that error, the python still installs, but when I open the
webui-user.bat file in the stable diffusion folder, it opens up the command
center and says that there's no module named pip.
Please advise on how to fix this problem.
Thank you,
Jay Cadet
301 - 388 of 388 matches
Mail list logo