On 8/7/19 5:27 PM, Richard Rizk wrote:
> Thank you Cameron for your message.
>
> Please find below the error message i am receiving.
>
> I think the command line i'm running is trying to connect with the
> python3.7 that i have on my computer which is a requirement for the command
> line to work
On 07Aug2019 13:08, Richard Rizk wrote:
I wanted to send you this email to ask if you would have someone that
can solve the problem I'm having with python.
I'm having issues with terminal on mac, is there someone that can help
with this?
I probably can. Is this a Python problem, a Terminal
Cravan wrote:
> Here is the stack overflow link:
> https://stackoverflow.com/questions/56540292/error-when-trying-to-insert-csv-values-into-a-sql-table
>
>
>
> I'm getting a weird error code when I try to store values from a csv into
> an sql table in a movie review assignment.
Like they say
On 21/03/19 05:13, Glenn Dickerson wrote:
Thank you for all of your responses to:
class Student():
def__init__(self, name, major, gpa, is_on_probation):
self.name = name
self.major = major
self.gpa = gpa
self.is_on_probation = is_on_probation
Presumabl
> I don't understand this error message. Thank you so much, Glenn Dickerson
>
> Traceback (most recent call last):
> File "/home/glen/app.py", line 1, in
> import Student
> File "/home/glen/Student.py", line 2
> def__init__(self, name, major, gpa, is_on_probation):
>
On Fri, Nov 30, 2018 at 02:19:25AM +0530, srinivasan wrote:
> Dear Mats,
>
> Thanks a lot for your quick responses, again the below line seems to
> be throwing the same error, is that should I again decode the line
> where am facing the issue to str? or could you please let me if there
> is any al
Dear Mats,
Thanks a lot for your quick responses, again the below line seems to
be throwing the same error, is that should I again decode the line
where am facing the issue to str? or could you please let me if there
is any alternative solution for the same or workaround in python 3.6?
Code Snipp
Dear Python Experts,
With the below code snippet, I am seeing the below error, I am using
python 3.6, could you please what could be the issue?
Code Snippet:
---
import time
import pexpect
import subprocess
import sys
class BluetoothctlError(Exception):
"""This exception is r
On 30Nov2018 02:19, srinivasan wrote:
Thanks a lot for your quick responses, again the below line seems to
be throwing the same error, is that should I again decode the line
where am facing the issue to str? or could you please let me if there
is any alternative solution for the same or workarou
On 11/29/18 12:20 PM, srinivasan wrote:
> Dear Python Experts,
>
> With the below code snippet, I am seeing the below error, I am using
> python 3.6, could you please what could be the issue?
> self.child = pexpect.spawn("bluetoothctl", echo = False)
...
> self.child.send(command
On 11/27/18 5:50 AM, srinivasan wrote:
> Dear Python Experts,
>
> As still I am newbie and learning python, I am trying to reuse the
> Bluetoothctl wrapper in Python from the link (
> https://gist.github.com/egorf/66d88056a9d703928f93) I am using python3.6
> version, In pycharm editor on the bold
On 15/02/18 01:27, Leo Silver wrote:
> Hello.
>
> I'm trying to create a class to represent products which includes a list of
> volume based pricing and sets the first of these as the unit price:
>
> def __init__(self, RatePlanID):
> self.id = RatePlanID
> self.name = RatePlan
Leo Silver wrote:
> Hello.
>
> I'm trying to create a class to represent products which includes a list
> of volume based pricing and sets the first of these as the unit price:
>
> def __init__(self, RatePlanID):
> self.id = RatePlanID
> self.name = RatePlans.toggleids[self.i
On 01/08/17 12:13, rakesh sharma wrote:
> I am getting the error
>
> TypeError: utf_8_decode() argument 1 must be string or buffer, not long
That's not too helpful out of context, can you show us more
of the error trace? Can you show us the method that generates
it? Do you have any indication ab
On 08/01/2017 05:13 AM, rakesh sharma wrote:
> Hi All
>
>
> I am getting an error in python. Its a flask app that I am doing
>
> I am getting the error
>
> TypeError: utf_8_decode() argument 1 must be string or buffer, not long
>
> at this point in the code
>
> ship_schedules = ShipSchedule.q
2017-02-07 16:34 GMT+01:00 Rafael Skovron :
> I'm trying to learn how to use Classes but I keep getting NameErrors no
> matter what code I put into the script.
>
> Any ideas why?
>
> My general workflow is I edit in vim, then invoke python3 interpreter,
> import the module and try to use the Clas
On 2017-02-07 07:34, Rafael Skovron wrote:
I'm trying to learn how to use Classes but I keep getting NameErrors
no
matter what code I put into the script.
Any ideas why?
Assuming the code you've edited using vim is in a file mymodule.py
And after invoking the interpreter you issue the follow
On 07/02/17 15:34, Rafael Skovron wrote:
> My general workflow is I edit in vim, then invoke python3 interpreter,
> import the module and try to use the Class and methods from the class.
>
> For example, importing customer.py and assigning this object yields:
>
rafael = Customer('rafael',10
>
> I began to learn Python and after saving a file gra.py tried to reopen it
> and got an error (in the Annex).
>
> What's the error on re-opening the file ?
Also, share what version of Python, OS and editor you are using.
FYI, this is a text only list, images of attachments will be filtered.
/
On 04/10/16 18:41, Agnieszka Socha wrote:
> I began to learn Python and after saving a file gra.py tried to reopen it
> and got an error (in the Annex).
This is a text only list so attachments tend to get stripped off.
We need a lot more information I'm afraid.
What are you using to "reopen" the
Hi Steven,
Thank you so much for your help. It worked. That was the mistake I had. I
had (i,j) instead of [i,j]
Thanks again
Pooja
On Sat, Sep 10, 2016 at 12:23 PM, Pooja Bhalode
wrote:
> Hi everyone,
>
> I am sorry about the confusion earlier,
> I am trying to run Pyomo environment in Pytho
On 10/09/16 17:23, Pooja Bhalode wrote:
> I am trying to run Pyomo environment in Python on sublime text editor.
OK, For the pyomo stuff you should ask on the pyomo support site
(or I notice they do staxck overflow too)
> Python version of 2.7.11. I am running the code in sublime itself.
You ma
Hi everyone,
I am sorry about the confusion earlier,
I am trying to run Pyomo environment in Python on sublime text editor.
Python version of 2.7.11. I am running the code in sublime itself.
The code is somewhat long, around 200 lines.
I can add snippets of it though.
Code:
m.z = ContinuousSet(
On 2016-09-09 18:13, Steven D'Aprano wrote:
Please read this article first for
how you can improve the chances of getting good answers to your
questions:
http://sscce.org/
In addition to the link Seven provides above, I've also found the
following to be worth perusing:
http://www.catb.org/es
Hi Pooja, and welcome!
On Fri, Sep 09, 2016 at 02:50:57PM -0400, Pooja Bhalode wrote:
> Hi everyone,
>
> I was getting this error which read ' 'IndexedVar' object is not callable '
> for a variable type.
>
> The variable is defined as a class variable and has dimensions m.C(i,j) in
> z and t ax
On 2016-09-09 11:50, Pooja Bhalode wrote:
Hi everyone,
I was getting this error which read ' 'IndexedVar' object is not
callable '
for a variable type.
You haven't provided much information but it seems to me you are calling
IndexedVar as though it were a function but it probably isn't a
f
On 09/09/16 19:50, Pooja Bhalode wrote:
> I was getting this error which read ' 'IndexedVar' object is not callable '
> for a variable type.
Python error messages are very informative, but only if we can see them.
Please post the entire error message not just a summary.
> The variable is defined
On 30/08/16 03:22, Matthew Lehmberg wrote:
I've been getting this error over and over and was wondering if someone
could help me fix it. [image: Inline image 1]
This is a text mailing list so attachments dont get through.
Plese repost with your error message cut n paste into the message.
Alan
>
> Have you checked that you have the requisite permissions? That the
> socket you are connecting to exists? If its a system call error the
> problem is most likely in your environment rather than your code.
>
That particular error is from Windows. One common cause for it is a
network firewall,
On 06/07/16 18:27, Moses, Samuel wrote:
> I am getting an error. I tired to run the script in wing IDE.
>
Without the accompanying code we can only guess.
> I am getting this error,
>
> "Traceback (most recent call last):
> File "C:\Program Files (x86)\Wing IDE 5.1\bin\wingdb.py", line 822,
> You need to state some definitions so that we are sharing common
> terminology. What does "skew" mean, for example?
Note to others: I'm guessing that this has something to do with GC
skew as described in https://en.wikipedia.org/wiki/GC_skew. But I'd
rather not guess. I'd like Riaz to explain
On Sun, Jun 19, 2016 at 10:38 PM, riaz tabassum wrote:
> Sir i have a problem to solve to python code. I have attached the pic of
> problem statement.
Hi Riaz,
Often when you're asking a question, starting with presentation of the
code is often the wrong order to attack a problem.
The reason
riaz tabassum wrote:
> Sir i have a problem to solve to python code. I have attached the pic of
> problem statement.
This is a text-only mailing list. Please describe the problem you are trying
to solve in plain English. Thank you.
> code which i write is pasted here.
> "def Skew(Genome):
>
> By the way, please use copy-and-paste when showing the inputs and
> outputs of what you're doing. You should try to show verbatim output
> for any bug report or request for technical help. If you don't, you
> can easily introduce mistakes that make it hard to diagnose what's
> going on.
I can
On Tue, Jan 13, 2015 at 9:13 AM, Arvind Ramachandran
wrote:
> Hi All
>
>
> I am trying to get import cx_oracle work on my windows laptop
>
> I installed cx_Oracle-5.1.2-10g.win32-py2.7 on my laptop which is 64 bit as
> the 64 bit msi seem to be specific for AMD desktops
>
> Anyways after installe
:)
On Thu, Jan 8, 2015 at 3:02 AM, Danny Yoo wrote:
> >>> How I fix this error? when I open my python project (.py) it closes
> >>> immediately.
> >>
> >> Since the op sent from Windows, I'm guessing he isn't opening up a cmd
> >> window then running his program. But I'm not a windows guy latel
>>> How I fix this error? when I open my python project (.py) it closes
>>> immediately.
>>
>> Since the op sent from Windows, I'm guessing he isn't opening up a cmd
>> window then running his program. But I'm not a windows guy lately.
>> Perhaps someone can tell him how to invoke the program?
I
On Wed, Jan 7, 2015 at 1:06 PM, Alan Gauld
wrote:
> On 08/01/15 01:14, ishay.yem...@gmail.com wrote:
>
>> How I fix this error? when I open my python project (.py) it closes
>> immediately.
>>
>> please help. /:
>>
>
>
> Since the op sent from Windows, I'm guessing he isn't opening up a cmd
windo
On 08/01/15 01:14, ishay.yem...@gmail.com wrote:
How I fix this error? when I open my python project (.py) it closes immediately.
please help. /:
You need to tell us a lot more.
What does your project code do? What does it look like? Can you
send a small example that shows this error?
What
On Thu, Jan 08, 2015 at 01:14:46AM +, ishay.yem...@gmail.com wrote:
> How I fix this error? when I open my python project (.py) it closes
> immediately.
>
> please help. /:
You have given us no information to work with. You might as well have
said "my program doesn't work, please fix it"
On 08/01/2015 01:14, ishay.yem...@gmail.com wrote:
How I fix this error? when I open my python project (.py) it closes immediately.
please help. /:
Please provide us with your OS, Python version, the code that produced
this error and the entire traceback.
--
My fellow Pythonistas, ask not
Felisha Lawrence Wrote in message:
> Hello,
> I am trying to install a version of pyart in OSX and I keep getting this
> error
>
> --
> ImportError Traceback (most recent call last)
> in ()
>
On Tue Nov 11 2014 at 5:17:53 PM Felisha Lawrence <
felisha.lawre...@gmail.com> wrote:
> Hello,
> I am trying to install a version of pyart in OSX and I keep getting this
> error
>
> --ImportError
>
I'm so sorry for late reply, my laptop broken, the code actually I already
put in thread before so I'll copy to here..
I don't know how to get pixel, I just searched and many link using
'getPixel' to get value of pixel..
I know color frame using 3 channel B G R to get pixel, but I just want to
get
Hi Richard,
I would recommend asking the PyGame folks on this one. What you're
running into is specific to that external library, and folks who work
with PyGame have encountered the problem before: they'll know how to
diagnose and correct it. For example:
http://stackoverflow.com/questions
urces richardkentish$
I installed the python files from the python site, latest version for mac.
Best wishes,
Richard
From: Steven D'Aprano
To: tutor@python.org
Sent: Sunday, 10 August 2014, 12:30
Subject: Re: [Tutor] Error message
On Sun, Aug 10, 201
Hi All,
I have found a work around - not entirely sure what I did but followed this
website
http://www.reddit.com/r/pygame/comments/21tp7n/how_to_install_pygame_on_osx_mavericks/
Still can't run through idle but dragging the saved .py file to the python
launcher works!
Thanks for your help.
Thanks you to the list for helping me solve my problem. I never
had problem using and printing on paper "pr.write" in my coding
until this latest one popped up. Yeah, this old dog is still
learning new tricks here. LOL.
Again, thanks.
Ken
___
Tutor m
On 08/10/2014 10:38 AM, Alex Kleider wrote:
On 2014-08-10 06:41, Ken G. wrote:
Receiving the following error from the terminal screen:
Traceback (most recent call last):
File "Blood Pressure05Print45.py", line 95, in
pr.write(totalSystolic)
TypeError: expected a character buffer object
Por
Ken G. wrote:
> Receiving the following error from the terminal screen:
>
> Traceback (most recent call last):
>File "Blood Pressure05Print45.py", line 95, in
> pr.write(totalSystolic)
> TypeError: expected a character buffer object
>
> Portion of strip:
> =
>
> pr.wri
On Sun, Aug 10, 2014 at 10:32:52AM +0100, RICHARD KENTISH wrote:
> Hi!
>
> Ive installed Python 2.7.8 and pygame 1.9.1 onto a macbook pro 10.9.4
> Mavericks.
>
> The code is taken direct from the 'making games' book. Here it is pasted from
> idle:
Whenever you have a mysterious error in Python
On Thu, Aug 07, 2014 at 06:49:02PM +0700, Whees Northbee wrote:
> Please help me... I'm using python 2.7.6, numpy 1.8.1, opencv 2.4.9..
> I want to get pixel value in one number like 255 not each value like these
> R(190), G(23), B(45) from coordinate (x,y)...
> I try these code
> m_samples[k][i][j
On Thu, Aug 7, 2014 at 7:49 AM, Whees Northbee wrote:
> Please help me... I'm using python 2.7.6, numpy 1.8.1, opencv 2.4.9..
> I want to get pixel value in one number like 255 not each value like these
> R(190), G(23), B(45) from coordinate (x,y)...
> I try these code
> m_samples[k][i][j]=getPixe
On 07/08/14 12:49, Whees Northbee wrote:
Please help me... I'm using python 2.7.6, numpy 1.8.1, opencv 2.4.9..
I want to get pixel value in one number like 255 not each value like
these R(190), G(23), B(45) from coordinate (x,y)...
What do you expect that number to look like? The pixels are rep
@All Thanks a lot,
Yes "set -e" It work fine. This is what I am looking for but I got some
extra things to learn :) .
Thanks you again
Thanks
Jitendra
On Thu, Jul 24, 2014 at 6:10 PM, Wolfgang Maier <
wolfgang.ma...@biologie.uni-freiburg.de> wrote:
> On 24.07.2014 14:37, Chris “Kwpolska” Warr
On 24.07.2014 14:37, Chris “Kwpolska” Warrick wrote:
It’s recommended to switch to the [[ syntax anyways, some people
consider [ deprecated. Also, [ is actually /bin/[ while [[ lives in
your shell (and is therefore faster).
About the equals sign, == is the preferred syntax, and = is also
consi
On Thu, Jul 24, 2014 at 2:23 PM, Wolfgang Maier
wrote:
> On 24.07.2014 14:19, Chris “Kwpolska” Warrick wrote:
>>
>>
> python test.py
> if [ $? = 0 ]; then
> python second.py
> fi
>
> as your shell script.
The [ ] and = should be doubled.
>>>
>>>
>>
On 24.07.2014 14:19, Chris “Kwpolska” Warrick wrote:
python test.py
if [ $? = 0 ]; then
python second.py
fi
as your shell script.
The [ ] and = should be doubled.
?? why that ?
Double brackets can do more:
http://stackoverflow.com/questions/2188199/how-to-use-double-or-single-br
On Thu, Jul 24, 2014 at 2:14 PM, Wolfgang Maier
wrote:
> On 24.07.2014 14:09, Chris “Kwpolska” Warrick wrote:
>>
>> On Thu, Jul 24, 2014 at 2:01 PM, Wolfgang Maier
>> wrote:
>>>
>>> Try something like this (assuming bash):
>>>
>>> python test.py
>>> if [ $? = 0 ]; then
>>> python second.py
>
On 24.07.2014 14:09, Chris “Kwpolska” Warrick wrote:
On Thu, Jul 24, 2014 at 2:01 PM, Wolfgang Maier
wrote:
Try something like this (assuming bash):
python test.py
if [ $? = 0 ]; then
python second.py
fi
as your shell script.
The [ ] and = should be doubled.
?? why that ?
But all th
On Thu, Jul 24, 2014 at 2:01 PM, Wolfgang Maier
wrote:
> Try something like this (assuming bash):
>
> python test.py
> if [ $? = 0 ]; then
> python second.py
> fi
>
> as your shell script.
The [ ] and = should be doubled. But all this is not needed, all you need is:
python test.py && python
On Thu, Jul 24, 2014 at 05:05:24PM +0530, jitendra gupta wrote:
> Hi All
>
> My shell script is not throwing any error when I am having some error in
> Python code.
This is a question about the shell, not about Python. I'm not an expert
on shell scripting, but I'll try to give an answer.
> ~~
On 24.07.2014 13:35, jitendra gupta wrote:
Hi All
My shell script is not throwing any error when I am having some error
in Python code.
test.py ~~
def main():
print "Test"
#some case error need to be thrown
raise Exception("Here is error")
if __name__ == "__main__"
On Thu, Jul 24, 2014 at 1:35 PM, jitendra gupta wrote:
> Hi All
>
> My shell script is not throwing any error when I am having some error in
> Python code.
>
> In this case, I dont want to run my second.py
> Even I am throwing error from my test.py, but still second.py is getting
> executed, whic
On 05/06/14 23:36, Colin Ross wrote:
I am attempting to run the following in python:
|from scipyimport interpolate|
This list is for those learning the core Python language and its
standard library.
Support for scipy is probably best gained from the scipy forum
The MacPython list may also
On 21/04/14 19:41, Geocrafter . wrote:
im trying to make a board, and is detecting the pieces. Here is my
code:http://pastebin.com/L3tQLV2g And here is the error:
http://pastebin.com/4FiJmywL Do you knwo hwo to fix it?
You are passing in a cell location that results in an index out of range.
Hello Zoya, and welcome!
On Sun, Aug 18, 2013 at 10:18:06AM -0700, Zoya Tavakkoli wrote:
> Hi everyone
>
> I write this code for color segmentation ,but after Run I recived this
> error:
>
> SyntaxError: 'break' outside loop
>
> I could not resolve that ,could you please help me?
Is the error
On 2013-08-19 10:55, Chris Down wrote:
> On 2013-08-18 10:18, Zoya Tavakkoli wrote:
> > if k == 27:
> >
> > break
>
> Well, you're not in a function here, so break doesn't make any sense. What is
> it that you want to do?
s/function/loop/
pgpV6iNWSeUjo.pgp
Description: PGP signature
___
On 2013-08-18 10:18, Zoya Tavakkoli wrote:
> if k == 27:
>
> break
Well, you're not in a function here, so break doesn't make any sense. What is
it that you want to do?
pgpYkuuMtY52T.pgp
Description: PGP signature
___
Tutor maillist - Tutor@python.o
On 7/2/2013 4:22 PM, Jack Little wrote:
I know the code is correct
As Joel said- how could it be, since you do not get the desired results?
When posting questions tell us:
- what version of Python?
- what operating system?
- what you use to edit (write) your code
- what you do to run your code
On Tue, Jul 2, 2013 at 4:22 PM, Jack Little wrote:
> The player has an option to upgrade or not. I know the code is correct,
> but it doesn't send the player to the shop. Here is the code:
>
> def lvl3_2():
> print "You beat level 3!"
> print "Congratulations!"
> print "You have liber
On 02/07/13 21:22, Jack Little wrote:
The player has an option to upgrade or not. I know the code is correct,
but it doesn't send the player to the shop.
So what does it do?
def lvl3_2():
print "You beat level 3!"
print "Congratulations!"
print "You have liberated the Bristol C
Thank you everyone for your help with my question - I understand what I was
doing wrong now. I know I'm posting wrongly so I'm going to go and figure out
how to do it properly for the future. Have a great day.
___
Tutor maillist - Tutor@python.org
To
>Hi Victoria. im a total beginner aswell but i noticed something. shouldnt this
>line:
else: return s(0) == s(-1) and isPalindrome (s[1:-1])
be
else: return s[0] == s[-1] and isPalindrome (s[1:-1])
it looks like you have the string s as a function which you are trying
to call. what you wante
On 24/08/2012, Victoria Homsy wrote:
>
> However, this does not work - I get another error message.
> Could somebody advise what I'm doing wrong here? Thank you.
1) You are not carefully reading the entire error message.
2) You are not allowing us to do it either.
Some other things too, probably
On 08/23/2012 11:33 AM, Victoria Homsy wrote:
>
> Dear All - sorry to bother you. I just tried to run this program:
>
>
> def isPalindrome(s):
> if len(s) <= 1: return True
> else: return s[0] == s[-1] and isPalindrome (s[1:-1])
> isPalindrome('aba')
>
>
> However when I run it in terminal it does
On 23/08/2012 16:33, Victoria Homsy wrote:
Dear All - sorry to bother you. I just tried to run this program:
def isPalindrome(s):
if len(s) <= 1: return True
else: return s[0] == s[-1] and isPalindrome (s[1:-1])
isPalindrome('aba')
However when I run it in terminal it doesn't give me any
On 24/08/12 01:33, Victoria Homsy wrote:
Dear All - sorry to bother you. I just tried to run this program:
def isPalindrome(s):
if len(s)<= 1: return True
else: return s[0] == s[-1] and isPalindrome (s[1:-1])
isPalindrome('aba')
However when I run it in terminal it doesn't give me any answer
Excellent - thank you so much everyone. All is clear now!!
From: Mark Lawrence
To: tutor@python.org
Sent: Thursday, 23 August 2012, 15:29
Subject: Re: [Tutor] Error message...
On 23/08/2012 15:17, Victoria Homsy wrote:
> Dear all,
>
> Sorry to b
On 23/08/2012 15:17, Victoria Homsy wrote:
Dear all,
Sorry to bother you with a beginner's problem again...
You're welcome as that's what we're here for.
I have tried to write a program that can check if a string is a palindrome. My
code is as follows:
def isPalindrome(s):
if len(s) <= 1
On 23 August 2012 15:17, Victoria Homsy wrote:
>
> def isPalindrome(s):
> if len(s) <= 1: return True
> else: return s(0) == s(-1) and isPalindrome (s[1:-1])
>
> I don't see why this wouldn't work...
>
> Many thanks in advance.
>
> Kind regards,
>
> Victoria
>
Parentheses are used for function
Victoria Homsy wrote:
> Sorry to bother you with a beginner's problem again...
This is the place for beginners.
> I have tried to write a program that can check if a string is a
> palindrome. My code is as follows:
>
>
> def isPalindrome(s):
> if len(s) <= 1: return True
> else: retur
On Mon, Aug 20, 2012 at 11:21 PM, Steven D'Aprano wrote:
>
> Indentation has meaning in Python. When you send email, if your email
> program (possibly GMail?) mangles the indentation, your code will become
> invalid, unreadable mess. You need to fix this. Often the easiest way to fix
> this is to
On 21/08/12 06:24, Osemeka Osuagwu wrote:
[...]
p.s I apologise for the lack of comments
Don't apologise for lack of comments, apologise for posting in HTML which
causes your code to be mangled, leading indentation stripped, and generally
turned into an unreadable mess.
Indentation has mean
On Monday 2012 August 20 14:27, Mark Lawrence wrote:
> Give a man a fish, and you feed him for a day; show him how to catch
> fish, and you feed him for a lifetime.
>
> --
> Cheers.
>
> Mark Lawrence.
Teach a man to steal fish and he will live until he dies.
--
Yonder nor sorghum stenches shut l
On 20/08/2012 22:06, Rob Day wrote:
Your problem is in this line, as the traceback shows:
return reduce(lambda x,y:x*y, [data[row][i] for i in range(col, col+4)])
So the thing you have to think about is - what values can col be? The
answer is then in this line:
for col in range(len(data[r
Your problem is in this line, as the traceback shows:
> return reduce(lambda x,y:x*y, [data[row][i] for i in range(col, col+4)])
>
>
So the thing you have to think about is - what values can col be? The
answer is then in this line:
for col in range(len(data[row]))
And since each row of your dat
On 20/08/2012 21:24, Osemeka Osuagwu wrote:
Dear Pythonistas (I hope you don't mind that),
I wrote the following code to find the four adjacent numbers (in any
direction in the array) which, when multiplied together, would yield the
I can't see a Python array anywhere. Do you mean the list of
On 16 May 2012 20:37, Alan Gauld wrote:
> On 16/05/12 12:37, Sarma Tangirala wrote:
>
>>But I do have another question. Maybe this is a misunderstanding
>>about the MimeText type, but why does MimeText care about the To
>>field when the actually sending is being done by SMTP?
>>
>
>
On 16/05/12 12:37, Sarma Tangirala wrote:
But I do have another question. Maybe this is a misunderstanding
about the MimeText type, but why does MimeText care about the To
field when the actually sending is being done by SMTP?
OK. That was a stupid question. Sorry for the noise. Pl
On 16 May 2012 17:04, Sarma Tangirala wrote:
> Hi Walter,
>
>
>> All the headers in the MimeText object needs to be strings. You can't
>> directly pass a list object containing multiple recipients to the "To"
>> header of your MimeText object on line 31 in your code, and expect it to
>> work. Y
Hi Walter,
> All the headers in the MimeText object needs to be strings. You can't
> directly pass a list object containing multiple recipients to the "To"
> header of your MimeText object on line 31 in your code, and expect it to
> work. You've got to instead first convert the list to valid st
Hi Sarma
On 16 May 2012 11:13, Sarma Tangirala wrote:
> Hey guys,
>
> I was just trying out SMTP and I keep getting a attribute error,
> *AttributeError:
> 'list' object has no attribute 'lstrip''*, when I use a list to store the
> send address.
>
> Code - http://pastebin.com/9NmCNdRb
>
> Trace
Rogelio wrote:
> If I want to write this command to a file, would this be the right format?
>
> *
> import subprocess
>
> (all my variables defined okay)
>
> perl_script=subprocess.call(['perl',perl_prog,ipfile,cmd,user,timeout,])
>
> log=open('/tmp/pythonOutput
If I want to write this command to a file, would this be the right format?
*
import subprocess
(all my variables defined okay)
perl_script=subprocess.call(['perl',perl_prog,ipfile,cmd,user,timeout,])
log=open('/tmp/pythonOutput.txt',w)
log.write(subprocess.call(p
On Sun, May 6, 2012 at 8:23 PM, Martin A. Brown wrote:
> Or, if I were in your shoes, I would do something a bit more like
> this:
>
> cmd = [ '/usr/bin/perl', '/path/to/perlprog.pl', '-h' ]
> subprocess.call(cmd)
Thank you, Martin. This was helpful. Installed Strace and found out
that I mis
Hello,
: perl_prog = "perl perlprog.pl"
: perl_prog_h ="-h"
: #this is where it breaks
: subprocess.call([perl_prog, perl_prog_h])
This is asking your Linux to search your $PATH and execute a program
called:
'perl perlprog.pl'
Rather than to execute a program called 'perl' and pass as t
On Sun, Mar 25, 2012 at 12:54 PM, Michael Lewis wrote:
> In the below block, why is the if statement e.errno != errno.EEXIST?
> Why can the errno be both before and after the "."?
>
>
>
> import os, errno
> try:
> os.makedirs('a/b/c')
> except OSError, e:
> if e.errno != errno.EEXIST:
>
On 25/03/2012 08:22, Russel Winder wrote:
Michael,
On Sat, 2012-03-24 at 15:20 -0700, Michael Lewis wrote:
[...]
It is perhaps worth noting that in Python 3, the syntax has changed:
import os, errno
try:
os.makedirs('a/b/c')
except OSError, e:
except OSError as e :
if e.errno
Michael,
On Sat, 2012-03-24 at 15:20 -0700, Michael Lewis wrote:
[...]
It is perhaps worth noting that in Python 3, the syntax has changed:
> import os, errno
> try:
>
> os.makedirs('a/b/c')
> except OSError, e:
except OSError as e :
>
> if e.errno != errno.EEXIST:
>
> raise
1 - 100 of 194 matches
Mail list logo