C:\coderoot\python3\level1>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
/windows 10 x64
new to python, but not really new to programming.
going through the beginners docs
On 23/07/17 07:26, N6Ghost wrote:
>
> f = open("C:\coderoot\python3\level1\inputfile.txt", 'r')
> for line in file:
Note that you have no variable called 'file'.
So this line doesn't make sense.
> for line in f:
> print(line.rstripe())
This bit will work if you omit the line abov
> for line in file:
This line is not required as the you have opened your file to 'f'.
'file' is a built-in class. Type -
help(file)
on the interpreter to know more about it.
> for line in f:
> print(line.rstripe())
> f.close()
Are you sure that you need to close the file aft
N6Ghost wrote:
> C:\coderoot\python3\level1>python
> Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
> /windows 10 x64
>
> new to python, but not really new to programming.
>
>
On 2017-07-23 01:06, Anish Tambe wrote:
for line in file:
This line is not required as the you have opened your file to 'f'.
'file' is a built-in class. Type -
help(file)
on the interpreter to know more about it.
This appears to be true in python2x but not in python3:
alex@X301n3:~$ python3
On 07/23/2017 09:16 AM, Alex Kleider wrote:
> On 2017-07-23 01:06, Anish Tambe wrote:
>>> for line in file:
>>
>> This line is not required as the you have opened your file to 'f'.
>> 'file' is a built-in class. Type -
>> help(file)
>> on the interpreter to know more about it.
>
> This appears to
Deepen Patel wrote:
> Hi,
>
> I got error like Import error.
>
> Traceback (most recent call last):
> File "startnode.py", line 8, in
> from twisted.conch import manhole, manhole_ssh
> File
> "/usr/local/lib/python2.7/dist-packages/twisted/conch/manhole_ssh.py",
> line 14, in
> fro
Hi,
I got error like Import error.
Traceback (most recent call last):
File "startnode.py", line 8, in
from twisted.conch import manhole, manhole_ssh
File
"/usr/local/lib/python2.7/dist-packages/twisted/conch/manhole_ssh.py", line
14, in
from twisted.conch.ssh import factory, session
The last python issue i'd like to resolve is the OpenCV issue
I just want some nice opencv tutorials apart from the official docs
also, some nice algos if any apart from Haar Cascades with examples.
P.s. This is a 3rd party lib, so, some links is fine !
Abdur-Rahmaan Janhangeer,
Mauritius
abdur
Thanks everybody, i wanted to get some pythonic ideas.
yes forgot that
assert(... is liked by some strongly typed programmers
anInt -> did not not some people liked tha
data encapsulation might be depressing to some migrating coders
ah pylint yes, great checker ! *some guys thought of inventin
Hi Deepen,
Without any more information, it looks like you didn't install cryptography
into your virtualenv. How did you install twisted?
Alex
On Sun, Jul 23, 2017 at 12:24 PM, Deepen Patel wrote:
> Hi,
>
> I got error like Import error.
>
> Traceback (most recent call last):
> File "startno
Forwarding to list,
please use ReplyAll or ReplyList when responding to the list.
Forwarded Message
I also tried the correct command for the mac ox s in terminal shell,
running:
Jims-MacBook-Pro-2:~ Jim$
PYTHONPATH="/Users/Jim/Documents/illustris_python:$PYTHONPATH
> export
Forwarding to list
Forwarded Message
I did use the pip command and am attempting to add the files to my
python path. I used
import sys
sys.path.append("/Users/Jim/Documents/illustris_python")
and that worked. I even checked to make sure the files were there
import sys
pri
Hello!
1. I have Python3 installed on my 2017 MacBook Pro. I know that it is
successfully installed because, when I enter “Python3’ into my terminal,
I get the following message:
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc.
class mahschool:
def print():
print('Say something')
a = mahschool()
a.print()
With this, I get this error:
Traceback (most recent call last):
File "test.py", line 8, in
a.print()
TypeError: print() takes 0 positional arguments but 1 was given
What did I do wrong?
Thank
never mind, I forgot to put 'self' in the method definition!
class mahschool:
def print(self):
print('Say something')
a = mahschool()
a.print()
On Sun, Jul 23, 2017 at 1:24 PM, Michael C
wrote:
> class mahschool:
> def print():
> print('Say something')
>
>
> a = mahs
On Sun, Jul 23, 2017 at 1:24 PM, Michael C
wrote:
> class mahschool:
> def print():
> print('Say something')
By the way, you've chosen a name for your method that's spelled the
same as the name of the built-in "print" function. I'd recommend you
choose a different name than "print"
On 07/23/2017 02:42 PM, Michael C wrote:
> never mind, I forgot to put 'self' in the method definition!
class mahschool:
def print(self):
print('Say something')
a = mahschool()
a.print()
Indeed. The error message was clear on this - but not in a way that's
always instructive until
> 2. I’m trying to locate the directory path to where Python3 is located on my
> system, but when I enter
> the following command:
> $ type -a python3
>
> I get:
> -bash: $: command not found
Ah. Do not include the leading "$" in the command that you're typing.
On Sun, Jul 23, 2017 at 09:54:09PM +0530, Deepen Patel wrote:
> ImportError: No module named cryptography.exceptions
>
> Currently, I am using virtual environments and in virtual environment this
> code not run properly.
> previously, I am running code without virtual environments. it works prope
On 24/07/17 00:19, Brandon Anderson wrote:
> 2. I’m trying to locate the directory path to where Python3 is located on my
> system, but when I enter
> the following command:
> $ type -a python3
You could also try
$ which python3
> -bash: $: command not found
The $ is the
thanks!
On Sun, Jul 23, 2017 at 5:35 PM, Danny Yoo wrote:
> On Sun, Jul 23, 2017 at 1:24 PM, Michael C
> wrote:
> > class mahschool:
> > def print():
> > print('Say something')
>
>
> By the way, you've chosen a name for your method that's spelled the
> same as the name of the built-
On Sun, Jul 23, 2017 at 07:02:09PM +0400, Abdur-Rahmaan Janhangeer wrote:
> assert(... is liked by some strongly typed programmers
Not just strongly-typed programmers:
http://import-that.dreamwidth.org/676.html
> data encapsulation might be depressing to some migrating coders
"Data encapsulat
On 23Jul2017 19:02, Abdur-Rahmaan Janhangeer wrote:
ah pylint yes, great checker ! *some guys thought of inventing it*
Yes, very handy. Greate for checking for simple logic errors too (variable used
but never bound, missing imports, etc).
Just for folks' interest, I have a shell script call
On 23Jul2017 13:40, Winonah Ojanen wrote:
I also tried the correct command for the mac ox s in terminal shell,
running:
Jims-MacBook-Pro-2:~ Jim$
PYTHONPATH="/Users/Jim/Documents/illustris_python:$PYTHONPATH
export PYTHONPATH
[...]
I did use the pip command and am attempting to add the files
25 matches
Mail list logo