Re: Clearing out handlers in logging?

2014-03-16 Thread Gunther Dietrich
Tim Chase  wrote:

>The current (2.7; maybe 3.x?) logging module doesn't have any sort of
>"clear out all the current handlers" method.

Indeed, THERE IS a removeHandler() method. In the documentation of 
python 2.6, it is mentioned in '16.6.5. Logger Objects', directly after 
the addHandler() method. If you found the addHandler() method there, you 
should have found removeHandler() too.

And a simple

>>> dir(log)
['__doc__', '__init__', '__module__', '_log', 'addFilter', 'addHandler', 
'callHandlers', 'critical', 'debug', 'disabled', 'error', 'exception', 
'fatal', 'filter', 'filters', 'findCaller', 'getEffectiveLevel', 
'handle', 'handlers', 'info', 'isEnabledFor', 'level', 'log', 
'makeRecord', 'manager', 'name', 'parent', 'propagate', 'removeFilter', 
'removeHandler', 'root', 'setLevel', 'warn', 'warning']

also would have revealed it to you.


>I can hack it by doing
>
>  log = logging.getLogger()  # get the root logger
>  del log.handlers[:]# reach inside and nuke 'em
>  log.addHandler(...)# install the one(s) I want
>
>but it feels a little dirty to reach into logging.root.handlers since
>there are other methods for adding/removing handlers.  However, as
>best I can tell, to remove a handler, you already need to have it
>saved somewhere.

What about this:

>>> for handler in log.handlers:
... log.removeHandler(handler)

I think, that's just one of the tasks that removeHandler() was written 
for.


