chad wrote:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I never created an instance of
BaseHandler?
Cha
MRAB wrote:
On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
chad writes:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHa
Shafique, M. (UNU-MERIT) wrote:
Hi,
I have a number of different groups g1, g2, … g100 in my data. Each
group is comprised of a known but different set of members (m1, m2,
…m1000) from the population. The data has been organized in an
incidence matrix:
g1 g2 g3 g4 g5
m1 1 1 1 0 1
m2 1 0 0 1 0
Hans Georg Schaathun wrote:
Is there a simple way to find the external interface and bind a
socket to it, when the hostname returned by socket.gethostname()
maps to localhost?
What seems to be the standard ubuntu configuration lists the local
hostname with 127.0.0.1 in /etc/hosts. (I checked th
Chris Rebert wrote:
On Tue, Apr 26, 2011 at 8:58 AM, Ariel wrote:
Hi everybody, how could I concatenate unicode strings ???
What I want to do is this:
unicode('this an example language ') + unicode('español')
but I get an:
Traceback (most recent call last):
File "", line 1, in
UnicodeDe
snorble wrote:
I'm not a Pythonista, but I aspire to be.
My current tools:
Python, gvim, OS file system
My current practices:
When I write a Python app, I have several unorganized scripts in a
directory (usually with several named test1.py, test2.py, etc., from
random ideas I have tested), an
Ben Finney wrote:
Mercurial – are the ones to choose from. Anoyone recommending a VCS tool
that has poor merging support (such as Subversion or, heaven help us,
CVS) is doing the newcomer a disservice.
True enough. But the modern crop of first-tier VCSen – Bazaar, Git,
For a single user, there
Chris Angelico wrote:
On Wed, Apr 27, 2011 at 7:24 PM, Jean-Michel Pichavant
wrote:
For a single user, there would be no merge issue. And svn is very simple to
use.
That would not be a such bad advice for a beginner with VCS systems.
As someone who for years had "nightly backup
Anssi Saari wrote:
Jean-Michel Pichavant writes:
For a single user, there would be no merge issue.
Really? What about a single user with many computers and environments?
I find myself merging files on occasion because I edited them
separately and forgot to check in changes before
1011_wxy wrote:
Hi friends:
Here I need some help.
#encoding="utf-8"
#moudle a.py
def a():
print " function a!"
#encoding="utf-8"
#moudle b.py
def b():
print " function b!"
#encoding="utf-8"
#moudle c.py
import a
import b
def c():
a.a()
b.b()
Here in function c,How ca
1011_wxy wrote:
Hi JM:
*python c.py > afile.log*
could you pls give me the whole example?
I am so sorry that I am a beginner in Python.
Your module a and b that you cannot modify given your original
description, are printing data using the print statement.
That means these module only
Geoff Bache wrote:
Hi all,
I currently find myself needing a Python read-write lock. I note that
there is none in the standard library, but googling "python read-write
lock" quickly produced 6 different competing examples, including two
languishing patch proposals for the standard library.
I ca
Ethan Furman wrote:
For anybody interested in composition instead of multiple inheritance,
I have posted this recipe on ActiveState (for python 2.6/7, not 3.x):
http://code.activestate.com/recipes/577658-composition-of-classes-instead-of-multiple-inherit/
Comments welcome!
~Ethan~
Sounds
Ben Finney wrote:
Ethan Furman writes:
Carl Banks wrote:
That's not what we mean by composition. Composition is when one
object calls upon another object that it owns to implement some of
its behavior. Often used to model a part/whole relationship, hence
the name.
Hmmm. Okay -
anvar wrote:
Hello,
Could you please help me with the modeling in Python the following
problem: (e.g., g_t means g with index t)
Min∑_(i=1)^n▒∑_(t=1)^l▒[s_i (t)-min[s ̂_i (t)×α_t×exp(g_t ),C_i
(t) ] ]^2
subject to
s_i (t)=f_i (t)[S_i+f_(i-1) (t)[S_(i-1)+f_(i-2) (t)[S_(i-2)+⋯f_2 (t)
[S_2+f_1 (t)
Hi!
On my system, thera are not "twain32.dll" or "twain_32.dll", but "twain.dll"
@+
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Wim Feijen wrote:
Excuse me, this message was sent to the wrong mailing list.
Sorry, Wim
2011/5/3 Wim Feijen mailto:w...@go2people.nl>>
Dag mannen,
You're lucky that the native language of our Benevolent Dictator For
Life is tolerated in this list.
JM
--
http://mail.python.org/mailman
James Mills wrote:
On Wed, May 4, 2011 at 10:45 AM, Astan Chee wrote:
Hi,
I'm trying to make a python script (in windows 7 x64 using python 2.5) to
start a process, and kill it after x minutes/seconds and kill all the
descendants of it.
Whats the best way of doing this in python? which modul
Hi!
> you need to install the appropriate libraries, among which are:
> libjpeg-devel
> freetype-devel
> libpng-devel
OK, but where can I find it? I want use PIL with Python under Windows,
and I can't compile C's sources.
Should I replace PIL by ImageMagick?
@-salutati
Re!
And why the problem no exist with PIL 1.1.6? (only 1.1.7)
Is that the version 1.1.6 does not use these libraries?
@+
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
James Mills wrote:
On Tue, May 10, 2011 at 10:40 AM, Kyle T. Jones
wrote:
It has been hard for me to determine what would constitute overuse.
A rule of thumb I always follow and practice is:
"Let the error lie where it occurred."
or
"Don't hide errors.".
It's good practice to foll
Littlefield, Tyler wrote:
Hello:
Thanks all for your information and ideas. I like the idea of open
source; I have a fairly large (or large, by my standards anyway)
project that I am working on that is open source.
Here's kind of what I want to prevent. I want to write a multi-player
online
Cathy James wrote:
f = open ('c:/testing.txt'', 'r')
replace the double quote by a single quote.
JM
--
http://mail.python.org/mailman/listinfo/python-list
RVince wrote:
Ha! You;re right -- but is there a way to get it without the filename
appended at the end?
On May 24, 11:52 am, Tim Golden wrote:
On 24/05/2011 16:36, RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given t
Lew Schwartz wrote:
So, if I read between the lines correctly, you recommend Python 3?
Does the windows version install with a development environment?
If you want to use python 3, make sure before that all the good stuff
you need (==modules) have been ported to python 3.
If you are a complet
- Original Message -
> hi,
>
> i'd like to change the volume of my av-receiver (HDMI) and speakers
> (analogue) simultaneously. in order to use both outputs i'm using
> virtual audio cable but if i set it as default device and change
> volume, hdmi and analogue remains unchanged.
> i inten
- Original Message -
> Hi all,
>
> Please suggest how I can understand someone else's program where
> - documentation is sparse
> - in function A, there will be calls to function B, C, D and in
> those functions will be calls to functions R,S,T and so on so
> forth... making it dif
- Original Message -
> Please help! I'm very
> new to networking, but I've been using Python for a while now, just
> recent;y getting into networking, trying to get things down.
Hi,
Nothing wrong with diving into the muddy waters of network programming.
If you like blue lagoons like me, t
- Original Message -
> Hey list,
Greetings !
> How do you do with your TODOs?
>
> Regards,
> Jordi
TODOs always share the same fate : they get forgotten and wander the code until
the project dies. Unless you have the required mental resilience to stop the
urgent work to fix your TO
- Original Message -
> On Saturday 23 November 2013 02:01:26 Steven D'Aprano wrote:
> > * Python is not Java, and Java is not Python either:
> >
> > http://dirtsimple.org/2004/12/python-is-not-java.html
> > http://dirtsimple.org/2004/12/java-is-not-python-either.html
>
> Thanks for all th
- Original Message -
> I'm trying out Tkinter with the (non object oriented) code fragment
> below:
> It works partially as I expected, but I thought that pressing "1"
> would
> cause the program to quit, however I get this message:
> TypeError: quit() takes no arguments (1 given), I tried
> I tried out your suggestions and discovered that I had the line
> import sys to the program. So you can see below what I came up with.
> It works but it's not all clear to me. Can you tell me what
> "label.bind("<1>", quit)" is standing for? What's the <1> meaning?
>
>
>
> #!/usr/bin/env pytho
- Original Message -
> The following two functions return the same result:
>
> x**2
> x*x
>
> But they may be computed in different ways. The first choice can
> accommodate non-integer powers and so it would logically proceed by
> taking a logarithm, multiplying by the power (in
- Original Message -
> I have an ethernet-rs232 adapter which allows me to connect to a
> measurement instrument by means of netcat on a linux system.
> e.g. entering nc 10.128.59.63 7000
> allows me to enter e.g.
> *IDN?
> after which I get an identification string of the measurement
> ins
> > Such equipment often implements a telnet protocol. Have use try
> > using the telnetlib module ?
> > http://docs.python.org/2/library/telnetlib.html
> >
> > t = Telnet(host, port)
> > t.write('*IDN?')
> > print t.read_until('Whateverprompt')
> > # you can use read_very_eager also
> >
> > JM
> >
> Did you try
>
> import telnetlib
>
> ?
>
> Note that in the code above I forgot the EOF, which is very much
> dependent of the equipment itself.
>
> You may have to write
> t.write('*IDN?\n')
> or
> t.write('IDN?\n\r')
>
> JM
Additionally, here's the code we're using for our signal generat
> Here is the code:
> #!/usr/bin/env python
> import telnetlib
> host = '10.128.59.63'
> port = 7000
> t = Telnet(host, port)
> t.write('*IDN?\n')
> print t.read_until('Whateverprompt')
> # you can use read_very_eager also
>
> and this is the result of executing the code(from which I deduce I
> ha
- Original Message -
> Op maandag 16 december 2013 13:05:41 UTC+1 schreef Jean-Michel
> Pichavant:
> > > Here is the code:
> > > #!/usr/bin/env python
> > > import telnetlib
> > > host = '10.128.59.63'
> > > port = 7000
>
> This is what I got using telnet:
> [jean:~] $ telnet 10.128.59.63 7000
> Trying 10.128.59.63...
> Connected to 10.128.59.63.
> Escape character is '^]'.
> *IDN?
> KEITHLEY INSTRUMENTS INC.,MODEL 2425,1078209,C32 Oct 4 2010
> 14:20:11/A02 /E/
>
- Original Message -
> On Tue, Dec 17, 2013 at 5:26 AM, Jean Dubois
> wrote:
> >> Try something simple first:
> >> import telnetlib
> >> host = '10.128.59.63'
> >> port = 7000
> >> t = Telnet(host, port)
> >> def flush()
> >> t.read_very_eager()
> >> def sendCmd(cmd)
> >> t.write('%s
> I'm a newbie in Python programming that is very much true, and
> contrary to what you seem to suggest I did my homework
At no point that was my intention, my apologies.
If you fixed the syntax error, you should be pretty close to the solution
though.
JM
-- IMPORTANT NOTICE:
The contents of
Original Message -
> On Wednesday, December 18, 2013 8:52:11 AM UTC+5:30,
> smileso...@gmail.com wrote:
> > Hi,
> > I am a newbie in python. I am looking for a existing module which
> > I can import in my program to log the objects to a file?
>
> > I know there is a module Data::Dumpe
- Original Message -
> Hi
>
> I have a list of data that presents as:
>
> timestamp: value
>
> Timestamps are used solely to determine the sequence of items in the
> list.
>
> I want to find the longest repeated sequence of values in the list.
> Example, in the following list:
>
> data
- Original Message -
> Hi Pythoners,
> I'm looking for a tool or framework in which I can do a slight
> modification to achieve the following task:
> "Asynchronously reset a large number of cisco routers back to their
> original configurations and push prepared initial configurations to
- Original Message -
> How exactly do I import a .wav file and run it?
> also is it possible to run it inside a while loop if so or it just
> start playing when its run? - Tom 14
> --
> https://mail.python.org/mailman/listinfo/python-list
I think the pygame module should be able to do so.
- Original Message -
> Am 18.12.13 21:17, schrieb Jean Dubois:
> > I have a python-program which I want to perform its task first,
> > then
> > switch to
> > the python console to experiment with further commands, using what
> > was
> > already
> > defined in the python-program.
>
> Excell
- Original Message -
> Hello, for the first time I'm trying te create a little Python
> program. (on a raspberri Pi)
>
> I don't understand the handling of variables in a loop with Python.
>
>
> Lets say i want something like this.
>
> x = 1
> while x <> 10
> var x = x
> x =
- Original Message -
> Hey guys,
> I'm trying to automate a process by initially creating a standard
> template and then replace some text fields with variable values.
> [for example, "DATE" in the paragraph will be replaced by the current
> date value. it doesn't have to be a literal
- Original Message -
> Hello all.
>
> I have some questions again. :-)
>
> I wish to be able to place a function within a data structure. I
> would like to use a dictionary because I could pass it a key and
> then the function could be called. I couldn't find anything on the
> net to s
- Original Message -
> Thanks for that. It resolved the issue and it was so simple compared
> to everything else I saw on the net.
>
> Only outstanding thing I have to work out is how to execute functions
> from a dictionary. I will continue searching on the net.
>
>
> Sean
This may hel
- Original Message -
> On Friday, 23 November 2001 04:13:40 UTC+5:30, MANUEL FERNANDEZ PEREZ
> wrote:
> > Hello,
> > I'm looking for an editor for Python.I' m interested it works on
> > Windows.Can
> > anybody help me?
> >
> > Thank you
> >
> > Manuel
http://lmgtfy.com/?q=python+editor+
- Original Message -
> I've been pleased with Komodo, and certainly prefer it over
> Notepad++.
> Komodo:
> http://www.activestate.com/komodo-ide?gclid=COHE4eLj7rsCFQISMwodOUQAiw
Komodo is an IDE and costs 385$. I certainly expect it to better than notepad++.
JM
-- IMPORTANT NOTICE:
> > -- IMPORTANT NOTICE:
> >
> > The contents of this email and any attachments are confidential and
> > may
> > also be privileged. If you are not the intended recipient, please
> > notify
> > the sender immediately and do not disclose the contents to any
> > other
> > person, use it for any purp
- Original Message -
>
> On Jan 8, 2014, at 10:53 AM, Jean-Michel Pichavant
> wrote:
>
> >>> -- IMPORTANT NOTICE:
> >>>
> >>
> >> too late you have sent this to a public forum
> >
> > No pb with that, the python li
- Original Message -
> Hey guys,
> I'm working on to provide a lightweight web UI for providing an
> interface to invoke a python script(a sequential script which could
> involve some system calls) at the server side. The UI should collect
> some parameters for input into this python sc
- Original Message -
> I would like to build an array of dictionaries. Most of the
> dictionary example on the net are for single dictionary.
>
> dict = {'a':'a','b':'b','c':'c'}
> dict2 = {'a':'a','b':'b','c':'c'}
> dict3 = {'a':'a','b':'b','c':'c'}
>
> arr = (dict,dict2,dict3)
>
> What
- Original Message -
> On 17/01/2014 01:00, Terry Reedy wrote:
> > On 12/6/2013 8:35 PM, Terry Reedy wrote:
> >> On 12/6/2013 12:03 PM, Mark Lawrence wrote:
> >>> Is it just me, or is this basically useless?
> >>>
> >>> >>> help(object)
> >>> Help on class object in module builtins:
> >>>
- Original Message -
> Hello there.
>
> I am currently working on a project involving the use of Pyro4.
>
> I have a scenario.
>
> We have the pc named A, and a pc named B.
>
> On pc B lies a python script, that includes pyro, and a method for
> reading files.
>
> On pc A, we create an
- Original Message -
> generator slides review and Python doc
>
>
> I do not know what tool is used to produce such
> slides.
>
> When the mouse is over a a text like a title ( ... <\H*> ???)
> the text get transformed and a colored eol is appearing.
Used to get a link to the given chap
Greetings,
Assuming I have a debian workstation for which I don't have any sudo rights, i
n order to be able to install / remove python packages, should I be using
virtualenv ? Is it a suited solution ?
JM
-- IMPORTANT NOTICE:
The contents of this email and any attachments are con
Thank you all for you insights.
I'll probably go with virtualenv, I'll be able to distribute it among the team.
There's still one point worrying me though:
We're doing a lot a remote execution. We're using "execnet"
http://codespeak.net/execnet/, and I'm not sure it can be compatible with
virtua
> Call the venv version of python and activation is handled.
> E.g. in a fabfile
>
> myenv/bin/python myscript.py
>
> --
> Pete Forman
> --
> https://mail.python.org/mailman/listinfo/python-list
wow, the solution is so nice and simple.
JM
-- IMPORTANT NOTICE:
The contents of this emai
- Original Message -
> From: "ast"
> To: python-list@python.org
> Sent: Monday, 27 October, 2014 9:16:26 AM
> Subject: Callback functions arguments
>
> Hi
>
> In this web site at example n°5
> http://fsincere.free.fr/isn/python/cours_python_tkinter.php
>
> A program is using the "Scale"
- Original Message -
> From: "Seymore4Head"
> To: python-list@python.org
> Sent: Monday, 27 October, 2014 3:27:18 AM
> Subject: Classes and the command line
>
> I am trying to learn classes.
> I am currently using Python 2.7 at the command line.
> If you try to type commands at the comman
- Original Message -
> From: "Peter Otten" <__pete...@web.de>
> To: python-list@python.org
> Sent: Thursday, 30 October, 2014 1:45:42 PM
> Subject: Re: When using a decorator exceptions raised reference the decorator
> not the function
>
> Néstor Boscán wrote:
>
> > I'm using Python 2.7
- Original Message -
> From: "Gregory Ewing"
> Steven D'Aprano wrote:
> > Like all good Pythonistas[1], we hate Java and think that
> > getter/setter
> > methods are pointless. But come on, they're not *wrong*,
>
> What's wrong is the statement that getters and setters
> are necessary to
- Original Message -
> From: "Fatih Güven"
> I have a structured and repetitive data. I want to read a .txt file
> line by line and classified it to call easily. For example employee1
> has a name, a salary, shift, age etc. and employee2 and other 101
> employee have all of it.
>
> Call e
- Original Message -
> From: "C Smith"
> To: python-list@python.org
> Sent: Tuesday, 4 November, 2014 4:28:33 PM
> Subject: Code review
>
> I was wondering if I could get some feedback on the biggest thing I
> have done as an amateur Python coder. The sidepots algorithm isn't
> correct ye
- Original Message -
> From: "C Smith"
> I read that with 2.7 that I had to initialize class variables to
> immutable types. I think because I was working with the lists before
> they had been altered and were still empty lists. I will mess around
> tomorrow with the classes you suggested
Original Message -
> From: "Ivan Evstegneev"
> To: python-list@python.org
> Sent: Wednesday, 5 November, 2014 12:00:16 PM
> Subject: Understanding "help" command description syntax - explanation needed
> So here is the question itself:
>
> If I use the help command to check the “range” c
- Original Message -
> From: sohcahto...@gmail.com
> I was trying to illustrate the point that some professors would
> demand you write code like this...
>
> # increment the line count
> lineCount += 1
>
> # Check if line count is over 10
> if lineCount > 10
> # Tell the user there ar
- Original Message -
> From: "Chris Angelico"
> To: python-list@python.org
> Sent: Wednesday, 3 December, 2014 12:02:17 PM
> Subject: Style question: Importing modules from packages - 'from' vs 'as'
>
> When importing a module from a subpackage, it's sometimes convenient
> to refer to it
- Original Message -
> From: "Seymore4Head"
> To: python-list@python.org
> Sent: Friday, 28 November, 2014 4:31:50 AM
> Subject: Re: Can you use self in __str__
>
> On Thu, 27 Nov 2014 21:49:29 -0500, Dave Angel
> wrote:
>
> class Hand:
> def __init__(self):
> self.hand = []
- Original Message -
> From: "Aahan Krish"
> To: python-list@python.org
> Sent: Monday, 8 December, 2014 3:15:43 AM
> Subject: Maintaining Maximum Line Length When Using Tabs Instead of Spaces?
>
> My understanding from talking to different people is that many do use
> tabs (instead of sp
- Original Message -
> From: "sam pendleton"
> Having to put the garage package on the sys.path seems a little off,
> why wouldn't relative imports work?
>
> Do most people somehow put their packages in sys.path when bundling
> their python packages up to be shared with setuptools or othe
- Original Message -
> From: sohcahto...@gmail.com
> try:
> import someModule
> except ImportError:
> print "Module is missing"
> # handle it!
>
> Just make sure to attempt to import it again after making the call to
> pip to install it.
Note that ImportError may be raised for
- Original Message -
> From: "manduk"
> > "A web page"?
> > Did you mean a Web server?
> not only upload in a folder of a webserver...I wish to see in real
> time
> the datas in a public html page.
> I get the data from serial port and then I put them in a remote page.
> Which is the best
- Original Message -
> From: "ast"
> I have the idea to write:
>
> def __init__(center=(0,0), radius=10, mass=None)):
>
> if mass == None:
> self.mass = radius**2
> else:
> self.mass = mass
>
> but maybe Python provides something clever.
>
> Thx
If you like on
- Original Message -
> From: "Chris Angelico"
> > c1 = Circle((0,0), 10, None)
> > print c1.mass
> > 20
> > c1.radius = 20
> > print c1.mass
> > 40
>
> I think that juust might count as scope creep :)
> ChrisA
Here you go :p
c1 = Circle((0,0), 10, None)
print c1.mass
20
c1.gr
- Original Message -
> From: "ast"
> >
> >> Note : what is the mass of a circle ?
> >
>
> In fact it's a ball moving in a plan.
> I will change that name.
I would advise to remove the the mass parameter of your Sphere initialization.
It could be inconsistent with the radius.
To compute
le
"/usr/local/lib/python2.7/dist-packages/pytools-2014.3.5-py2.7.egg/pytools/__init__.py",
line 5, in
from six.moves import range, zip, intern, input
ImportError: cannot import name intern
Is there a workaround or is it a bug ?
Best regards,
Jean-Michel
--
https://mail.python.org/mailman/listinfo/python-list
- Original Message -
> From: "Surbhi Gupta"
> OK, the problem is now resolved: I just found out that we need to
> install from prompt instead of IDLE.
> Setuptools is installed, but I am not able to use easy_install from
> prompt. It says:
> easy_install : The term 'easy_install' is not re
- Original Message -
> From: "Albert-Jan Roskam"
> import functools
> import inspect
> import warnings
>
> warnings.simplefilter("always")
>
> class check_deprecated_args(object):
>
> def __init__(self, deprecated_params, msg=None):
> self.deprecated_params = deprecated_para
- Original Message -
> From: "Albert-Jan Roskam"
> > From: Jean-Michel Pichavant
> > I don't really understand how you successfuly manage positional
> > parameters,
> > since the caller may not name them.
> > I'm asking because if
- Original Message -
> From: "Neal Becker"
> To: python-list@python.org
> Sent: Tuesday, 27 January, 2015 2:15:12 PM
> Subject: Is there a more elegant way to spell this?
>
> Is there a more elegant way to spell this?
>
> for x in [_ for _ in seq if some_predicate]:
You could use a gene
- Original Message -
> From: "Xavier Pegenaute"
> To: python-list@python.org
> Sent: Saturday, 7 February, 2015 11:09:10 PM
> Subject: How to Mock a mongodb
>
> Dear,
>
> I am trying to mock the use of a mongo db and I am having some
> trouble.
> Appears that I am not able to return a de
- Original Message -
> On Feb 23, 2014, at 1:44 AM, Steven D'Aprano <
> steve+comp.lang.pyt...@pearwood.info > wrote:
> > Sorry, I don't really understand your question. Could you show an
> > example
>
> > of what you are doing?
>
> > Do you mean "add 5" or "*5"? "Add *5 doesn't really
- Original Message -
> On Sun, 23 Feb 2014 10:20:15 -0800, Pierre Quentel wrote:
>
> > The new home page of python.org is very nice, congratulations !
>
> The best I can say about it is that I'm extremely underwhelmed by the
> design, which is far more "busy" and colourful than the old de
- Original Message -
> Hello,
>
> I'm sure this is a common question but I can't seem to find a
> previous thread that addresses it. If one one exists, please point
> me to it.
>
> I've been developing with python recreationally for a while on Ubuntu
> but will soon be transitioning to
- Original Message -
> Hello Experts,
> I have requirement, like i want to use below command in python
> script.
> --username --password arguments>
> now my requirement is i want to write some class so i can re-use
> " --username --password " part via
> importing as module or clas
- Original Message -
> Hi,
> I am using Thread class to create threads.
>
> thread = threading.Thread(target=Fun, args=[arg1, arg2, arg3="val"])
> thread.start()
>
> This code is throwing compilation error(Ipython).
> In [19]: import threading
> In [20]: def Fun(agr1, arg2, arg3=No
- Original Message -
> One of my roles on this newsgroup is to periodically whine about
> stupidities in the Python datetime module. This is one of those
> times.
>
> I have some code which computes how long ago the sun set. Being a
> nice
> pythonista, I'm using a timedelta to represent
- Original Message -
> We've recently started using pyflakes. The results seem to be
> similar
> to most tools of this genre. It found a few real problems. It
> generated a lot of noise about things which weren't really wrong, but
> were easy to fix (mostly, unused imports), and a few pl
- Mail original -
> Hi
> I would like to mock patch the attribute 'calc' in the 'Client' class
> (See code below).
> I have 2 unit tests:
> 1) test1 - that patch an existing instance of 'Client' - it works
> fine.
> 1) test2 - that tries to patch the 'Client' class. My expectation is
> th
- Mail original -
> Hi
> 1) I prefer to use start/stop and not the decorator .
> 2) mock_play is the name of the module where the code belongs
> Thanks
> Avishay
> Sent from my iPhone
You should not neeed to refer to the Calc class using mock_play since it is
defined in the very same
- Original Message -
> Hi,
> I have been using ipython and ipython with qtconsole and working on a
> code with functions. Each time I make a modification in function
> I have to quit IPTHON console (in both with and with out qt console )
> and reload the function freshly. If I need to s
- Original Message -
> Hi alex
>
> I tried the command you suggested however it is giving me following
> error.
>
> ERROR: The RPC server is unavailable.
Hi,
Please do not top post :)
If python is installed on the remote machine, using execnet
http://codespeak.net/execnet/ is very ea
- Original Message -
> I tried it, however it seems really complicated.
> If you have used it before, can you show me how can i do it ?
> Gaurang Shah
> Blog: qtp-help.blogspot.com
> Mobile: +91 738756556
Please don't ask question off-list.
It's not complicated at all.
The documenta
- Original Message -
> Hi
>
>
> I would like to create a web app using flask or cgi library along
> with telnetlib to telnet to specific servers and execute commands
> and retrieve the output.
> The output will then be formatted and outputted to a webpage .
>
> . Is this the best way
- Original Message -
> I would use something like fabric to automatically login to hosts via
> ssh then parse the data myself to generate static HTML pages in a
> document root.
>
> Having a web app execute remote commands on a server is so wrong in
> many ways.
Such as ?
JM
-- IMPORTA
301 - 400 of 1250 matches
Mail list logo