not able to get them
running on muliple hosts as i set in my env.hosts list parameters.
If anyone has any prior experience with fabric, please asssit.
Thanks,
--
D. Santosh Kumar
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
oscar.j.benja...@gmail.com
wrote:
On 14 March 2015 at 09:53, Steven D'Aprano st...@pearwood.info wrote:
On Fri, Mar 13, 2015 at 10:39:50PM +0530, Santosh Kumar wrote:
Hi All,
I have installed both python2 and python3 in my system . When i used
ipython it by default goes to python2 base. How/what
Hi All,
I have installed both python2 and python3 in my system . When i used
ipython it by default goes to python2 base. How/what is the easy way to
swith between python2 and python3 ?
Thanks,
santosh
___
Tutor maillist - Tutor@python.org
To
All,
Any suggestion to my question ?
On Thu, Nov 27, 2014 at 12:43 PM, Santosh Kumar rhce@gmail.com wrote:
Hi All,
I am planning to start a small project , so i need some suggestions on how
to go about it.
1) It basically takes some inputs like (name,age,course,joining
date,remarks
. Santosh Kumar
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
:
1) what are the different ways to run the above statement in a effective
way ?
2) How to improve the performance if any?
Thanks,
santosh
On Fri, Jul 18, 2014 at 12:45 AM, Danny Yoo d...@hashcollision.org wrote:
On Thu, Jul 17, 2014 at 11:35 AM, Santosh Kumar rhce@gmail.com
wrote:
I am
Hi,
I am currently working on a project , which has lots of curl commands. I am
using subprocess.Popen to run these curl commands. But somehow i see its
bit slow.
Is there a way/module by which i can improve the performance of the program.
Thanks,
--
D. Santosh Kumar
RHCE | SCSA
+91-9703206361
1 #!/usr/bin/python
2
3 class shape:
4 def __init__(self,x,y):
5 self.x = x
6 self.y = y
7 description = This shape has not been described yet
8 author = Nobody has claimed to make this shape yet
9
10 def __init__(self,x,y,z):
11 self.x = x
12 self.y =
.value3
Out[6]: 3
If you notice in the below example you will see that the child class object
``obj1`` has inherited all the attibutes of the parent class. Is there a
way by which i can make the child class not inherit some of the properites
of parent class.
--
D. Santosh Kumar
?
--
D. Santosh Kumar
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
will probably be a bug.
--
D. Santosh Kumar
RHCE | SCSA
+91-9703206361
Every task has a unpleasant side .. But you must focus on the end result
you are producing.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https
I want to understand about where to use ,
viewkeys()
viewvalues()
viewitems()
Thanks,
santosh
On Wed, Feb 26, 2014 at 6:59 PM, Alan Gauld alan.ga...@btinternet.comwrote:
On 26/02/14 07:04, Santosh Kumar wrote:
I defined a dictionary a below.
In [14]: a = {'a':1,'b':2,'c':3
All,
I defined a dictionary a below.
In [14]: a = {'a':1,'b':2,'c':3}
In [15]: type(a)
Out[15]: dict
Funtion associated with dictionaries.
In [11]: print a.viewkeys()
dict_keys(['a', 'c', 'b'])
In [12]: print a.viewvalues()
dict_values([1, 3, 2])
In [13]: print a.viewitems()
All,
Requirement : i want to call a variable assigned outside a function scope
anytime within the function. I read global is a way.
a) Case I looks fine.
b) Case II is bombing out.
Is this how it works or please correct me if i am wrong.
case I:
In [17]: a = 10
In [19]: def fun_local():
Hi All,
If you notice the below example, case I is working as expected.
Case I:
In [41]: string = H*testH*
In [42]: re.match('H\*',string).group()
Out[42]: 'H*'
But why is the raw string 'r' not working as expected ?
Case II:
In [43]: re.match(r'H*',string).group()
to call group() on the result (since in this case there is no result).
On 18-Feb-2014, at 09:52, Santosh Kumar rhce@gmail.com wrote:
Hi All,
If you notice the below example, case I is working as expected.
Case I:
In [41]: string = H*testH*
In [42]: re.match('H\*',string).group
Thank you all. I got it. :)
I need to read more between lines .
On Wed, Feb 19, 2014 at 4:25 AM, spir denis.s...@gmail.com wrote:
On 02/18/2014 08:39 PM, Zachary Ware wrote:
Hi Santosh,
On Tue, Feb 18, 2014 at 9:52 AM, Santosh Kumar rhce@gmail.com
wrote:
Hi All,
If you notice
Thank you all.
On Thu, Feb 13, 2014 at 10:47 PM, Walter Prins wpr...@gmail.com wrote:
Hi,
On 13 February 2014 06:44, Santosh Kumar rhce@gmail.com wrote:
I am using ipython.
1 ) Defined a string.
In [88]: print string
foo foobar
2) compiled the string to grab the foo word
Hi all,
I am using ipython.
1 ) Defined a string.
In [88]: print string
foo foobar
2) compiled the string to grab the foo word.
In [89]: reg = re.compile(foo,re.IGNORECASE)
3) Now i am trying to match .
In [90]: match = reg.match(string)
4) Now i print it.
In [93]: print match.group()
foo
Everything starting with hash character in Python is comment and is
not interpreted by the interpreter. So how does that works? Give me
full explanation.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
Here is a sample script without argparse implementation:
from sys import argv
script, filename = argv
foo = This line was written by a Python script.
with open(filename, 'a') as file:
file.write(foo)
I find argparse hard. Just give me a startup. How can I make a asgparse version?
Hello There,
We all know that line starting with # in Python is a comment.
We also know that when the first line of any file (with any extension)
has #!/usr/bin/env bash and if you make it executable and do
./filename.ext in the terminal then it will be considered as bash file
(in this case even
Hello there,
I have a few scripts that I made to experiment with, I have to import
them everytime I enter the Python shell. The scripts are in
`/home/username/workshop/` (this directory has also some non .py
files) directory. Is there a way I can import them as soon as I enter
Python?
Also I am
In first half of this script:
prompt = raw_input(Can you tell me your name? )
if prompt in (Yes, yes, y, Y):
name = raw_input(What's your name? )
elif prompt in (No, no, n, N):
exit(OK, have nice day..)
else:
prompt = name
if name == Santosh:
print Hey! I have the same name.
elif
Hello There,
First time I came in contact with Python programming languages was
nearly 1 year (I am learning this languages from my home). Prior to
this I was good at PHP, HTML and CSS (this doesn't mean that I want to
say that I wanted to become a web developer). I have read many books
and
Hello There,
This problem isn't so simple as it looks in the title/subject of this email.
I am doing a tutorial on Python, and there is a script named password.py:
password = foobar
while password != unicorn:
password = raw_input(Password: )
print Welcome in
The question says Modify the
Here is my script:
name = raw_input(What's your name? )
if name == Santosh:
print Hey!! I have the same name.
elif name == John Cleese or Michael Palin:
print I have no preference about your name. Really!!
else:
print You have a nice name.
The if part works well. The elif part
I am reading How to Think Like a Computer Scientist with Python. There
is a script in the exercise:
if Ni!:
print 'We are the Knights who say, Ni!'
else:
print Stop it! No more of this!
if 0:
print And now for something completely different..
else:
print Whats all this, then?
Like in my script:
#!/usr/bin/env python
#-*- coding:utf-8 -*-
print You will be prompted to enter your height in feet and inches.
height_in_feet = input(How much feet are you long: )
remaining_inches = input(How much inches remained? )
inches_in_feet = height_in_feet * 12
I am reading the documentation and I'm in the section 4.1. Let me
write it down here:
x = int(input(Please enter an integer: ))
Please enter an integer: 42
if x 0:
... x = 0
... print('Negative changed to zero')
... elif x == 0:
... print('Zero')
... elif x == 1:
...
I am doing:
power = 10 ** 30
power
and the output:
1...L # what does L represent
interesting thing is L doesn't shows when I do a: print power
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
Now its enough info. Thanks all for clearing my doubt.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Is there space a between #! and /usr/bin/env python?
I have seen Python manual, it says #! /usr/bin/env python
But snippet manager of many text editing programs have #!/usr/bin/env
python. Python is a strongly typed language, which one is correct?
___
Its getting complicated now. Will it effect or not?
Give me one word answer with one line description.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
System Information
Ubuntu 11.10
Python 2.7.2
Problem
I think my Ubuntu has PyGTK and GTK both already installed. But
however when I am importing gtk in Python interactive mode then I am
getting the following warning:
(.:4126): Gtk-WARNING **: Unable to
35 matches
Mail list logo