>Is there a better way to do this, or do I just suck it up and deal
>with the (potentially thread-ignorant, as it doesn't lock) hack?

One of the best ways would be to read the documentation. And to do some 
exploration, e.g. by means of dir() and help(), could also be quite 
instructive. This experience cannot be replaced by 
documentation-research requests to the Usenet.



Best regards,

Gunther
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Clearing out handlers in logging?

2014-03-16 Thread Chris Angelico
On Sun, Mar 16, 2014 at 7:39 PM, Gunther Dietrich
 wrote:
>>but it feels a little dirty to reach into logging.root.handlers since
>>there are other methods for adding/removing handlers.  However, as
>>best I can tell, to remove a handler, you already need to have it
>>saved somewhere.
>
> What about this:
>
 for handler in log.handlers:
> ... log.removeHandler(handler)
>
> I think, that's just one of the tasks that removeHandler() was written
> for.

I'm sure Tim was aware of the removeHandler function. But this is
still reaching into log.handlers - although IMO it's safer to reach in
and read than to reach in and mutate. So without the implications of
Tim's inability to read docs, this is a viable suggestion. I'd prefer
this over the original "del log.handlers[:]".

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Clearing out handlers in logging?

2014-03-16 Thread Peter Otten
Gunther Dietrich wrote:

> Tim Chase  wrote:
> 
>>The current (2.7; maybe 3.x?) logging module doesn't have any sort of
>>"clear out all the current handlers" method.
> 
> Indeed, THERE IS a removeHandler() method. In the documentation of
> python 2.6, it is mentioned in '16.6.5. Logger Objects', directly after
> the addHandler() method. If you found the addHandler() method there, you
> should have found removeHandler() too.
> 
> And a simple
> 
 dir(log)
> ['__doc__', '__init__', '__module__', '_log', 'addFilter', 'addHandler',
> 'callHandlers', 'critical', 'debug', 'disabled', 'error', 'exception',
> 'fatal', 'filter', 'filters', 'findCaller', 'getEffectiveLevel',
> 'handle', 'handlers', 'info', 'isEnabledFor', 'level', 'log',
> 'makeRecord', 'manager', 'name', 'parent', 'propagate', 'removeFilter',
> 'removeHandler', 'root', 'setLevel', 'warn', 'warning']
> 
> also would have revealed it to you.
> 
> 
>>I can hack it by doing
>>
>>  log = logging.getLogger()  # get the root logger
>>  del log.handlers[:]# reach inside and nuke 'em
>>  log.addHandler(...)# install the one(s) I want
>>
>>but it feels a little dirty to reach into logging.root.handlers since
>>there are other methods for adding/removing handlers.  However, as
>>best I can tell, to remove a handler, you already need to have it
>>saved somewhere.
> 
> What about this:
> 
 for handler in log.handlers:
> ... log.removeHandler(handler)
> 
> I think, that's just one of the tasks that removeHandler() was written
> for.
> 
> 
>>Is there a better way to do this, or do I just suck it up and deal
>>with the (potentially thread-ignorant, as it doesn't lock) hack?
> 
> One of the best ways would be to read the documentation. And to do some
> exploration, e.g. by means of dir() and help(), could also be quite
> instructive. This experience cannot be replaced by
> documentation-research requests to the Usenet.

Hm, what do the docs say about this one?

>>> import logging
>>> logging.basicConfig()
>>> log = logging.getLogger("foo")
>>> for i in range(5):
... log.addHandler(logging.FileHandler("tmp.log"))
... 
>>> assert len(log.handlers) == 5
>>> for handler in log.handlers:
... log.removeHandler(handler)
... 
>>> log.handlers
[, ]


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Clearing out handlers in logging?

2014-03-16 Thread Chris Angelico
On Sun, Mar 16, 2014 at 8:18 PM, Peter Otten <[email protected]> wrote:
> Hm, what do the docs say about this one?
>
 import logging
 logging.basicConfig()
 log = logging.getLogger("foo")
 for i in range(5):
> ... log.addHandler(logging.FileHandler("tmp.log"))
> ...
 assert len(log.handlers) == 5
 for handler in log.handlers:
> ... log.removeHandler(handler)
> ...
 log.handlers
> [,  at 0x7f8216f9eb90>]

for handler in log.handlers[:]:
log.removeHandler(handler)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: test

2014-03-16 Thread Chris “Kwpolska” Warrick
On Sun, Mar 16, 2014 at 4:41 AM, Mark H Harris  wrote:
> I have been having a fit with gg, and its taken just a little time to get a
> real news-reader client for posting. What a fit. Google does really well
> with some things, but gg is not one of them, IMHO.

Why not use the mailing list instead?  It’s a much easier way to
access this place.

https://mail.python.org/mailman/listinfo/python-list

-- 
Chris “Kwpolska” Warrick 
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sharing: File Reader Generator with & w/o Policy

2014-03-16 Thread Steven D'Aprano
On Sat, 15 Mar 2014 23:47:30 -0500, Mark H Harris wrote:

> The other thing I'm tempted to do is to find names (even new names) that
> read like English closely (whatever I mean by that) so that there is no
> question about what is going on to a non expert.
> 
> for line in getnumline(file):
>{whatever}

I'm not an expert on your code, and I have very little idea what that is 
supposed to do. Judging by the name "getnumline", my first guess is that 
the function takes a line number n, and it will return the nth line of 
some source:

getnumline(source, 5)
=> returns the 5th line from source

But that's not how you use it. You pass it a "file". Is that a file 
object, or a file name? My guess is that it would be a file object, since 
if you wanted a file name you would have written getnumline(filename). Is 
that a file object that is open for reading or writing? I'd have to guess 
that it's open for reading, since you're (probably?) "getting" from the 
file rather than "putting".

So... something like this:

file = open("some thing")
for line in getnumline(file):
...

Presumably it iterates over the lines of the file, but what it does with 
the lines is hard to say. If I had to guess, I'd say... maybe it's 
extracting the lines that start with a line number? Something like this 
perhaps?

def getnumline(file_object):
count = 0  # Or start at 1?
while True:
line = file_object.readline()
if line == '':
break
if line.startswith(str(count)):
yield line
count += 1

But this is only a guess, based on the assumption that while the function 
name is misleading, it's not *entirely* misleading. I'm puzzled why the 
function claims to do something with "line" singular, when you're 
obviously using it to iterate over lines plural.

Contrast that with an example from the Python built-ins: enumerate. What 
you get is exactly what it says on the tin: the function is called 
enumerate, and enumerate is what it does:


enumerate
v 1: specify individually; "She enumerated the many obstacles
 she had encountered"; "The doctor recited the list of
 possible side effects of the drug" [syn: enumerate,
 recite, itemize, itemise]
2: determine the number or amount of; "Can you count the books
   on your shelf?"; "Count your change" [syn: count, number,
   enumerate, numerate]



