On 2016-04-26 16:16, Oliver Bestwalter wrote:
sys.executable
'/home/obestwalter/.pyenv/versions/3.4.4/envs/tmp/bin/python3.4'
Not sure if this helps but perhaps:
alex@X301:~/Py$ which python
/usr/bin/python
alex@X301:~/Py$ . venv/bin/activate
(venv)alex@X301:~/Py$ which python
/home/alex/P
Hi,
>>> import sys
>>> sys.base_exec_prefix == sys.prefix
False
In a virtualenv those are different:
https://docs.python.org/3/library/sys.html#sys.base_exec_prefix
>>> sys.executable
'/home/obestwalter/.pyenv/versions/3.4.4/envs/tmp/bin/python3.4'
>>> sys.prefix
'/home/obestwalter/.pyenv/vers
Thanks Danny
On 27 Apr 2016 04:22, "Danny Yoo" wrote:
> On Tue, Apr 26, 2016 at 3:43 PM, Kanika Murarka
> wrote:
> > The folder which we create using command
> > $ Virtualenv venv
>
>
> Hi Kanika,
>
>
> I think you need to ask the virtualenv folks; it seems to be
> virtualenv-specific. Their fo
The folder which we create using command
$ Virtualenv venv
On 27 Apr 2016 00:57, "Danny Yoo" wrote:
On Tue, Apr 26, 2016 at 6:47 AM, Kanika Murarka
wrote:
> Hi,
> I want to detect whether a 'file1.py' belongs to virtual environment
> folder( generally 'venv') or not ( considering different peopl
On Tue, Apr 26, 2016 at 12:31:28PM +0530, Santanu Jena wrote:
> Hi,
>
> Pls let me why
> "
> def __init__(self):
>
> "
> declaration required, what's the use of this one.Pls explain me in
> details.
Let's say that you have a class with a method:
# A talking bird, says "Polly wants a cracker" (
On Tue, Apr 26, 2016 at 3:43 PM, Kanika Murarka wrote:
> The folder which we create using command
> $ Virtualenv venv
Hi Kanika,
I think you need to ask the virtualenv folks; it seems to be
virtualenv-specific. Their forum is:
https://groups.google.com/forum/#!forum/python-virtualenv
Go
Santanu Jena writes:
> I have idea regarding " __init__" method/ class.but still I have
> confusion on "def __init__(self): "
What is the confusion? Please say what you are expecting, and what is
happening instead that confuses you.
(Also, please don't top-post. Instead, post with replies inte
On Tue, Apr 26, 2016 at 2:32 AM, Santanu Jena wrote:
> Hi Oliver.
> I have idea regarding " __init__" method/ class.but still I have confusion
> on "def __init__(self): " Please share your under standing.
A big point of an entry point, conceptually, is to establish
properties that we'd like to
On Tue, Apr 26, 2016 at 6:47 AM, Kanika Murarka wrote:
> Hi,
> I want to detect whether a 'file1.py' belongs to virtual environment
> folder( generally 'venv') or not ( considering different people may have
> different names for virtual environment folder.).
I think we need more information on w
Hi,
I want to detect whether a 'file1.py' belongs to virtual environment
folder( generally 'venv') or not ( considering different people may have
different names for virtual environment folder.).
I am able to detect it on my machine, but how to make it generalized. I am
not getting anything on Int
Hi Oliver.
I have idea regarding " __init__" method/ class.but still I have confusion
on "def __init__(self): " Please share your under standing.
Thanks & Regards,
San
On Tue, Apr 26, 2016 at 2:14 PM, Oliver Bestwalter
wrote:
> Hi Santanu,
>
> without knowing from which level of understanding
Thank you for your input. You have given me some more to consider.
> Date: Tue, 26 Apr 2016 22:17:53 +1000
> From: st...@pearwood.info
> To: tutor@python.org
> Subject: Re: [Tutor] Using a dictionary to map functions
>
> Hi Colby, and welcome!
>
> On Tue, Apr 26, 2016 at 12:30:38AM -0400, Colby
Thank you! This is what I was hoping to accomplish.
> To: tutor@python.org
> From: __pete...@web.de
> Date: Tue, 26 Apr 2016 14:13:56 +0200
> Subject: Re: [Tutor] Using a dictionary to map functions
>
> Colby Christensen wrote:
>
> > templist = []
> > pt_table = {}
> > cmd_table = {5:"store_poi
Lisa Hasler Waters wrote:
> Dear Tutors,
>
> I have a student who is creating a game in TKinter. He wants the ball
> (object) to disappear when it hits when it hits the wall. He continues to
> get a syntax error message when trying to print the coordinates (he was
> printing the coordinates becau
On Tue, Apr 26, 2016 at 10:55:24AM -0400, Lisa Hasler Waters wrote:
> Dear Tutors,
>
> I have a student who is creating a game in TKinter. He wants the ball
> (object) to disappear when it hits when it hits the wall. He continues to
> get a syntax error message when trying to print the coordinates
Dear Tutors,
I have a student who is creating a game in TKinter. He wants the ball
(object) to disappear when it hits when it hits the wall. He continues to
get a syntax error message when trying to print the coordinates (he was
printing the coordinates because he wanted to use its output to use a
Hi Colby, and welcome!
On Tue, Apr 26, 2016 at 12:30:38AM -0400, Colby Christensen wrote:
> try:
> infile = open(raw_input("Enter input file name; name.txt:"),'r')
> except:
> print "Invalid filename"
> exit()
I'm afraid that code is misleading: your error message lies.
It may not b
Colby Christensen wrote:
> templist = []
> pt_table = {}
> cmd_table = {5:"store_point", 19: "line_line_int"}
As Alan says, the values should be functions rather than function names.
You could use string keys to save both the re.search() check and the
conversion to integer.
> count = 0
>
> for
Hi Santanu,
without knowing from which level of understanding you are asking, it is
hard to say what we should answer here, so let me ask a few questions:
Do you understand the concept of classes already? Maybe from other
programming languages, or are you a complete beginner? If you are a
beginne
Forwarding to tutor list.
Please always use "Reply All" or "Reply List" when responding to the
tutor list.
On 26/04/16 09:24, Marco Soldavini wrote:
> On Tue, Apr 26, 2016 at 2:05 AM, Alan Gauld via Tutor
> wrote:
>> On 25/04/16 17:24, Marco Soldavini wrote:
>>> I've a few questions about parsin
On 26/04/16 08:01, Santanu Jena wrote:
> Hi,
>
> Pls let me why
> "
> def __init__(self):
>
> "
> declaration required, what's the use of this one.Pls explain me in
> details.
It is used to initialise object instances.
For example if you define a class Rectangle that has a length and width
and
On 26/04/16 05:30, Colby Christensen wrote:
> import re
> from store_point import store_point
>
> try:
> infile = open(raw_input("Enter input file name; name.txt:"),'r')
> except:
> print "Invalid filename"
> exit()
>
> templist = []
> pt_table = {}
> cmd_table = {5:"store_point", 19
Hi,
Pls let me why
"
def __init__(self):
"
declaration required, what's the use of this one.Pls explain me in
details.
Thanks in advance.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/ma
I am a novice self taught programmer learning with Python. I am working on a
program to calculate coordinate geometry. The input file is a list of commands.
A number is assigned to each command and followed by various inputs required to
make the calculation. The input has the following format:
24 matches
Mail list logo