Fabric is a library built on paramiko that gives you abstractions so
that you don't have to worry about things at such a fine grained
level. Perhaps you should try using that.
writes:
> Howdy All,
>
> I am trying to use paramiko to automate logging in to remote unix machines
> and executing so
Howdy All,
I am trying to use paramiko to automate logging in to remote unix machines and
executing some commands there.
When I normally do ssh from my linux machine (with Python 2.6) to this machine
a different '>' prompt comes. It's a device specific custom prompt.
After I run 'enable' command
shearich...@gmail.com wrote:
> Listening to 'Radio Free Python' episode 8
> (http://radiofreepython.com/episodes/8/ - around about the 30 minute mark)
> I heard that Python pre creates some integer constants to avoid a
> proliferation of objects with the same value.
>
> I was interested in this a
Andrew Berg, 18.06.2012 21:24:
> Are there any tools out there that will parse a script and tell me if it
> is compatible with an arbitrary version of Python and highlight any
> incompatibilities? I need to check a few of my scripts that target 3.2
> to see if I can make them compatible with 3.0 an
Are you using django-nonrel or basic django version?
Check out http://www.allbuttonspressed.com/projects/django-nonrel
cheers
Ramesh
On Tue, Jun 19, 2012 at 10:52 AM, Ranjith Kumar wrote:
> Hi all,
> I tried Django with Mongodb while running manage.py syncdb I endup with
> this error
>
> note
Hi all,
I tried Django with Mongodb while running manage.py syncdb I endup with
this error
note : it works fine with sqlite and mysql db
(django-1.3)ranjith@ranjith:~/
sandbox/python-box/hukkster-core-site/hukk$ ./manage.py syncdb
/home/ranjith/virtualenvs/django-1.3/local/lib/python2.7/site-pack
On Mon, Jun 18, 2012 at 7:52 PM, wrote:
> Listening to 'Radio Free Python' episode 8
> (http://radiofreepython.com/episodes/8/ - around about the 30 minute mark) I
> heard that Python pre creates some integer constants to avoid a proliferation
> of objects with the same value.
>
> I was intere
On Sunday, June 17, 2012 6:01:03 PM UTC-5, Steven D'Aprano wrote:
> One day, in my Copious Spare Time, I intend to write a proper feature
> request and/or PEP for such a feature. Obviously the absolute earliest
> such a feature could be introduced is Python 3.4, about 18 months from
> now. (Alt
On Monday, June 18, 2012 1:21:02 PM UTC-5, Frederic Rentsch wrote:
> Hi All,
>
> For most of an afternoon I've had that stuck-in-a-dead-end feeling
> probing to no avail all permutations formulating bindings, trying to
> make sense of manuals and tutorials. Here are my bindings:
>
>label_
Listening to 'Radio Free Python' episode 8
(http://radiofreepython.com/episodes/8/ - around about the 30 minute mark) I
heard that Python pre creates some integer constants to avoid a proliferation
of objects with the same value.
I was interested in this and so I decided to try it out.
First I
On 6/18/2012 3:24 PM, Andrew Berg wrote:
Are there any tools out there that will parse a script and tell me if it
is compatible with an arbitrary version of Python and highlight any
Not that I know of.
incompatibilities? I need to check a few of my scripts that target 3.2
to see if I can make
Roy Smith wrote in news:jro9cj$b44$1...@panix2.panix.com in
gmane.comp.python.general:
> Is there any way to conditionally apply a decorator to a function?
> For example, in django, I want to be able to control, via a run-time
> config flag, if a view gets decorated with @login_required().
>
> @
On Mon, Jun 18, 2012 at 6:49 PM, Emile van Sebille wrote:
> On 6/18/2012 3:16 PM Roy Smith said...
> class myDecorator(object):
> def __init__(self, f):
> self.f = f
> def __call__(self):
> print "Entering", self.f.__name__
> self.f()
> print "Exited", self.f.__na
Which leads me to another question ... how can I debug these things?
$ echo 'hello' | python3 -m pdb ~/my-input.py
> /home/jason/my-input.py(2)()
-> import sys
(Pdb) *** NameError: name 'hello' is not defined
--
http://mail.python.org/mailman/listinfo/python-list
> sys.stdin wraps a buffered reader which itself wraps a raw file reader.
>
sys.stdin
> <_io.TextIOWrapper name='' mode='r' encoding='UTF-8'>
sys.stdin.buffer
> <_io.BufferedReader name=''>
sys.stdin.buffer.raw
> <_io.FileIO name='' mode='rb'>
>
> You should read from sys.stdin.buffe
Am 19.06.2012 01:13, schrieb Jason Friedman:
> I tried this:
sys.stdin wraps a buffered reader which itself wraps a raw file reader.
>>> sys.stdin
<_io.TextIOWrapper name='' mode='r' encoding='UTF-8'>
>>> sys.stdin.buffer
<_io.BufferedReader name=''>
>>> sys.stdin.buffer.raw
<_io.FileIO name='' m
On Mon, Jun 18, 2012 at 4:13 PM, Jason Friedman wrote:
> I tried this:
>
> Python 3.2.2 (default, Feb 24 2012, 20:07:04)
> [GCC 4.6.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import sys
import io
fh = io.open(sys.stdin)
> Traceback (most re
On 06/17/2012 11:35 PM, Gelonida N wrote:
Hi,
I'm not sure whether what I ask for is impossible, but would know how
others handle such situations.
I'm having a module, which should lazily evaluate one of it's variables.
Meaning that it is evaluated only if anybody tries to use this variable.
I tried this:
Python 3.2.2 (default, Feb 24 2012, 20:07:04)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import io
>>> fh = io.open(sys.stdin)
Traceback (most recent call last):
File "", line 1, in
TypeError: invalid file: <_io.
On 6/18/2012 3:16 PM Roy Smith said...
Is there any way to conditionally apply a decorator to a function?
For example, in django, I want to be able to control, via a run-time
config flag, if a view gets decorated with @login_required().
@login_required()
def my_view(request):
pass
class
On 18/06/2012 23:16, Roy Smith wrote:
Is there any way to conditionally apply a decorator to a function?
For example, in django, I want to be able to control, via a run-time
config flag, if a view gets decorated with @login_required().
@login_required()
def my_view(request):
pass
A decora
r...@panix.com (Roy Smith) writes:
> Is there any way to conditionally apply a decorator to a function?
> For example, in django, I want to be able to control, via a run-time
> config flag, if a view gets decorated with @login_required().
>
> @login_required()
> def my_view(request):
> pass
Y
Is there any way to conditionally apply a decorator to a function?
For example, in django, I want to be able to control, via a run-time
config flag, if a view gets decorated with @login_required().
@login_required()
def my_view(request):
pass
--
http://mail.python.org/mailman/listinfo/python-
Hi Pauli,
Thank you for your interest in improving the bz2 module. However, I'm
not sure of what you are saying in your email.
If you believe you have found a bug in the module, then please provide
clear instructions on how to reproduce the error(s), preferably using
just one data file that trigg
On Jun 18, 8:45 pm, Terry Reedy wrote:
> On 6/18/2012 12:39 PM, jmfauth wrote:
>
> > We are turning in circles.
>
> You are, not we. Please stop.
>
> > You are somehow legitimating the reintroduction of unicode
> > literals
>
> We are not 'reintroducing' unicode literals. In Python 3, string
> lit
Are there any tools out there that will parse a script and tell me if it
is compatible with an arbitrary version of Python and highlight any
incompatibilities? I need to check a few of my scripts that target 3.2
to see if I can make them compatible with 3.0 and 3.1 if they aren't
already. I found p
On 6/18/2012 9:54 AM, Dave Angel wrote:
On 06/18/2012 09:47 AM, Neal Becker wrote:
I meant a module
You are correct that using periods in a module name conflicts with
periods in import statement syntax.
from src.directory import neal
that has nothing to do with periods being in a director
On 6/18/2012 12:39 PM, jmfauth wrote:
We are turning in circles.
You are, not we. Please stop.
You are somehow legitimating the reintroduction of unicode
literals
We are not 'reintroducing' unicode literals. In Python 3, string
literals *are* unicode literals.
Other developers reintroduc
Hi All,
For most of an afternoon I've had that stuck-in-a-dead-end feeling
probing to no avail all permutations formulating bindings, trying to
make sense of manuals and tutorials. Here are my bindings:
label_frame.bind ('', self.color_selected)
label_frame.bind ('', self.color_selectab
Dieter Maurer wrote:
> You can create a tuple in "C" and then put a reference to itself into
> it, but I am quite convinced that you cannot do it in Python itself.
> (Of course, you could use "cython" to generate C code with a source
> language very similar to Python).
I don't think you can even
Valentin Mercier writes:
> I'm trying to search some mails with SUBJECT criteria, but the problem is the
> encoding, I'm trying to search french terms (impalib and python V2.7)
>
> I've tried few things, but I think the encoding is the problem, in my mail
> header I have something like this:
>
>
Andrew Berg writes:
> On 6/18/2012 11:32 AM, Jussi Piitulainen wrote:
> > jmfauth writes:
> >
> >> Thinks are very clear to me. I wrote enough interactive
> >> interpreters with all available toolkits for Windows
> >
> r = input()
> > u'a
> > Traceback (most recent call last):
> > File "",
Ben Finney wrote:
Curt writes:
On 2012-06-16, Christian Heimes wrote:
Actually it's "van Rossum, Guido", not "Rossum, Guido van". The
"van" is part of the family name, not a middle name. It's like "da
Vinci, Leonardo" or "von Sydow, Max". On one occasion Guido
complained that Americans alway
On 6/18/2012 12:03 PM, Dave Angel wrote:
> And you're missing the context. jmfauth thinks we should re-introduce
> the input/raw-input distinction so he could parse literal strings. So
> Jussi demonstrated that the 2.x input did NOT satisfy fmfauth's dreams.
You're right. I missed that part of jm
On 06/18/2012 12:55 PM, Andrew Berg wrote:
> On 6/18/2012 11:32 AM, Jussi Piitulainen wrote:
>> jmfauth writes:
>>
>>> Thinks are very clear to me. I wrote enough interactive
>>> interpreters with all available toolkits for Windows
> r = input()
>> u'a
>> Traceback (most recent call last):
>>
We are turning in circles. You are somehow
legitimating the reintroduction of unicode
literals and I shew, not to say proofed, it may
be a source of problems.
Typical Python desease. Introduce a problem,
then discuss how to solve it, but surely and
definitivly do not remove that problem.
As far a
> If you (the programmer) want a function that asks the user to enter a
> literal at the input prompt, you'll have to write a post-processing for
> it, which looks for prefixes, for quotes, for backslashes, etc., and
> encodes the result. There very well may be such a decoder in the Python
> libra
On Monday, June 18, 2012 9:44:17 AM UTC-6, jmfauth wrote:
> Thinks are very clear to me. I wrote enough interactive
> interpreters with all available toolkits for Windows
> since I know Python (v. 1.5.6).
>
> I do not see why the semantic may vary differently
> in code source or in an interactive
On 6/18/2012 11:32 AM, Jussi Piitulainen wrote:
> jmfauth writes:
>
>> Thinks are very clear to me. I wrote enough interactive
>> interpreters with all available toolkits for Windows
>
r = input()
> u'a
> Traceback (most recent call last):
> File "", line 1, in
> SyntaxError: u'a
>
> Er,
jmfauth writes:
> Thinks are very clear to me. I wrote enough interactive
> interpreters with all available toolkits for Windows
>>> r = input()
u'a
Traceback (most recent call last):
File "", line 1, in
SyntaxError: u'a
Er, no, not really :-)
--
http://mail.python.org/mailman/listinfo/pytho
On Tue, Jun 19, 2012 at 1:44 AM, jmfauth wrote:
> I do not see why the semantic may vary differently
> in code source or in an interactive interpreter,
> esp. if Python allow it!
When you're asking for input, you usually aren't looking for code. It
doesn't matter about string literal formats, bec
Thinks are very clear to me. I wrote enough interactive
interpreters with all available toolkits for Windows
since I know Python (v. 1.5.6).
I do not see why the semantic may vary differently
in code source or in an interactive interpreter,
esp. if Python allow it!
If you have to know by advance
Am 18.06.2012 16:00, schrieb jmfauth:
> A string is a string, a "piece of text", period.
No. There are different representations for the same piece of text even
in the context of just Python. b'fou', u'fou', 'fou' are three different
source code representations, resulting in two different runtime
Hello.
I would like to point you to a project that I worked on lately: iCam, a
video surveillance cross-platform mobile application (Android, Symbian,
iOS, WinCE) written in Python, which uploads normally media to YouTube and
Picasa. The project can be found at
http://code.google.com/p/icam-mobi
On 18 June 2012 12:31, Valentin Mercier wrote:
> Hi,
>
> I'm trying to search some mails with SUBJECT criteria, but the problem is
> the encoding, I'm trying to search french terms (impalib and python V2.7)
>
> I've tried few things, but I think the encoding is the problem, in my mail
> header I h
On 06/18/2012 10:00 AM, jmfauth wrote:
>
> A string is a string, a "piece of text", period. I do not see why a
> unicode literal and an (well, I do not know how the call it) a "normal
> class " should behave differently in code source or as an answer
> to an input().
Wrong. The rules for parsi
Perhaps this will clear things up:
Python 3.3.0a4 (v3.3.0a4:7c51388a3aa7, May 31 2012, 20:17:41) [MSC
v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ua = u'a'
>>> literal_ua = "u'a'"
>>> ua == literal_ua
False
>>> input_ua = input()
u'a'
On 18 juin, 12:11, Steven D'Aprano wrote:
> On Mon, 18 Jun 2012 02:30:50 -0700, jmfauth wrote:
> > On 18 juin, 10:28, Benjamin Kaplan wrote:
> >> The u prefix is only there to
> >> make it easier to port a codebase from Python 2 to Python 3. It doesn't
> >> actually do anything.
>
> > It does. I
On 06/18/2012 09:47 AM, Neal Becker wrote:
> I meant a module
>
> src.directory contains
> __init__.py
> neal.py
> becker.py
>
> from src.directory import neal
>
>
> On Mon, Jun 18, 2012 at 9:44 AM, Dave Angel wrote:
>
>> On 06/18/2012 09:19 AM, Neal Becker wrote:
>>> Am I correct that a modu
I meant a module
src.directory contains
__init__.py
neal.py
becker.py
from src.directory import neal
On Mon, Jun 18, 2012 at 9:44 AM, Dave Angel wrote:
> On 06/18/2012 09:19 AM, Neal Becker wrote:
> > Am I correct that a module could never come from a file path with a '.'
> in the
> > name?
>
On 06/18/2012 09:19 AM, Neal Becker wrote:
> Am I correct that a module could never come from a file path with a '.' in
> the
> name?
>
No.
Simple example: Create a directory called src.directory
In that directory, create two files
::neal.py::
import becker
print becker.__file__
print becker.h
Am I correct that a module could never come from a file path with a '.' in the
name?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to search some mails with SUBJECT criteria, but the problem is
the encoding, I'm trying to search french terms (impalib and python V2.7)
I've tried few things, but I think the encoding is the problem, in my mail
header I have something like this:
=?iso-8859-1?Q?Job:_"Full_Backup_
Prashant wrote:
> class Shape(object):
> def __init__(self, shapename):
> self.shapename = shapename
>
>
> def update(self):
> print "update"
>
> class ColoredShape(Shape):
> def __init__(self, color):
> Shape.__init__(self, color)
> s
Am 18.06.2012 09:10 schrieb Prashant:
class Shape(object):
def __init__(self, shapename):
self.shapename = shapename
def update(self):
print "update"
class ColoredShape(Shape):
def __init__(self, color):
Shape.__init__(self, color)
self.color =
On Mon, 18 Jun 2012 02:30:50 -0700, jmfauth wrote:
> On 18 juin, 10:28, Benjamin Kaplan wrote:
>> The u prefix is only there to
>> make it easier to port a codebase from Python 2 to Python 3. It doesn't
>> actually do anything.
>
>
> It does. I shew it!
Incorrect. You are assuming that Python
On Mon, 18 Jun 2012 01:19:32 -0700, jmfauth wrote:
> What is input() supposed to return?
Whatever you type.
u'a' == 'a'
> True
This demonstrates that in Python 3.3, u'a' gives a string equal to 'a'.
r1 = input(':')
> :a
Since you typed the letter a, r1 is the string "a" (a single ch
On 18 juin, 10:28, Benjamin Kaplan wrote:
> On Mon, Jun 18, 2012 at 1:19 AM, jmfauth wrote:
> > What is input() supposed to return?
>
> u'a' == 'a'
> > True
>
> r1 = input(':')
> > :a
> r2 = input(':')
> > :u'a'
> r1 == r2
> > False
> type(r1), len(r1)
> > (, 1)
> ty
Am 18.06.2012 09:10, schrieb Prashant:
> class Shape(object):
> def __init__(self, shapename):
> self.shapename = shapename
>
>
> def update(self):
> print "update"
>
> class ColoredShape(Shape):
> def __init__(self, color):
> Shape.__init__(se
On Mon, Jun 18, 2012 at 1:19 AM, jmfauth wrote:
> What is input() supposed to return?
>
u'a' == 'a'
> True
r1 = input(':')
> :a
r2 = input(':')
> :u'a'
r1 == r2
> False
type(r1), len(r1)
> (, 1)
type(r2), len(r2)
> (, 4)
>
> ---
>
> sys.argv?
>
> jmf
Python
What is input() supposed to return?
>>> u'a' == 'a'
True
>>>
>>> r1 = input(':')
:a
>>> r2 = input(':')
:u'a'
>>> r1 == r2
False
>>> type(r1), len(r1)
(, 1)
>>> type(r2), len(r2)
(, 4)
>>>
---
sys.argv?
jmf
--
http://mail.python.org/mailman/listinfo/python-list
class Shape(object):
def __init__(self, shapename):
self.shapename = shapename
def update(self):
print "update"
class ColoredShape(Shape):
def __init__(self, color):
Shape.__init__(self, color)
self.color = color
print 1
62 matches
Mail list logo