-- 
Steven D'Aprano
http://import-that.dreamwidth.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Clearing out handlers in logging?

2014-03-16 Thread Tim Chase
On 2014-03-16 09:39, Gunther Dietrich wrote:
> Tim Chase  wrote:
> 
> >The current (2.7; maybe 3.x?) logging module doesn't have any sort
> >of "clear out all the current handlers" method.
> 
> Indeed, THERE IS a removeHandler() method.

Yes, I'm aware of it, having read the source & docs.  However, the
signature is

  removeHandler(some_handle_to_a_handler_that_you_already_have)

and at the point in my code where I need to override this,
basicConfig() has already assigned a default stream handler and
discarded the handle/name/reference to it because
the .debug/.info/.warn/.error/.critical methods of all call
basicConfig() if there aren't any handlers.

[Aside: which is non-pythonically, using "if len(self.handlers) == 0"
instead of "if not self.handlers" in addition to the camel-case
naming (which would be much harder to fix)]

> >>> for handler in log.handlers:
> ... log.removeHandler(handler)
> 
> I think, that's just one of the tasks that removeHandler() was
> written for.

The question revolves mostly around dipping your hands into the
undocumented .handlers property.  I can nuke it directly (and looking
at least at the 2.7 source, there doesn't seem to be much issue with
doing this), or I can iterate (as modified by Chris Angelico to
prevent modifying the list over which you're iterating). Either way,
it still involves reaching into log.handlers which doesn't appear in
any of the documentation as far as I could find.

So yes, I use help() and dir() on a daily basis.  But just because
something is there doesn't mean I should go mucking with it in the
event it's undocumented.  If it *should* be trusted as a publicly
available interface, it should be documented; if it shouldn't be
treated publicly, then it should have a way to iterate over them
such as

  def iterHandlers(self):
for h in self.handlers[:]:
  yield h

so you can do

  for h in log.iterHandlers():
log.removeHandler(h)

Given how stable this code has been over the years, I'd just document
the log.handlers property and possibly advise to lock around messing
with it (unless "del log.handlers[:]" is atomic).

-tkc






-- 
https://mail.python.org/mailman/listinfo/python-list


Thread is somehow interfering with a while loop called after the thread is started

2014-03-16 Thread Dan McInerney
Coming back to this a long time later. I figured it out a little bit after
I posted this. I wasn't aware that q.try_run() within the nfqueue module
was a blocking call
https://www.wzdftpd.net/redmine/projects/nfqueue-bindings/wiki/Examples.
I'm not sure I was even aware of what it meant to be blocking vs
nonblocking. Either way, someone from #python looked at my code and told me
nfqueue is a blocking call and I should look into something like twisted.

Twisted is a complex module but I spent a bunch of time looking at it and
eventually had some working code implementing the absolute bare essentials
as I needed them to go asynchronous. This question eventually progressed
into https://github.com/DanMcInerney/LANs.py.

Speaking of network concurrency, my recent project has been from a web
scraper point of view and I think gevents+requests or gevents+mechanize are
the way to go for that somewhat-related topic. erequests won't import due
to a bug, grequests has no way to handle exceptions in the fetching of
responses, treq can't find and fill out form logins (maybe with a POST,
haven't explored that route), and scrapy is way too big and complex for my
latest project (https://github.com/DanMcInerney/shodan_pharmer), eventlets
I'm sure CAN work with libraries other than urllib2 but it implements and
imports its own urllib2 and it is not a favorable time:effort ratio for me
to try and implement that.
-- 
https://mail.python.org/mailman/listinfo/python-list


Installing addition libraries in Portable Python 2.7 on Windows

2014-03-16 Thread laguna-mc
I am new in Python, I have Portable Python 2.7.5.1 installed on Windows 7.

I want to install additional libraries:

python-magic
libmagic
libfuzzy
pyqtgraph

I downloaded package, saved on hard drive, unzipped, find setup.py and tried 
install via Command Prompt:

Python-Portable.exe setup.py install

A new DOS terminal window briefly flashes and disappears, without showing any 
error or installation confirmation.
I assume that nothing has been installed and/or installation failed.. No tips 
or errors has been shown, so I don't' know how to install these packages 
corretcly.
I tried also to install get-pip.py use same way, and again nothing happens, no 
any errors or results.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installing addition libraries in Portable Python 2.7 on Windows

2014-03-16 Thread Mark Lawrence

On 16/03/2014 13:50, [email protected] wrote:

I am new in Python, I have Portable Python 2.7.5.1 installed on Windows 7.

I want to install additional libraries:

python-magic
libmagic
libfuzzy
pyqtgraph

I downloaded package, saved on hard drive, unzipped, find setup.py and
tried install via Command Prompt:

Python-Portable.exe setup.py install

A new DOS terminal window briefly flashes and disappears, without
showing any error or installation confirmation.
I assume that nothing has been installed and/or installation failed.. No
tips or errors has been shown, so I don't' know how to install these
packages corretcly.
I tried also to install get-pip.py use same way, and again nothing
happens, no any errors or results.



IIRC you need to obtain ez_setup.py to get easy_install and only then 
will get-pip.py work.


--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


--
https://mail.python.org/mailman/listinfo/python-list


Re: Clearing out handlers in logging?

2014-03-16 Thread Gunther Dietrich
Tim Chase  wrote:

>> >The current (2.7; maybe 3.x?) logging module doesn't have any sort
>> >of "clear out all the current handlers" method.
>> 
>> Indeed, THERE IS a removeHandler() method.
>
>Yes, I'm aware of it, having read the source & docs.  However, the
>signature is

Sorry, your original article lacks information about what you already 
know/tried and what not. So it is a bit misleading and makes the 
impression, you would't read the documentation. It would have been 
helpful if you had told us your preconditions.



Best regards,

Gunther
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Clearing out handlers in logging?

2014-03-16 Thread Tim Chase
On 2014-03-16 19:29, Gunther Dietrich wrote:
> >> Indeed, THERE IS a removeHandler() method.  
> >
> >Yes, I'm aware of it, having read the source & docs.  However, the
> >signature is  
> 
> Sorry, your original article lacks information about what you
> already know/tried and what not. So it is a bit misleading and
> makes the impression, you would't read the documentation. It would
> have been helpful if you had told us your preconditions.

Heh, I tried to make that clear in my initial posting with the "since
there are other methods for adding/removing handlers" bit.  I guess I
could have been more explicit though as to what I'd tried.  I
generally figure that, if someone knows enough to dig into the
stdlib's source code, they also know enough to use dir() and help().
Not *always* the case, but a good hint that they're past the basics.

But I could have clarified my question more along the lines of
"Should log.handlers be public/documented; should Logger grow
clearHandlers() and iterHandlers() methods; or should I wantonly use
log.handlers but then just get to keep both pieces if/when it breaks?"

-tkc



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installing addition libraries in Portable Python 2.7 on Windows

2014-03-16 Thread laguna-mc
It'slike a chain, eachnew modulepulls afew othermodules.I can postpone 
get-pip.py onthe very last stage, now I want to install python-magic, libmagic, 
libfuzzy, pyqtgraph. How to do this?

- Original Message -
From: Mark Lawrence
Sent: 03/16/14 05:06 PM
To: [email protected]
Subject: Re: Installing addition libraries in Portable Python 2.7 on Windows

On 16/03/2014 13:50, [email protected] wrote: > I am new in Python, I have 
Portable Python 2.7.5.1 installed on Windows 7. > > I want to install 
additional libraries: > > python-magic > libmagic > libfuzzy > pyqtgraph > > I 
downloaded package, saved on hard drive, unzipped, find setup.py and > tried 
install via Command Prompt: > > Python-Portable.exe setup.py install > > A new 
DOS terminal window briefly flashes and disappears, without > showing any error 
or installation confirmation. > I assume that nothing has been installed and/or 
installation failed.. No > tips or errors has been shown, so I don't' know how 
to install these > packages corretcly. > I tried also to install get-pip.py use 
same way, and again nothing > happens, no any errors or results. > IIRC you 
need to obtain ez_setup.py to get easy_install and only then will get-pip.py 
work. -- My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language. Mark Lawrence --- This email is f
 ree from viruses and malware because avast! Antivirus protection is active. 
http://www.avast.com -- https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Error when installing matplotlib-1.3. on Windows

2014-03-16 Thread laguna-mc
I'm trying to install matplotlib from locally stored source archive file 
(Portable Python 2.7 on Windows):

pip install E:\matplotlib-1.3.1.win32-py2.7.exe

Got error, below is log:


E:\Portable Python 2.7.5.1\App\Scripts\pip run on 03/17/14 03:10:16
Exception:
Traceback (most recent call last):
 File "E:\Portable Python 2.7.5.1\App\lib\site-packages\pip\basecommand.py", 
line 122, in main
 status = self.run(options, args)
 File "E:\Portable Python 
2.7.5.1\App\lib\site-packages\pip\commands\install.py", line 257, in run
 InstallRequirement.from_line(name, None))
 File "E:\Portable Python 2.7.5.1\App\lib\site-packages\pip\req.py", line 172, 
in from_line
 return cls(req, comes_from, url=url, prereleases=prereleases)
 File "E:\Portable Python 2.7.5.1\App\lib\site-packages\pip\req.py", line 70, 
in __init__
 req = pkg_resources.Requirement.parse(req)
 File "E:\Portable Python 
2.7.5.1\App\lib\site-packages\pip\_vendor\pkg_resources.py", line 2606, in parse
 reqs = list(parse_requirements(s))
 File "E:\Portable Python 
2.7.5.1\App\lib\site-packages\pip\_vendor\pkg_resources.py", line 2544, in 
parse_requirements
 line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
 File "E:\Portable Python 
2.7.5.1\App\lib\site-packages\pip\_vendor\pkg_resources.py", line 2512, in 
scan_list
 raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 
'E:\\matplotlib-1.3.1.win32-py2.7.exe', 'at', 
':\\matplotlib-1.3.1.win32-py2.7.exe')


