Wes Turner added the comment:
* Would this make it easy/faster to also have a DefaultOrderedDict (which
can/could also be accomplished with .get(attr, []) and .setdefault ?
On May 29, 2015 2:39 PM, Eric Snow rep...@bugs.python.org wrote:
Eric Snow added the comment:
Planning on committing
Wes Turner added the comment:
* Macros could be useful.
* Would this make it easy/faster to also have a DefaultOrderedDict (which
can/could also be accomplished with .get(attr, []) and .setdefault(attr, [])?
* There may be some value in looking at
https://pypi.python.org/pypi/cyordereddict
Wes added the comment:
I'll submit this to Continuum Analytics so they know it's their issue.
On Thu, Dec 19, 2013 at 3:06 AM, Marc-Andre Lemburg
rep...@bugs.python.orgwrote:
Marc-Andre Lemburg added the comment:
Closing, since there's nothing much we can do about the problem
New submission from Wes:
Marc-Andre,
I'm on a Macbook pro OSX Mountain Lion
I've been automating virtual environment builds locally and remotely, but it
seems that when my pip install -r requirements.txt tries to run and
download.py in pip/ runs it invokes platform.py. I'm getting a user
Wes added the comment:
Marc
Thanks for getting back to me so quickly on this. I'm running an apple
version of python from the looks of it. I was running an Anaconda version
at the time I posted this script, but I just reset my $PATH variable to use
the mac factory python and still got
Wes added the comment:
Marc,
Here was the initial output:
platform.__file__
'/Users/wesmadrigal/anaconda/lib/python2.7/platform.pyc'
import sys
sys.version
'2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09) \n[GCC
4.0.1 (Apple Inc. build 5493)]'
Here is what I had when I
Wes added the comment:
I just commented out the _sys_version_parser regular expression in
anaconda/lib/python2.7/platform.py on line 1363 and replaced it with the
_sys_version_parser from /usr/lib/python2.7/platform.py and everything
worked fine.
On Wed, Dec 18, 2013 at 5:53 PM, Ned Deily rep
Wes added the comment:
The shitty part is, you pretty much need anaconda to run iPython notebook
on a mac.
On Wed, Dec 18, 2013 at 6:08 PM, Wes Madrigal wesley7...@gmail.com wrote:
I just commented out the _sys_version_parser regular expression in
anaconda/lib/python2.7/platform.py on line
Wes added the comment:
Marc,
Thanks for your help.
What I did was just copied the _sys_version_parser from the standard python
platform.py into the anaconda version of platform.py and it fixed the
issue. So it looks like Anaconda made a change to your regular expression.
Thanks for getting
Wes Turner added the comment:
http://docs.python.org/3.4/whatsnew/3.4.html#ssl
re: Backporting to Python 2.7: maybe something like:
backports.ssl (like backports.ssl_match_hostname)
https://pypi.python.org/pypi/backports/
--
nosy: +westurner
New submission from Wes Turner:
random.shuffle [1][2] could be faster.
``xrange(10,1,-1)`` is faster than ``reversed(xrange(1,10))``.
[1] http://hg.python.org/cpython/file/v3.3.2/Lib/random.py#l254
[2] http://hg.python.org/cpython/file/v2.7.5/Lib/random.py#l276
--
components: Library
Wes Turner added the comment:
Added patch to random.shuffle for trunk
--
Added file: http://bugs.python.org/file30985/random-shuffle_trunk.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18511
Wes Turner added the comment:
Added patch to random.shuffle for v2.7.5
--
keywords: +patch
Added file: http://bugs.python.org/file30984/random-shuffle_v2.7.5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18511
Wes Chow wes.c...@gmail.com added the comment:
This same bug also exists in HTTPClient, and my patch addresses that.
Addressing it in HTTPClient has a side effect of taking care of it for urllib2
as well (and all future libraries that use HTTPClient).
Even if the urllib2 patch is preferable
Wes Chow wes.c...@gmail.com added the comment:
Here's a patch for 3.2 which fixes this problem I believe. There does exist a
test case that should have produced an error, except that the last path segment
in RFC3986_BASE is only one character long. Had it been more than one character
long
Wes Chow wes.c...@gmail.com added the comment:
New patch (urlparse-9721-3.2.patch) against 3.2 which fixes the erroneous test.
--
Added file: http://bugs.python.org/file19706/urlparse-9721-3.2.patch
___
Python tracker rep...@bugs.python.org
http
Wes Chow wes.c...@gmail.com added the comment:
Patch against 2.7 (urlparse-9721-2.7.patch).
--
Added file: http://bugs.python.org/file19707/urlparse-9721-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9721
Wes Chow wes.c...@gmail.com added the comment:
Attached is a patch against 3.2 that replaces empty paths with '/' in
HTTPConnection. I do not totally understand the ; syntax in URIs, and so this
implementation may break that, as it splits urls and unsplits them if needed.
The Python docs seem
New submission from Wes McKinney wesmck...@gmail.com:
We tracked a bug originating in IPython to the Python interpreter itself, seems
to be present in 2.6.x and 2.7.x but not 3.1.x. This is on Ubuntu Linux 10.04,
does not seem to occur in OS X 10.6.
Reference: http://article.gmane.org
an answer.
Cheers,
-Wes
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 17, 11:14 am, Christian Heimes li...@cheimes.de wrote:
Wes Santee wrote:
I am very new to Python, and trying to figure out how to create an
object that has values that are accessible either by attribute name,
or by index. For example, the way os.stat() returns a stat_result
On Mar 17, 11:34 am, Bruno Desthuilliers bruno.
42.desthuilli...@websiteburo.invalid wrote:
Wes Santee a écrit :
I am very new to Python, and trying to figure out how to create an
object that has values that are accessible either by attribute name,
or by index. For example, the way
help:
http://plastex.sourceforge.net/plastex/sect0025.html
-wes
--
http://mail.python.org/mailman/listinfo/python-list
snip
NEW QUESTION if y'all are still reading:
Is there an integer increment operation in Python? I tried
using i++ but had to revert to 'i = i + 1'
i+=1
snip
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 18, 2010 at 8:18 AM, Tim Chase
python.l...@tim.thechases.com wrote:
Wes James wrote:
snip
Just to add to the list of solutions I've seen, letting the built-in csv
module do the heavy lifting:
s = ['a','b']
import csv
no_brackets = s[1:-1] # s.strip(' \t[]')
c
On Thu, Feb 18, 2010 at 12:32 PM, Wes James compte...@gmail.com wrote:
On Thu, Feb 18, 2010 at 8:18 AM, Tim Chase
python.l...@tim.thechases.com wrote:
Wes James wrote:
snip
Just to add to the list of solutions I've seen, letting the built-in csv
module do the heavy lifting:
s = ['a','b
(',')
returns
[ 'a' , 'b' ]
when I want it to return ['a','b'].
How can I do this?
thx,
-wes
--
http://mail.python.org/mailman/listinfo/python-list
When I try to join #python on irc.freenode.net it keeps saying:
You need to identify with network services to join the room #python
on irc.freenode.net.
Server Details:
Cannot join channel (+r) - you need to be identified with services
What does this mean?
thx,
-wes
--
http://mail.python.org
On Wed, Feb 17, 2010 at 4:53 PM, Wes James compte...@gmail.com wrote:
When I try to join #python on irc.freenode.net it keeps saying:
You need to identify with network services to join the room #python
on irc.freenode.net.
Server Details:
Cannot join channel (+r) - you need to be identified
On Sep 16, 3:53 pm, Irmen de Jong irmen.nos...@xs4all.nl wrote:
Tim Roberts wrote:
Wes McKinney wesmck...@gmail.com wrote:
I noticed the flag socket.MSG_WAITALL seems to have crept its way into
Python 2.5 on Windows (it's in 2.5.4, but not in 2.5.1, not sure about
intermediate releases
in the socket module.
Does anyone know more about this?
Thanks,
Wes
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 21, 2009 at 12:46 PM, SKYLAB zky...@gmail.com wrote:
Greetings..
First , my english is not good .
I heard that was written in python ( Youtube Programming Language :
PYTHON :S ) Correct ?
That's not correct ? Then youtube is PHP application ?
That's correct ; Which python web
Anyone know if there is a twit for python? I did
http://twitter.com/python, but nope on that I was looking for
twit py announcements, etc...
thx,
-wj
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 24, 2009 at 4:04 PM, Scott David Daniels
scott.dani...@acm.org wrote:
Atul. wrote:
snip
In your case, '\r' is a return (a single character), not two
characters long. I think its sad that 'C:\Thesis' doesn't cause
an error because there is no such character as '\T', but I am
On Tue, Mar 24, 2009 at 4:32 PM, Wes James compte...@gmail.com wrote:
On Tue, Mar 24, 2009 at 4:04 PM, Scott David Daniels
scott.dani...@acm.org wrote:
Atul. wrote:
snip
In your case, '\r' is a return (a single character), not two
characters long. I think its sad that 'C:\Thesis' doesn't
On Mon, Mar 2, 2009 at 2:53 PM, Rey Bango reyba...@gmail.com wrote:
Hi,
I'd like to upgrade the installed version of Python that came standard
on OS X (Leopard) with either 2.6.1 or 3.0.1. Before I stick my foot
in it, I just wanted to get a better understanding of the process.
I'd recommend
I have this line:
navs.append(A(' '+str(i+1)+'
',_href=self.action(args=request.args,vars={'_page':i,'_query':request.vars._query
or ''})))
How do I do something like this:
vars={'_page':i, if request.vars._query not None then insert this
key/value pair ('_query':request.vars._query) else
On Mon, Feb 23, 2009 at 9:35 PM, Wes James compte...@gmail.com wrote:
I have this line:
navs.append(A(' '+str(i+1)+'
',_href=self.action(args=request.args,vars={'_page':i,'_query':request.vars._query
or ''})))
How do I do something like this:
vars={'_page':i, if request.vars._query
Steven. Thx
(see my question below...)
On Mon, Feb 23, 2009 at 9:47 PM, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Mon, 23 Feb 2009 21:35:38 -0700, Wes James wrote:
I have this line:
navs.append(A(' '+str(i+1)+'
',_href=self.action(args=request.args,vars=
{'_page':i
If I read a windows registry file with a line like this:
{C15039B5-C47C-47BD-A698-A462F4148F52}=v2.0|Action=Allow|Active=TRUE|Dir=In|Protocol=6|Profile=Public|App=C:\\Program
Files\\LANDesk\\LDClient\\tmcsvc.exe|Name=LANDesk Targeted
Multicast|Edge=FALSE|
with this code:
Max,
def GeneticNextGen(self):
numsets = len(self.WtSets)
numwts= len(self.WtSets[0].Lis)
self.WtSets.sort(CompByCurrentFitness)
index_lis = []
K = 100.0
N= float(numwts)
#if RISE(slope) is too high, concentration
Bruno Ferreira wrote:
Hi,
I wrote a very simple python program to generate a sorted list of
lines from a squid access log file.
Here is a simplified version:
##
1 logfile = open (squid_access.log, r)
2 topsquid = [[0, 0, 0, 0, 0, 0, 0]]
3
4 def
) \
% (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,\
Dexterity, Inteligence, Charm, Luck)
print sql=,sql
cursor.execute(sql)
-then show the error message here
wes
--
http://mail.python.org/mailman/listinfo/python-list
Steve wrote:
I'm currently working on a little database type program is which I'm
using a dictionary to store the information. The key is a component a and
the definition is a list of parts that make up the component. My problem
is I need to list out several components, but not all, and
No, but before I signed up with them I asked if it was available
and they said yes.
wes
mbstevens wrote:
I keep chatting with the tech support people at Earthlink, asking where
the location of the Python interpreter is. They don't seem to know where
it is. They don't know if Python
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.TokenList = []
def handle_data( self,data):
data = data.strip()
if data and len(data) 0:
self.TokenList.append(data)
Andrew Robert wrote:
Hi Everyone,
I am having a problem with a class and hope you can help.
When I try to use the class listed below, I get the statement that self
is not defined.
test=TriggerMessage(data)
self is not known here; only inside the class.
var =
Andrew Robert wrote:
wes weston wrote:
Andrew Robert wrote:
Hi Everyone,
I am having a problem with a class and hope you can help.
When I try to use the class listed below, I get the statement that self
is not defined.
test=TriggerMessage(data)
self is not known here; only
flipping once before the start of the loop now.
wes
--
http://mail.python.org/mailman/listinfo/python-list
,
You just check for a fetchone return of None. list is a list
of tuples here.
...
cursor.execute( sql )
list = []
while 1:
row = cursor.fetchone()
if not row:
break
list.append(row)
...
wes
--
http://mail.python.org/mailman
.
The i'th element is gotten as mod 6 (front+i) where
6 would be the length of the list.
wes
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'm trying to come up with a good algorithm to do the following:
Given a list 'A' to be operated on, and a list 'I' of indices into 'A',
rotate the i'th elements of 'A' left or right by one position.
Here's are some examples:
A = [a, b, c, d, e, f]
I = [0, 3, 4]
rotate(A,
Dennis Lee Bieber wrote:
On Thu, 17 Mar 2005 16:45:57 GMT, wes weston [EMAIL PROTECTED] declaimed
the following in comp.lang.python:
str = INSERT INTO produkt1 (MyNumber) VALUES(%d) % (MyNumber)
cursor.execute(str)
Think you meant MyValue for the second item... However...
Try neither
) % (MyNumber)
cursor.execute(str)
wes
--
http://mail.python.org/mailman/listinfo/python-list
?
All transactions are related to an account; have
a self.TransActList in Account.
You have amount in both Withdrawl and Deposit
both derived from Transaction. If Transactions always
have an amount, why not put amount in the transactions
class? But we don't know.
wes
--
http://mail.python.org
solution to this problem :) ).
PR,
I notice there's a resource module with a
getrusage(who) that looks like it would support
a test to get what you need.
wes
--
http://mail.python.org/mailman/listinfo/python-list
/
andrea,
If you put in keywords.reverse() after getting
keywords, things may work better. Though not a good
fix, it illustrates part of the problem. If you replace
@PERMX1 you also replace part of @PERMX10.
Wouldn't it be better to read the file as lines
instead of strings?
wes
--
http
,
Might you be getting the wrong header file/tk version?
http://wiki.tcl.tk/3669 talks about it.
wes
--
http://mail.python.org/mailman/listinfo/python-list
list.sort.__doc__
'L.sort(cmpfunc=None) -- stable sort *IN PLACE*; cmpfunc(x, y) - -1, 0, 1'
Grant,
For a quick, short doc string list: help(list)
wes
--
http://mail.python.org/mailman/listinfo/python-list
) + 1
iMatrix[index] = k
The book statement of
array(typecode, initializer) does not make sence
to me how it henerates ore relaes to the org name
for the array.
Thank You
Tom
Thomas,
You can do
m = [4]
m
[4]
wes
--
http://mail.python.org/mailman/listinfo/python-list
Is it basic that indexes from 1 vs. 0? 'just about
completely forgotten basic.
wes
Thomas Bunce wrote:
Tryed it and this is what I got (I did go to the web sight)
tom(h=500)$ /tmp/501/Cleanup\ At\ Startup/ptesting-128981347.87.py.command; exit
Input the maximu number of tvalue: 114
Traceback (most
the pieces you use most
often.
wes
--
http://mail.python.org/mailman/listinfo/python-list
sence to me...
Amir
Amir,
import tkSimpleDialog
ch = tkSimpleDialog.askstring(,ch?)
wes
--
http://mail.python.org/mailman/listinfo/python-list
. You
could do:
def mycompare(s1,s2):
#return -1 to put s1's at front; 1 to put s1's at back; 0 for a tie
#if s1== and s2: return 1
lines.sort(mycompare)
wes
--
http://mail.python.org/mailman/listinfo/python-list
64 matches
Mail list logo