On Wed, 10 Aug 2016 06:20 am, Ltc Hotspot wrote:
> Hi, Everyone:
>
> What is the source of the following,
> 'error message: SyntaxError: invalid syntax (, line 2)'
>
> v. Python 3.3
>
> Code reads:
>
> x=1
> if x==1
> # indent 4 spaces
> print "x = 1"
>
> Hal
The error message tells
On 09Aug2016 20:22, Rob Gaddi wrote:
Ltc Hotspot wrote:
What is the source of the following,
'error message: SyntaxError: invalid syntax (, line 2)'
v. Python 3.3
Code reads:
x=1
if x==1
# indent 4 spaces
print "x = 1"
A missing colon, the appropriate location of which is left as an
Ltc Hotspot wrote:
> Hi, Everyone:
>
> What is the source of the following,
> 'error message: SyntaxError: invalid syntax (, line 2)'
>
> v. Python 3.3
>
> Code reads:
>
> x=1
> if x==1
> # indent 4 spaces
> print "x = 1"
>
> Hal
A missing colon, the appropriate location of which is left
Success.
Whats happening is that the second wget command is not recognizing the
--no-check-certificate. So I went around the problem and installed it manually.
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.zip
--no-check-certificate
unzip setuptools-7.0.zip
python2.7
Hi Chris,
Yep that got me closer. I found that using | sudo python2.7 was a bad command.
So I changed over to | python2.7.
[root@myserver tmp]# wget https://bootstrap.pypa.io/ez_setup.py
--no-check-certificate -O - | python2.7
--2014-12-01 12:57:07-- https://bootstrap.pypa.io/ez_setup.py
Re
On Tue, Dec 2, 2014 at 3:58 AM, wrote:
> Getting an error when I try to install ez_setup.py. I thought that this was
> an issues with an incorrect version of python, so I upgraded to 2.7.5
> successfully. But unfortunately I get the same error.
>
>
> File "", line 51
> with archive_cont
On Thu, 14 Nov 2013 07:05:08 -0800, johannes.gunz97 wrote:
> Am Donnerstag, 12. März 2009 07:57:11 UTC+1 schrieb Henrik Bechmann:
>> obviously total mewbiew:
>>
>> My first program in Python Windows
>>
>> print "Hello World"
>>
>> I select Run/Run Module and get an error:
>>
>> Syntax error, w
On 11/14/2013 10:05 AM, johannes.gun...@gmail.com wrote:
Am Donnerstag, 12. März 2009 07:57:11 UTC+1 schrieb Henrik Bechmann:
obviously total mewbiew:
My first program in Python Windows
print "Hello World"
I assume you are running Python 3 in which case you need
print("Hello World")
--
Bob
Am Donnerstag, 12. März 2009 07:57:11 UTC+1 schrieb Henrik Bechmann:
> obviously total mewbiew:
>
> My first program in Python Windows
>
> print "Hello World"
>
> I select Run/Run Module and get an error:
>
> Syntax error, with the closing quote highlighted.
>
> Tried with single quotes as wel
On Thursday, March 12, 2009 3:25:53 PM UTC+8, John Machin wrote:
> On Mar 12, 5:57 pm, Henrik Bechmann wrote:
> > obviously total mewbiew:
> >
> > My first program in Python Windows
>
> What is that you are callind "Python Windows"? What version of Python
> are you running?
>
> 2.X: print "Hello
Thanks a lot guys. Seriously when u get stuck on such issues it really
drives u nuts and that is when this awesome comes to the rescue.
This python mailing list rocks.
On Wed, Nov 7, 2012 at 4:31 PM, Roy Smith wrote:
> In article ,
> Demian Brecht wrote:
>
> > On 2012-11-07, at 3:17 PM, Smara
In article ,
Demian Brecht wrote:
> On 2012-11-07, at 3:17 PM, Smaran Harihar wrote:
> > Any idea where am I going wrong?
>
> Looks like you're missing a closing parenthesis:
What I find is useful in situations like this is to just let emacs
auto-indent the code. When it starts indenting (o
On Wed, Nov 7, 2012 at 11:17 PM, Smaran Harihar
wrote:
> Hi guys,
>
> I am stuck in one of those non identifiable error location in the code. The
> code keeps giving invalid syntax. This is my code.
>
> I am using the same code for another code and not sure why this is not
> working. This is the t
On 2012-11-07, at 3:17 PM, Smaran Harihar wrote:
> Any idea where am I going wrong?
Looks like you're missing a closing parenthesis:
w.record(collection[i][0], MAT[0], TSD[0], AnnTMin[0], ANNPREC[0],
float(collection[i][2]), float(collection[i][1])
should be
w.record(collection[i][0], MAT[0]
On Sat, Mar 10, 2012 at 6:17 AM, Günther Dietrich
wrote:
> In article
> <46758542-1bd6-43fe-8e80-bcf14b7d8...@pi6g2000pbc.googlegroups.com>,
> sl33k wrote:
>
>>I'm trying project euler problem 3 and I've hit the wall with this
>>error. What could be the problem here?
>>
>> l=[]
> num=6008514
In article
<46758542-1bd6-43fe-8e80-bcf14b7d8...@pi6g2000pbc.googlegroups.com>,
sl33k wrote:
>I'm trying project euler problem 3 and I've hit the wall with this
>error. What could be the problem here?
>
> l=[]
num=600851475143
i=1
while i<=num:
>... if num%i==0:
>...
在 2012年3月10日星期六UTC+8下午8时34分35秒,sl33k写道:
> I'm trying project euler problem 3 and I've hit the wall with this
> error. What could be the problem here?
>
> l=[]
> >>> num=600851475143
> >>> i=1
> >>> while i<=num:
> ... if num%i==0:
> ... l.append(i)
> ... i+=1
> ... print max(l)
>
Just checked my version. Its showing 2.6.5.
>>> sys.version
'2.6.5 (r265:79063, Apr 16 2010, 13:09:56) \n[GCC 4.4.3]'
--
http://mail.python.org/mailman/listinfo/python-list
2012/3/10 sl33k :
> I'm trying project euler problem 3 and I've hit the wall with this
> error. What could be the problem here?
>
> l=[]
num=600851475143
i=1
while i<=num:
> ... if num%i==0:
> ... l.append(i)
> ... i+=1
> ... print max(l)
> File "", line 5
> prin
On 3/10/2012 6:34 AM, sl33k wrote:
> I'm trying project euler problem 3 and I've hit the wall with this
> error. What could be the problem here?
>
> l=[]
num=600851475143
i=1
while i<=num:
> ... if num%i==0:
> ... l.append(i)
> ... i+=1
> ... print max(l)
> File "
Its an indentation error
--
A-M-I-T S|S
--
http://mail.python.org/mailman/listinfo/python-list
How about you just isolate the first few lines
On Thu, Jan 14, 2010 at 2:43 PM, Ray Holt wrote:
> try:
> #open file stream
> file = open(file_name, "w"
> except IOError:
> print "There was an error writing to", file_name
> sys.exit()
Notice anything now? Something missing perhaps
Ray Holt wrote:
Why am I getting an invalid systax on the first except in the following
code. It was copid from the python tutorial for beginners. Thanks, Ray
import sys
try:
#open file stream
file = open(file_name, "w"
[snip]
Missing ")".
--
http://mail.python.org/mailman/listinfo/py
On Sun, Dec 20, 2009 at 08:40:05AM -0500, Ray Holt wrote:
> Why am I getting an invalid syntax error on the following:
> os.chdir(c:\\Python_Modules). The error message says the colon after c
You need to pass either a string literal or a variable. If you're
passing a string, like you are trying t
On Sun, 20 Dec 2009 08:40:05 -0500
"Ray Holt" wrote:
> Why am I getting an invalid syntax error on the following:
> os.chdir(c:\\Python_Modules). The error message says the colon after c is
You forgot the quotes around the string. I am not on Windows but I
think the following will all work.
os.
Putting quotemarks "" around the path would be a good start, I think.
Cheers,
Xav
On Sun, Dec 20, 2009 at 11:40 PM, Ray Holt wrote:
> Why am I getting an invalid syntax error on the following:
> os.chdir(c:\\Python_Modules). The error message says the colon after c is
> invalid syntax. Why is
On Thursday 12 March 2009 07:45:55 am Dotan Cohen wrote:
> I do not think that is the best way to go about learning Python. Why
> learn an arguably depreciating version when the new version is
> available.
Because it is not only the language that matters, you also need the libraries
to accomplis
On Mar 12, 7:45 am, Dotan Cohen wrote:
> > Welcome to the list. As a newbie myself, I ran into the Python3 vrs
> > 2.6 issue. May I suggest starting with 2.6? There is many more books
> > and internet stuff you can learn with in 2.6 - and the examples will
> > work. As Garry wrote, once you und
On 12 Mar, 12:45, Dotan Cohen wrote:
>
[starting with 2.6]
> I do not think that is the best way to go about learning Python. Why
> learn an arguably depreciating version when the new version is
> available. I agree that there are not many tutorial written for Python
> 3 however there are enough
> Welcome to the list. As a newbie myself, I ran into the Python3 vrs
> 2.6 issue. May I suggest starting with 2.6? There is many more books
> and internet stuff you can learn with in 2.6 - and the examples will
> work. As Garry wrote, once you understand 2.6, 3.0 will not be a
> challenge.
>
I
On Mar 12, 2:25 am, John Machin wrote:
> On Mar 12, 5:57 pm, Henrik Bechmann wrote:
>
> > obviously total mewbiew:
>
> > My first program in Python Windows
>
> What is that you are callind "Python Windows"? What version of Python
> are you running?
>
> 2.X: print "Hello World"
> should work.
>
>
On Mar 12, 5:57 pm, Henrik Bechmann wrote:
> obviously total mewbiew:
>
> My first program in Python Windows
What is that you are callind "Python Windows"? What version of Python
are you running?
2.X: print "Hello World"
should work.
3.X: print is now a function,
print("Hello World")
should wor
> obviously total mewbiew:
>
> My first program in Python Windows
>
> print "Hello World"
>
> I select Run/Run Module and get an error:
>
> Syntax error, with the closing quote highlighted.
>
> Tried with single quotes as well. Same problem.
>
> Can someone explain my mistake?
Are you using python
Henrik Bechmann wrote:
obviously total mewbiew:
My first program in Python Windows
print "Hello World"
I select Run/Run Module and get an error:
Syntax error, with the closing quote highlighted.
Tried with single quotes as well. Same problem.
Can someone explain my mistake?
You are app
34 matches
Mail list logo