What is the problem and how to solve it?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Error when installing matplotlib-1.3. on Windows

2014-03-16 Thread MRAB

On 2014-03-17 01:20, [email protected] wrote:

I'm trying to install matplotlib from locally stored source archive file
(Portable Python 2.7 on Windows):

pip install E:\matplotlib-1.3.1.win32-py2.7.exe

Got error, below is log:


E:\Portable Python 2.7.5.1\App\Scripts\pip run on 03/17/14 03:10:16
Exception:
Traceback (most recent call last):
   File "E:\Portable Python
2.7.5.1\App\lib\site-packages\pip\basecommand.py", line 122, in main
 status = self.run(options, args)
   File "E:\Portable Python
2.7.5.1\App\lib\site-packages\pip\commands\install.py", line 257, in run
 InstallRequirement.from_line(name, None))
   File "E:\Portable Python 2.7.5.1\App\lib\site-packages\pip\req.py",
line 172, in from_line
 return cls(req, comes_from, url=url, prereleases=prereleases)
   File "E:\Portable Python 2.7.5.1\App\lib\site-packages\pip\req.py",
line 70, in __init__
 req = pkg_resources.Requirement.parse(req)
   File "E:\Portable Python
2.7.5.1\App\lib\site-packages\pip\_vendor\pkg_resources.py", line 2606,
in parse
 reqs = list(parse_requirements(s))
   File "E:\Portable Python
