Ho Yeung Lee wrote:
> i use window subsystem ubuntu
> and install python 3 and tensorflow
>
> then when try deep learning
>
> https://www.tensorflow.org/tutorials/wide_and_deep
>
> got error when urlretrieve local directory in ubuntu in window
>
> tried urllib3 still have error
>
> import tem
Robin Becker wrote:
> Is there a way to get the same sequences of random numbers in python 2.7
> and python >= 3.3?
>
> I notice that this simple script produces different values in python 2.7
> and >=3.3
>
> C:\code\hg-repos\reportlab>cat s.py
> import sys, random
> print(sys.version)
> random.
Larry Martell wrote:
> I have a list of dicts and one item of the dict is a date in m/d/Y
> format. I want to sort by that. I tried this:
>
> sorted(data['trends'], key=lambda k:
> datetime.strptime(k['date_time'],'%m/%d/%Y'))
>
> But that fails with:
>
> Exception Type: AttributeError at
> /re
r: I understand that sanity, mutable global state and threads are
unlikely bedfellows and so promise never to try anything like this in
production code).
Cheers,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
r: I understand that sanity, mutable global state and threads are
unlikely bedfellows and so promise never to try anything like this in
production code).
Cheers,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
Anthony Papillion wrote:
> I'm trying to figure out why the following statements evaluate the way
> they do and I'm not grasping it for some reason. I'm hoping someone can
> help me.
>
> 40+2 is 42 #evaluates to True
> But
> 2**32 is 2**32 #evaluates to False
>
> This is an example taken from a
ypper python
>
> It installs things in /usr/lib and /usr/lib64, but nothing in
> /usr/bin. So it installs libraries, but not programs.
>
>
> By the way: I am of-course most interested to fix my system, but I
> would not mind to have python compiled also, so I (can) work with the
Nagy László Zsolt wrote:
> Today I have tried to register and upload a new package by executing
>
> setup.py register
>
>
> I was asked if I want to save the creditentials in a .pypirc file and I
> answered yes.
>
> Next I wanted to run
>
> setup.py upload
>
> and I got this error:
>
>
> T
paul.hermeneu...@gmail.com wrote:
> - I downloaded and installed Python 3.5 64-bit onto a Windows 7 64-bit
> machine. - Using `pip install virtualenv` worked fine.
> - Now, it is time to create a virtualenv, but it is not working fine.
> - I had to add Python 3.5 to the PATH.
> - Any suggestions?
consider the getheader method to check for a Content- Length
>> header.
>>
>> Hope that helps,
>>
>> Kev
>
> Kev, did you mean?
>
> import urllib.request
>
> url = 'http://radio.hrt.hr/prvi-program/aod/download/118467/'
> site
page
content, or you could consider the getheader method to check for a Content-
Length header.
Hope that helps,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
r list too:
https://mail.python.org/mailman/listinfo/tutor
Good luck!
Kev
--
https://mail.python.org/mailman/listinfo/python-list
e included but you should
## generate your own.
## If left blank the default included cert/key will be used
#certfile=/etc/apache2/ssl/server.crt
#keyfile=/etc/apache2/ssl/server.key
certfile=
keyfile=
So I think you need to start by examining the config file on your server.
Good luck,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
ng. Apparently the user module has
> no meaning, but there is a users module? I guess I'll need to keep
> patching reportlab when GAE users find these glitches.
For what it's worth, we use reportlab on GAE to generate a simple pdf
and the above error is the only one that I've encountered. For us it was
enough to trap the ImportError.
Thanks for all your work on reportlab,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
. Cordialement.
Essayez pyt...@aful.org - python-list en francais si vous ne peut pas ecrire
en anglais.
(et excusez ma francais pauvre, s'il vous plait)
Kev
--
https://mail.python.org/mailman/listinfo/python-list
trib['VenueName']]
>
-------
> AttributeErrorTraceback (most recent call
> last) in ()
> > 1 names = [p.text for p in root.Track.attrib['Ven
))
> OSError: [WinError 10022] An invalid argument was supplied
Hello,
According to
http://stackoverflow.com/questions/15638214/socket-error-invalid-argument-supplied,
the client socket doesn't have an address at time
when you call s.getsocketname. This raises an exception on Windows.
Removing the 'Address before sending' line will prevent the error.
As you're using Python3, you'll find that passing strings to s.sendto raises
a TypeError; you'll need to encode the strings as bytes.
Hope that helps,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
ent" returns
https://developers.google.com/api-client-library/python/apis/mapsengine/v1
as the first result...
HTH
Kev
--
https://mail.python.org/mailman/listinfo/python-list
le-proxy githubpage lists a twitter account for support
contact - http://twitter.com/labnol - so you could try asking there for more
help. Also check the docs for webapp2 and and Google App Engine
(http://developers.google.com/appengine).
Have fun,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
ug=True)
Are you sure that there's nothing in your code or environment that could be
causing the authentication challenge?
Cheers,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> On 4/28/2014 2:33 AM, Kev Dwyer wrote:
>
>> Hello Terry,
>>
>> Regarding your second point, my mistake in not checking the link:
>> I'd seen a similar one elsewhere and assumed they were the same.
>>
>> This link should w
Terry Reedy wrote:
> On 4/27/2014 6:40 AM, Kev Dwyer wrote:
>> Igor Korot wrote:
>>
>>> Hi, ALL,
>>> I need to perform a subj.
>>> Looking at the Google I found following thread with explanation:
>>>
>>> http://stackoverflow.com/qu
http://stackoverflow.com/questions/19709026/how-can-i-list-all-available-
windows-locales-in-python-console
https://mail.python.org/pipermail/python-list/2009-February/525427.html
Cheers,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
u'http://bl.ocks.org/mbostock/9234731', u'date': u'dateplaceholder',
u'title': u'titleplaceholder'}, {u'url':
u'http://bl.ocks.org/mbostock/9232962', u'date': u'dateplaceholder',
u'title': u't
access the data by adding the proprties back to the model or
(maybe) by loading a different model definition in the remote shell, but
this is not something that you would want to rely on in a production
environment.
tl,dr: it's ok to add new properties to you models, but don't remove or
rename properties.
Hope that helps,
Kev
--
https://mail.python.org/mailman/listinfo/python-list
eneskri...@gmail.com wrote:
> So, I'm having this radio button issue in tkinter:
> First I assign the IntVar:
> var = []
> while i < self.something:
> var.append(IntVar())
> i += 2
> Later on I use them, but I get this error:
> for r in var:
> helper = var[r].get()
> self.something
Joel Goldstick wrote:
> On Fri, Jul 12, 2013 at 3:12 PM, Skip Montanaro wrote:
>
>> > I can't help you. I'm astonished. Trying to imagine the work
>> environment
>> > where this technology would be necessary
>>
>> http://www.iseriespython.com/app/ispMain.py/Start?job=Home
>>
>> Skip
>>
> I rem
list on Google Groups
(https://groups.google.com/forum/?fromgroups#!forum/splinter-users).
I expect they might like to see some sopecifics on the BSOD too.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
ot unheard of to call list() on iterables, perhaps the
library designers should either optimise the __len__() method, or document
the performance implications of calling list on the queryset?
Anyway, thanks for this thought-provoking post.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
1 test failed:
test_urlwithfrag
The bug has been fixed - see http://bugs.python.org/issue16969
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
behaviour can be influenced by the
value of the environmental variable JAVA_HOME
(http://www.jython.org/docs/using/cmdline.html#environment-variables).
Have you checked that $JAVA_HOME is set to a suitable value fo
Steve Petrie wrote:
> On Thursday, November 22, 2012 1:42:42 AM UTC-5, Kev Dwyer wrote:
>> Steve Petrie wrote:
>>
>>
>>
>> > On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:
>>
>> >> Hello List,
>>
>> >&g
t.
Hello Dieter
Thanks for your comment. I certainly want a lightweight solution so
CGI or one of the micro-frameworks are what I am considering.
Cheers
Kev
--
http://mail.python.org/mailman/listinfo/python-list
Steve Petrie wrote:
> On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:
>> Hello List,
>>
>>
>>
>> I have to build a simple web service which will:
>>
>>
>>
>> - receive queries from our other servers
>
od
WSDL support.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
joomla cms.
This is only speculation, as I don't know exactly how your web page has been
"hacked", but if your page somehow exposes a database connection, and the
hack involves changing the contents of the database then you should read up
on SQL injection attacks and how to prevent them.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
gmspro wrote:
> I tried this:
> CFLAG=-g ./configure --prefix=/home/user/localdir
>
> But during debugging python i get:
>
> (gdb)next
> (gdb)print variable
> (gdb)$1 =
>
> What should i do?
> How can i get the value of a variable instead of ?
>
> Thanks.
Maybe try: http://docs.python.org/
gmspro wrote:
> We know python is written in C.
> C is not portable.
> So how does python work on a webserver like apache/httpd for a python
> website? How does the intermediate language communicate with server
> without compiling python code? Or how does python interpreted code work
> with webser
kevon wang wrote:
> I want to find a plugin of django what it can custom fields in the form.
> The functions include custom fields in web page and create the fields in
> database.
>
You might have more luck getting an answer to this question on the django
list (django-us...@googlegroups.com if
sajuptpm wrote:
> Hi,
>
> Yes i saw profile module,
> I think i have to do function call via
>
> cProfile.run('foo()')
>
> I know, we can debug this way.
>
> But, i need a fixed logging system and want to use it in production.
> I think, we can't permanently include profile's debugging c
John Gordon wrote:
> Recently I was been bitten by some stupid errors in my code, and I'm
> wondering if there's a simple way to catch them.
>
Pyflakes is another static checker that can catch these sorts of errors.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
nr=0)
>
br.form['kw']='http://v.163.com/movie/2008/10/O/Q/M7F57SUCS_M7F5R3DOQ.html'
> print br.submit().read()
>
> why??
Hello,
I think the page uses javascript to submit the form, so mechanize may not
work with it directly.
See
http://stackoverflow.com/questi
named "x". When
the attribute c.x is requested, Python finds an attribute "x" in the
instance and returns it; the method "x" is found in the class, but the
attribute lookup does not proceed this far.
Try looking at C.__dict__ and c.__dict__ in the interpreter to see how the
attributes are stored.
See also
http://docs.python.org/reference/datamodel.html#customizing-attribute-access
Cheers
Kev
--
http://mail.python.org/mailman/listinfo/python-list
the myscript code.
N.B. when you import/reload your script the interpreter will immediately
execute any code that is not enclosed in a function or class definition.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
cessing module, so I won't speculate
about bugs ;) however I can tell you that your code works with error on my
machine:
kev@pluto:~> python mtest.py
[DEBUG/MainProcess] created semlock with handle 140252275732480
[DEBUG/MainProcess] created semlock with handle 140252275728384
[DEBUG/Main
When I installed Python's setuptools I absent mindedly tacked on a --
prefix path I had been using on another machine:
sh setuptools-0.6c11-py2.7.egg --prefix=/opt/python2.7.2
Now after this blunder when I try to install pip I get the following
error:
[root@kkdev src]# easy_install pip
Searching
Peter G. Marczis wrote:
Hello Peter,
Welcome to the list.
Have you tried calling statvfs from a C program? What happens if you do?
Best regards,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
/tr[@valign='top']//td")
>
> i want to know why the "//" make output different?
This is an XPATH question, not really Python-related.
See http://www.w3schools.com/xpath/xpath_syntax.asp
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
Hello Yingjie,
This isn't exactly handy, but...
>>> import itertools
>>> a = ('a', 'b')
>>> b = (1, 2)
>>> [x + str(y) for (x, y) in itertools.product(*(a, b))]
['a1', 'a2', 'b1', 'b2']
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
ou
can either use a web framework written in Python (Django is the most
popular).
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
nstalled there, and this is causing problems for your more modern
Python install.
You change change Windows environment variables using the instructions
here: http://support.microsoft.com/kb/310519. Changing the
environment variable is the documented solution for this - see
http://bugs.python.org
ons/4476764/pywin32-support-trouble-while-building-syntax-error
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
connection to make a PUT or GET request:
conn.request('PUT', url, body, headers)
Please read the documentation for the httplib module, and perhaps some basic
material on how HTTP requests work.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
port=None, strict=None)
The constructor doesn't take a complete URL as an argument.
Also, shouldn't you be using httplib.HTTPConnection? The docs
state that httplib.HTTP is for backward compatibility only.
Kev
--
http://mail.python.org/mailman/listinfo/python-list
actory
object instead, but at least it isn't cluttering up your business logic
any longer. Trying to write an OO-style program without using any if
statements in the business logic can be an interesting exercise, albeit
not a terribly realistic one.
Apologies if your choice of a method fo
On Sun, 07 Nov 2010 09:01:42 -0800, rustom wrote:
> On Nov 7, 7:09 pm, Kev Dwyer wrote:
>> On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote:
>> > There are a large number of test frameworks in/for python. Apart
>> > from what comes builtin with python t
escriptions? 'Test framework' means widely different things in
> different contexts. Any explanations/tutorials around?
>
> [Disclaimer: I was educated a couple of decades before the TDD rage]
Hello,
You could start with http://pycheesecake.org/wiki/PythonTestingToolsTaxo
On Wed, 03 Nov 2010 11:17:32 +, Steven D'Aprano wrote:
> On Wed, 03 Nov 2010 08:02:29 +, John Bond wrote:
>
>> Hope this isn't too O/T - I was just wondering how people read/send to
>> this mailing list, eg. normal email client, gmane, some other software
>> or online service?
>
> Usenet
helpful, but it's late here.
Cheers (apologetically),
Kev
--
http://mail.python.org/mailman/listinfo/python-list
ows (or cross-platform
code) I think you need to bite the bullet and get access to a Windows
(virtual) machine.
Cheers,
Kev
PS - You might be able to get away with using an emulator like WINE,
but given the ubiquity of Windows in business/home computing I think
you're better of testing on the real thing.
--
http://mail.python.org/mailman/listinfo/python-list
ndler will be created on the root logger and your logger
inherits the StreamHandler. So you can avoid the "No handlers..."
warning by calling logging.basicConfig() before your program
does any logging.
I don't know why getLogger() doesn't so something similar when
it's c
On Mon, 16 Aug 2010 08:17:20 -0700, Steve Ferg wrote:
> In this little script:
>
>
> import pdb
> pdb.set_trace()
> def main():
> xm = 123
> print("Hello,world!")
> main()
>
>
> When I run this, I use pdb to step through it until I reach the point in
> main() where the xm varia
s may be the issue raised in bug 5215
(http://bugs.python.org/issue5215), committed in r71006. Displaying a
changed variable using the "p" command reverts the variable to its
previous value.
If you try
pdb.set_trace()
def main():
xm = 123
print("Hello,world!")
gnificance of your queries compared with the duration
of the builds.
So I think the upshot is don't worry about it, or if you must,
accept that you're worrying more about aesthetics than anything else
(not that aesthetics aren't important).
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 14 Mar 2010 14:40:34 -0700, _wolf wrote:
>> There's a recent thread about this on the python-dev list,
>
> pointers? i searched but didn’t find anything.
http://mail.python.org/pipermail/python-dev/2010-March/098354.html
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 14 Mar 2010 08:57:36 -0700, _wolf wrote:
>
> how can i use re2 from Python?
>
Hello Wolf,
There's a recent thread about this on the python-dev list,
Unfortunately it seems to suggest that there are no Python
bindings at present.
Cheers,
Kev
--
http://mail.pyth
recation of dbi (though "import dbi" will
provide a useful warning message).
Pyodbc is a possible alternative.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
ction
in your item (2)).
Is it on the python path used by the webserver? See for example the last post
at
http://forums.devshed.com/apache-development-15/installing-python-on-apache-42184.html
which shows how you can set up the path.
Cheers,
Kev
--
http://mail.python.org/mailman/lis
llo Pablo,
The pep8 package (http://pypi.python.org/pypi/pep8) can do this, though
I have never used it myself. PyLint is a customisable static analysis
program that checks style among other things.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
python
tutorial at http://docs.python.org/tutorial/index.html for more on
"while" and "for" statements.
Use functions to break up the code into related sections. Check out
the tutorial material for functions too.
This skeleton should give you a starting structure for your program.
Have fun :)
Kev
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 31 Dec 2009 10:28:55 +0530, Vikash Dhankar wrote:
> Hi,
> I am newbie in the python, I am stuck into a small problem.
>
> Me and my friend are working on the gedit based Twitter plugin.
> http://code.google.com/p/gedit-twitter-plugin/
>
> Now I want to add the tiny URL thing into this. I
On Sat, 19 Dec 2009 06:36:32 +1100, Astan Chee wrote:
> Kev Dwyer wrote:
>> Hello Astan,
>>
>> Your code executes without error for me on Win98 (!) with Python 2.5 or
>> XP with Python 2.6.
>>
>> It would help people to help you if you could provide the *exa
On Sat, 19 Dec 2009 06:36:32 +1100, Astan Chee wrote:
> Kev Dwyer wrote:
>> Hello Astan,
>>
>> Your code executes without error for me on Win98 (!) with Python 2.5 or
>> XP with Python 2.6.
>>
>> It would help people to help you if you could provide the *exa
an,
Your code executes without error for me on Win98 (!) with Python 2.5 or
XP with Python 2.6.
It would help people to help you if you could provide the *exact* console
output from when you try to execute the code, *including* the traceback.
That way we can work out which line of code is hitting the exception.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
2009/11/21 Victor Subervi
> On Sat, Nov 21, 2009 at 12:04 PM, Kev Dwyer wrote:
>
>> On Sat, 21 Nov 2009 08:19:52 -0500, Victor Subervi wrote:
>>
>> Hello Victor,
>>
>> The information that you have sent comes from the client side of the
>> transaction, s
need to view an older version).
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 20 Nov 2009 11:58:00 -0400, Victor Subervi wrote:
Hello Victor,
Carsten's well-specified instruction has identified your problem.
>[r...@13gems globalsolutionsgroup.vi]# python -c "import email; print
>email"
>
There is a file named email.pyc, most likely in your current directory,
th
On Fri, 20 Nov 2009 07:58:55 -0500, Victor Subervi wrote:
> On Thu, Nov 19, 2009 at 5:01 PM, Kev Dwyer
> wrote:
>
>> On Thu, 19 Nov 2009 11:28:37 -0400, Victor Subervi wrote:
>>
>> Hello Victor,
>>
>> There are some pages on the internet that suggest
?
If so, start a new interpreter session and try import email - is the
email module imported from the stdlib?
If these steps don't help, it might be useful if you can tell us which
Linux distribution you are using.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
ogger1
>
> Do you know why?
>
> Many thanks.
See http://docs.python.org/library/logging.html#formatter-objects
Kev
--
http://mail.python.org/mailman/listinfo/python-list
;
> What I'm trying to do is to read-in a large XML string, and parse it
> into an object from which I can extract nodes matching selectors that
> include such predicates.
>
> Any suggestions would be greatly appreciated.
>
> TIA!
>
> kynn
Have you tried lxml (http
paths through your code.
Cheers,
Kev
--
http://mail.python.org/mailman/listinfo/python-list
82 matches
Mail list logo