Ben Finney, 10.08.2013 07:05:
> Skip Montanaro writes:
>> Given that installing numpy or scipy is generally no more difficult
>> that executing "pip install (scipy|numpy)" I'm not really feeling the
>> need for a battery here...
>
> See the Rationale of PEP 450 for more reasons why “install NumPy”
Sarcastic what the kcuf ¿?¿?¿?
My english is SO bad?
Do you know me?
I can not understand this paranoia i only was giving thanks.
--
http://mail.python.org/mailman/listinfo/python-list
What about the security though?
To be specific, i need to create an application (python 3.3 strictly) where
users will save/load their settings online to a remote hosted database. I do
not wish to change the database from listening to any other thing than
localhost for security reasons, so i a
Im using python 3.3 on win7 64bit and trying to connect to a MySQL database on
a remote server through a putty ssh tunnel.
Running the script below im getting "Physical connection to the database did
not activate!". What im i doing wrong?! I tried to find a working example but
couldnt find one.
print "\t\tUploading file %s..." % newname
try:
self.ftp.storbinary("STOR %s" % newname, open(file))
except EOFError: # yep??
self.ftp.connect(self.ftpServ) # reconnecting
self.ftp.login(ftpUser, ftpPass)
self.ftp.storbinary("STOR %s" % newname, open(file))
print "\t\tFile %s uploaded" % newname
-
In article ,
Skip Montanaro wrote:
> Given that installing numpy or scipy is generally no more difficult
> that executing "pip install (scipy|numpy)" I'm not really feeling the
> need for a battery here...
I just tried installing numpy in a fresh virtualenv on an Ubuntu Precise
box. I ran "pi
On 10 August 2013 11:37, wrote:
> Sarcastic what the kcuf ¿?¿?¿?
>
> My english is SO bad?
>
> Do you know me?
>
> I can not understand this paranoia i only was giving thanks.
Sarcasm and a lack thereof is very hard to see over the Internet. It's
probably just a misunderstanding :).
On 10 August 2013 12:50, Roy Smith wrote:
> In article ,
> Skip Montanaro wrote:
>
>> Given that installing numpy or scipy is generally no more difficult
>> that executing "pip install (scipy|numpy)" I'm not really feeling the
>> need for a battery here...
>
> I just tried installing numpy in a
Skip Montanaro wrote:
> >> installing numpy or scipy is generally no more difficult
> >> that executing "pip install (scipy|numpy)"
I described the problems I had trying to follow that advice.
In article ,
Oscar Benjamin wrote:
> You should use apt-get for numpy/scipy on Ubuntu. Although
> un
On 10 August 2013 13:43, Roy Smith wrote:
>
> In article ,
> Oscar Benjamin wrote:
>
>> You should use apt-get for numpy/scipy on Ubuntu. Although
>> unfortunately IIRC this doesn't work as well as it should since Ubuntu
>> doesn't install the appropriate BLAS/LAPACK libraries by default
>> (lea
Hello Python & C-experts.
I'm trying to embed python27.dll in a C-program written in
MingW-gcc 4.7.2. I've successfully done these initial steps:
typedef int (*Py_Main_t) (int argc, char **argv);
handle = LoadLibrary ("python27.dll");
py_main = (Py_Main_t) GetProcAddress (handle, "Py_Main");
Hi Fellow Python Friends,
I am new to Python and recently subscribed to the mailing list.I have a
doubt regarding the basics of Python. Please help me in understanding the
below concept.
So doubt is on variables and their contained value.
Why does in the below example from Interpreter exploratio
On 2013-08-10 21:03, Krishnan Shankar wrote:
> >>> a=10
> >>> id(a)
> 21665504
> >>> b=a
> >>> id(b)
> 21665504
> >>> c=10
> >>> id(c)
> 21665504
>
> I am actually assigning new value to c. But from the value of id()
> all three variables take same location. With variables a and b it
> is ok. But
In article ,
Krishnan Shankar wrote:
> Hi Fellow Python Friends,
>
> I am new to Python and recently subscribed to the mailing list.I have a
> doubt regarding the basics of Python. Please help me in understanding the
> below concept.
>
> So doubt is on variables and their contained value.
>
>
On Sat, Aug 10, 2013 at 4:33 PM, Krishnan Shankar
wrote:
> Hi Fellow Python Friends,
>
> I am new to Python and recently subscribed to the mailing list.I have a
> doubt regarding the basics of Python. Please help me in understanding the
> below concept.
>
> So doubt is on variables and their conta
On 8/10/2013 11:33 AM, Krishnan Shankar wrote:
Hi Fellow Python Friends,
I am new to Python and recently subscribed to the mailing list.I have a
doubt regarding the basics of Python. Please help me in understanding
the below concept.
So doubt is on variables and their contained value.
It woul
Hello,
El 10/08/2013 18:40, Tim Chase escribió:
Generally, if you are using the "is" operator to compare against
anything other than None, you're doing it wrong. There are exceptions
to this, but it takes knowing the particulars.
Now I have one doubt, I use 'is' to compare basic types in pytho
Terry Reedy wrote:
> On 8/10/2013 11:33 AM, Krishnan Shankar wrote:
>> Hi Fellow Python Friends,
>>
>> I am new to Python and recently subscribed to the mailing list.I have a
>> doubt regarding the basics of Python. Please help me in understanding
>> the below concept.
>>
>> So doubt is on variabl
In article ,
Peter Otten <__pete...@web.de> wrote:
> Quoting http://en.wikipedia.org/wiki/Indian_English
>
> """
> doubt = question or query; e.g. one would say, 'I have a doubt' when one
> wishes to ask a question.
> """
>
> I'd say if Brits can cope (hard as it may be) with the American vari
I think I missed an earlier thread of this and I'm not quite sure what
your application is, but properly allocating user permissions on your
databases should eliminate any security concerns there. Also, for the
tunnel, whether you're using one account or multiple (one for each
user), those acco
On Sat, 10 Aug 2013 20:00:58 +0200, Xavi wrote:
> Now I have one doubt, I use 'is' to compare basic types in python 3, for
> example .-
>
> v = []
> if type(v) is list:
> print('Is list...')
No, do not do this. This is unnecessarily restrictive.
> Because I think it is more clear and faste
On Sat, 10 Aug 2013 20:36:52 +0200, Peter Otten wrote:
> Terry Reedy wrote:
>
>> On 8/10/2013 11:33 AM, Krishnan Shankar wrote:
>>> Hi Fellow Python Friends,
>>>
>>> I am new to Python and recently subscribed to the mailing list.I have
>>> a doubt regarding the basics of Python. Please help me in
On 8/10/2013 2:00 PM, Xavi wrote:
Hello,
El 10/08/2013 18:40, Tim Chase escribió:
Generally, if you are using the "is" operator to compare against
anything other than None, you're doing it wrong. There are exceptions
to this, but it takes knowing the particulars.
Now I have one doubt, I use '
On 8/10/2013 2:36 PM, Peter Otten wrote:
Terry Reedy wrote:
On 8/10/2013 11:33 AM, Krishnan Shankar wrote:
Hi Fellow Python Friends,
I am new to Python and recently subscribed to the mailing list.I have a
doubt regarding the basics of Python. Please help me in understanding
the below concept.
I am working on a library, and adding one feature broke a seemingly unrelated
feature. As I already had Test Cases written, I decided to try to incorporate
the logging module into my class, and turn on debugging at the logger before
the newly-broken test.
Here is an example script:
# -
#!/u
In article ,
Josh English wrote:
> I am working on a library, and adding one feature broke a seemingly unrelated
> feature. As I already had Test Cases written, I decided to try to incorporate
> the logging module into my class, and turn on debugging at the logger before
> the newly-broken te
In article ,
Dennis Lee Bieber wrote:
> Because id(n) is not giving you the address of the NAME. It is giving
> you the address of the "10"
Actually, it is giving you the id of the int(10) object. Maybe it's an
address, maybe it's not. Only your implementation knows for sure.
--
http://mail
Peter Otten wrote:
>
> doubt
>
Oh bother, said Pooh, what's in a word ?
http://en.wikipedia.org/wiki/Curry
https://pypi.python.org/pypi/curry/
http://en.wikipedia.org/wiki/Currying
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
--
http://mail.python.org/mailm
On Sat, Aug 10, 2013 at 7:00 PM, Xavi wrote:
> Now I have one doubt, I use 'is' to compare basic types in python 3, for
> example .-
>
> v = []
> if type(v) is list:
> print('Is list...')
>
> Because I think it is more clear and faster than .-
> type(v) == [].__class__ ... or ... isinstance(v
On 08/10/2013 11:00 AM, Xavi wrote:
Hello,
El 10/08/2013 18:40, Tim Chase escribió:
Generally, if you are using the "is" operator to compare against
anything other than None, you're doing it wrong. There are exceptions
to this, but it takes knowing the particulars.
Now I have one doubt, I use
On Sat, Aug 10, 2013 at 10:48 PM, Gary Herron
wrote:
> This is an oversimplification, but generally useful for all beginner (and
> most advanced) programmers:
> Don't use "is" for comparisons. Use "==".
> It 20 years of programming Python, I've *needed* to use "is" ... only once
> or twice.
On Saturday, August 10, 2013 1:40:43 PM UTC-7, Roy Smith wrote:
> In article ,
>
> Josh English wrote:
> The first thing to do is get this down to some minimal amount of code
> that demonstrates the problem.
>
>
>
> For example, you drag in the logging module, and do some semi-complex
> con
Aha. Thanks, Ned. This is the answer I was looking for.
I use logging in the real classes, and thought that turning setting
the level to logging.DEBUG once was easier than hunting down four
score of print statements.
Josh
On Sat, Aug 10, 2013 at 3:52 PM, Ned Batchelder wrote:
> On 8/10/13 4:40
On Saturday, August 10, 2013 1:40:43 PM UTC-7, Roy Smith wrote:
> > For example, you drag in the logging module, and do some semi-complex
> > configuration. Are you SURE your tests are getting run multiple times,
> > or maybe it's just that they're getting LOGGED multiple times. Tear out
> > a
On Sun, Aug 11, 2013 at 12:14 AM, Roy Smith wrote:
> Maybe you've got two different handlers which are both getting the same
> logging events and somehow they both end up in your stderr stream.
> Likely? Maybe not, but if you don't have any logging code in the test
> at all, it becomes impossible
On 8/10/13 4:40 PM, Roy Smith wrote:
In article ,
Josh English wrote:
I am working on a library, and adding one feature broke a seemingly unrelated
feature. As I already had Test Cases written, I decided to try to incorporate
the logging module into my class, and turn on debugging at the log
On Saturday, August 10, 2013 4:14:09 PM UTC-7, Roy Smith wrote:
>
>
> I don't understand the whole SimpleChecker class. You've created a
> class, and defined your own __call__(), just so you can check if a
> string is in a list? Couldn't this be done much simpler with a plain
> old function
On 08/10/2013 03:09 PM, Chris Angelico wrote:
On Sat, Aug 10, 2013 at 10:48 PM, Gary Herron
wrote:
This is an oversimplification, but generally useful for all beginner (and
most advanced) programmers:
Don't use "is" for comparisons. Use "==".
It 20 years of programming Python, I've *neede
On Saturday, August 10, 2013 4:21:35 PM UTC-7, Chris Angelico wrote:
> On Sun, Aug 11, 2013 at 12:14 AM, Roy Smith <> wrote:
>
> > Maybe you've got two different handlers which are both getting the same
> > loggingvents and somehow they both end up in your stderr stream.
> > Likely? Maybe not, bu
On Sun, Aug 11, 2013 at 1:42 AM, Gary Herron
wrote:
> On 08/10/2013 03:09 PM, Chris Angelico wrote:
>> _notpassed = object()
>> def frob(appendage, device=_notpassed):
>> """Use some appendage to frob some device, or None to frob nothing.
>> Omit device to frob whatever is currently held
On Sun, Aug 11, 2013 at 1:52 AM, Josh English
wrote:
> I'm using logging for debugging, because it is pretty straightforward and can
> be activated for a small section of the module. My modules run long (3,000
> lines or so) and finding all those dastardly print statements is a pain, and
> litt
On 8/10/2013 8:42 PM, Gary Herron wrote:
But for each of your examples, using "==" is equivalent to using "is".
Each of
if something == None
if device == _not passed
if device != None
would all work as expected. In none of those cases is "is" actually
needed.
class EqualAll:
On Sun, Aug 11, 2013 at 2:25 AM, Terry Reedy wrote:
> On 8/10/2013 8:42 PM, Gary Herron wrote:
>
>> But for each of your examples, using "==" is equivalent to using "is".
>> Each of
>> if something == None
>> if device == _not passed
>> if device != None
>> would all work as expecte
I am checking my 1292-line script for syntax errors. I ran the following
commands in a terminal to check for errors, but I do not see the error.
collier@Nacho-Laptop:/media/collier/AI/Pysh$ python3 -m py_compile
./beta_engine
File "./beta_engine", line 344
JOB_WRITEURGFILES =
multiproce
On Sun, Aug 11, 2013 at 3:19 AM, Devyn Collier Johnson
wrote:
> am checking my 1292-line script for syntax errors. I ran the following
> commands in a terminal to check for errors, but I do not see the error.
>
> collier@Nacho-Laptop:/media/collier/AI/Pysh$ python3 -m py_compile
> ./beta_engine
>
In article ,
Chris Angelico wrote:
> When you get a syntax error you can't understand, look at the previous
> line of code. Perhaps something there is incomplete; maybe you have
> mismatched parentheses, so this line is considered to be part of the
> same expression.
>
> Next thing to do is spl
On Sun, Aug 11, 2013 at 3:43 AM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> When you get a syntax error you can't understand, look at the previous
>> line of code. Perhaps something there is incomplete; maybe you have
>> mismatched parentheses, so this line is considered to be
On 8/10/2013 10:19 PM, Devyn Collier Johnson wrote:
I am checking my 1292-line script for syntax errors. I ran the following
commands in a terminal to check for errors, but I do not see the error.
collier@Nacho-Laptop:/media/collier/AI/Pysh$ python3 -m py_compile
./beta_engine
File "./beta_en
Thanks Tim,
This takes me to one more question.
'is' operator is used to compare objects and it should not be used to
compare data.
So can it be compared with 'False'.
i.e. Is this code possible
if a is False:
print 'Yes'
if b is False:
print 'No'
Because i recommended this should not
On Sun, Aug 11, 2013 at 4:09 AM, Krishnan Shankar
wrote:
> i.e. Is this code possible
>
> if a is False:
> print 'Yes'
> if b is False:
> print 'No'
You would use that if you want to check if a/b is the exact bool value
False. Normally you would simply spell it thus:
if not a:
print
On 08/10/2013 08:09 PM, Krishnan Shankar wrote:
Thanks Tim,
This takes me to one more question.
'is' operator is used to compare objects and it should not be used to
compare data.
So can it be compared with 'False'.
i.e. Is this code possible
if a is False:
print 'Yes'
if b is False:
On 08/10/2013 06:00 PM, Chris Angelico wrote:
On Sun, Aug 11, 2013 at 1:42 AM, Gary Herron
wrote:
On 08/10/2013 03:09 PM, Chris Angelico wrote:
_notpassed = object()
def frob(appendage, device=_notpassed):
"""Use some appendage to frob some device, or None to frob nothing.
Omit dev
On 08/10/2013 09:09 PM, Krishnan Shankar wrote:
> i.e. Is this code possible
>
> if a is False:
> print 'Yes'
> if b is False:
> print 'No'
>
> Because i recommended this should not be done. But my colleagues say it is
> correct.
You are probably correct in your believe that this idiom
class my_class:
def __init__(self, attr1, attr2):
self.attr1 = attr1 #string
self.attr2 = attr2 #string
def __lt__(self, other):
if self.attr1 < other.attr1:
return True
else:
return self.attr2 < other.attr2
I will run into problems i
On Sun, Aug 11, 2013 at 4:21 AM, Gary Herron
wrote:
> On 08/10/2013 06:00 PM, Chris Angelico wrote:
>> Wrong. If you do equality comparisons, it's entirely possible for
>> something to be passed in that compares equal to the RHS without
>> actually being it, so "is" is precisely what's wanted. (Pl
On Sun, Aug 11, 2013 at 4:41 AM, Jason Friedman wrote:
> class my_class:
> def __init__(self, attr1, attr2):
> self.attr1 = attr1 #string
> self.attr2 = attr2 #string
> def __lt__(self, other):
> if self.attr1 < other.attr1:
> return True
> else:
On 11 August 2013 04:43, Chris Angelico wrote:
> On Sun, Aug 11, 2013 at 4:21 AM, Gary Herron
> wrote:
>> On 08/10/2013 06:00 PM, Chris Angelico wrote:
>>> All it takes is a slightly odd or buggy __eq__ implementation and the
>>> == versions will misbehave. To check if an argument is something, y
On 08/10/2013 08:43 PM, Chris Angelico wrote:
On Sun, Aug 11, 2013 at 4:21 AM, Gary Herron
wrote:
On 08/10/2013 06:00 PM, Chris Angelico wrote:
Wrong. If you do equality comparisons, it's entirely possible for
something to be passed in that compares equal to the RHS without
actually being it,
On Sun, Aug 11, 2013 at 5:04 AM, Joshua Landau wrote:
> On 11 August 2013 04:43, Chris Angelico wrote:
>> The
>> distinction between the two is important when the objects are mutable
>> (so they have an identity that's distinct from their current values).
>
> I don't follow this argument. Tuples
On Sun, Aug 11, 2013 at 5:29 AM, Gary Herron
wrote:
> A beginner, on his first program or two, can understand 1, and perhaps
> parrot 2 without understanding (or needing to). But the step from there to
> 3 is huge. It's folly to dump that on a first-time programmer. (It's
> probably even folly
On Thursday, August 8, 2013 12:50:25 PM UTC+5:30, sagar varule wrote:
> Hi All,
>
>
>
> Im using Paramiko for my SSH automation. Im using method that is shown in
> demo_simple.py example which comes with Paramiko. Below is code from
> demo_simple.py.
>
>
>
> As you can make out, below code
On 11 August 2013 06:18, sagar varule wrote:
> Can any one comment on this..
If you don't get replies here it's probably because no-one knows
Paramiko. I suggest posting elsewhere to see if there are any Paramiko
users in other places willing to help. There might be a Paramiko
mailing list.
You
Basically, I think Twitter's broken.
For my full discusion on the matter, see:
http://www.reddit.com/r/learnpython/comments/1k2yrn/help_with_len_and_input_function_33/cbku5e8
Here's the first post of mine, ineffectually edited for this list:
"""
The obvious solution [to getting the length of a t
63 matches
Mail list logo