2.7.5.1\App\lib\site-packages\pip\_vendor\pkg_resources.py", line 2544,
in parse_requirements
 line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version
spec")
   File "E:\Portable Python
2.7.5.1\App\lib\site-packages\pip\_vendor\pkg_resources.py", line 2512,
in scan_list
 raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in',
'E:\\matplotlib-1.3.1.win32-py2.7.exe', 'at',
':\\matplotlib-1.3.1.win32-py2.7.exe')


What is the problem and how to solve it?


Judging by the name, I'd say that "matplotlib-1.3.1.win32-py2.7.exe" is
an installer, so you just need to run it.
--
https://mail.python.org/mailman/listinfo/python-list


File "build\bdist.win32\egg\redis\client.py", line 705, in get

2014-03-16 Thread jobmattcon
in win32 with redis-py and redis for window

Traceback (most recent call last):
  File "testredis.py", line 21, in 
matrixlist = r_server.get("matrix1")
  File "build\bdist.win32\egg\redis\client.py", line 705, in get
  File "build\bdist.win32\egg\redis\client.py", line 461, in execute_command
  File "build\bdist.win32\egg\redis\client.py", line 471, in parse_response
  File "build\bdist.win32\egg\redis\connection.py", line 349, in read_response
redis.exceptions.ResponseError: Operation against a key holding the wrong kind o
f value


import redis
from sympy import *
from sympy import Matrix
from sympy.abc import x, y, z, f, a, b
from sympy import *

r_server = redis.Redis("localhost")

f = Symbol('f')
x = Symbol('x')
y = Symbol('y')
z = Symbol('z')
varlist = [x,y,z,a,b]

A = Matrix([[1,0],[0,1]])
B = Matrix([[2,0],[0,5]])

r_server.sadd("matrix1", A)
r_server.sadd("matrix1", B)

matrixlist = r_server.get("matrix1")
-- 
https://mail.python.org/mailman/listinfo/python-list


pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread jobmattcon
http://heynemann.github.io/r3/

C:\heynemann-r3-cc6b4eb\build\lib\r3\app>r3-app --red
is-port=6379 --redis-pass=r3 -c config.py
Traceback (most recent call last):
  File "C:\Python27\Scripts\r3-app-script.py", line 5, in 
from pkg_resources import load_entry_point
  File "C:\Python27\lib\site-packages\pkg_resources.py", line 2709, in 
working_set.require(__requires__)
  File "C:\Python27\lib\site-packages\pkg_resources.py", line 664, in require
needed = self.resolve(parse_requirements(requirements))
  File "C:\Python27\lib\site-packages\pkg_resources.py", line 567, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: hiredis


[5700] 17 Mar 11:31:43.819 # Warning: no config file specified, using the defaul
t config. In order to specify a config file use C:\Users\martin.lee\Downloads\re
dis-2.6\bin\release\redis-server.exe /path/to/redis.conf
[5700] 17 Mar 11:31:43.828 # Warning: 32 bit instance detected but no memory lim
it set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
_._
   _.-``__ ''-._
  _.-```.  `_.  ''-._   Redis 2.6.12 (/0) 32 bit
  .-`` .-```.  ```\/_.,_ ''-._
 ('  ,   .-`  | `,) Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
 |`-._   `._/ _.-'| PID: 5700
  `-._`-._  `-./  _.-'_.-'
 |`-._`-._`-.__.-'_.-'_.-'|
 |`-._`-.__.-'_.-'|   http://redis.io
  `-._`-._`-.__.-'_.-'_.-'
 |`-._`-._`-.__.-'_.-'_.-'|
 |`-._`-.__.-'_.-'|
  `-._`-._`-.__.-'_.-'_.-'
  `-._`-.__.-'_.-'
  `-.__.-'
  `-.__.-'

[5700] 17 Mar 11:31:43.829 # Server started, Redis version 2.6.12
[5700] 17 Mar 11:31:43.829 * The server is now ready to accept connections on po
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread Ben Finney
[email protected] writes:

> [a dump of text terminal output]

Did you have something to say about this? Perhaps a question, with
details of what you're expecting and what happened instead?

-- 
 \ “Men never do evil so completely and cheerfully as when they do |
  `\it from religious conviction.” —Blaise Pascal (1623–1662), |
_o__)   Pensées, #894. |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread jobmattcon
first time run command to start r3, it has already got error
r3-app --redis-port=6379 --redis-pass=r3 -c config.py 

On Monday, March 17, 2014 1:09:32 PM UTC+8, Ben Finney wrote:
> writes:
> 
> 
> 
> > [a dump of text terminal output]
> 
> 
> 
> Did you have something to say about this? Perhaps a question, with
> 
> details of what you're expecting and what happened instead?
> 
> 
> 
> -- 
> 
>  \ "Men never do evil so completely and cheerfully as when they do |
> 
>   `\it from religious conviction." --Blaise Pascal (1623-1662), |
> 
> _o__)   Pensées, #894. |
> 
> Ben Finney
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread Ben Finney
[email protected] writes:

> first time run command to start r3, it has already got error
> r3-app --redis-port=6379 --redis-pass=r3 -c config.py 

First: please don't top-post; Instead, use the normal interleaved
posting style to make it easier to follow the conversation
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.

Second: I don't have any idea what you're referring to, and your
messages give no explanation. Is this a question about Python, or some
specific tool, or some library, or what?

What are you trying to do (and please say it in terms that means we can
try to reproduce the problem), and what are you seeing instead, and how
does that differ from what you expect?

-- 
 \   “The best is the enemy of the good.” —Voltaire, _Dictionnaire |
  `\Philosophique_ |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread jobmattcon
this is a specific tool related with python

http://heynemann.github.io/r3/

i am trying to do a simple example like the diagram in the web page 
describe and then use with sympy to massive generate functions and plot and 
print into a directory



On Monday, March 17, 2014 2:04:06 PM UTC+8, Ben Finney wrote:
>  writes:
> 
> 
> 
> > first time run command to start r3, it has already got error
> 
> > r3-app --redis-port=6379 --redis-pass=r3 -c config.py 
> 
> 
> 
> First: please don't top-post; Instead, use the normal interleaved
> 
> posting style to make it easier to follow the conversation
> 
> https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.
> 
> 
> 
> Second: I don't have any idea what you're referring to, and your
> 
> messages give no explanation. Is this a question about Python, or some
> 
> specific tool, or some library, or what?
> 
> 
> 
> What are you trying to do (and please say it in terms that means we can
> 
> try to reproduce the problem), and what are you seeing instead, and how
> 
> does that differ from what you expect?
> 
> 
> 
> -- 
> 
>  \   "The best is the enemy of the good." --Voltaire, _Dictionnaire |
> 
>   `\Philosophique_ |
> 
> _o__)  |
> 
> Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[RELEASED] Python 3.4.0

2014-03-16 Thread Larry Hastings


On behalf of the Python development team, I'm thrilled to announce
the official release of Python 3.4.


Python 3.4 includes a range of improvements of the 3.x series, including
hundreds of small improvements and bug fixes.  Major new features and
changes in the 3.4 release series include:

* PEP 428, a "pathlib" module providing object-oriented filesystem paths
* PEP 435, a standardized "enum" module
* PEP 436, a build enhancement that will help generate introspection
   information for builtins
* PEP 442, improved semantics for object finalization
* PEP 443, adding single-dispatch generic functions to the standard library
* PEP 445, a new C API for implementing custom memory allocators
* PEP 446, changing file descriptors to not be inherited by default
   in subprocesses
* PEP 450, a new "statistics" module
* PEP 451, standardizing module metadata for Python's module import system
* PEP 453, a bundled installer for the *pip* package manager
* PEP 454, a new "tracemalloc" module for tracing Python memory allocations
* PEP 456, a new hash algorithm for Python strings and binary data
* PEP 3154, a new and improved protocol for pickled objects
* PEP 3156, a new "asyncio" module, a new framework for asynchronous I/O


To download Python 3.4.0 visit:

http://www.python.org/download/releases/3.4.0/


This is a production release.  Please report any issues you notice to:

 http://bugs.python.org/


Enjoy!


--
Larry Hastings, Release Manager
larry at hastings.org
(on behalf of the entire python-dev team and 3.4's contributors)
--
https://mail.python.org/mailman/listinfo/python-list


Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread Chris Angelico
On Mon, Mar 17, 2014 at 5:10 PM,   wrote:
> this is a specific tool related with python
>
> http://heynemann.github.io/r3/
>
> i am trying to do a simple example like the diagram in the web page
> describe and then use with sympy to massive generate functions and plot and 
> print into a directory

1) You've already been asked not to top-post. Please, read the
Wikipedia page Ben linked you to.

2) If you put no effort into your question, why should we put effort
into the answer?

3) You're asking about a particular program. Unless you can show that
the problem you're having is specific to Python, you'll probably do
better to ask the author of that program. Look around and see if s/he
has a recommended means of getting assistance - maybe a mailing list.

4) You still haven't explained your problem at all. While we might be
flattered at the implication that our skills are so great that we're
psychic, we're more likely to be frustrated by the utter lack of
information.

Please read this: http://www.catb.org/~esr/faqs/smart-questions.html

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list