Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67097

Need help in writing some code so i can re-use it in every module or class

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <d.joshi84@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'importing': 0.05; 'subject:code': 0.07; 'subject:help': 0.08; 'subject:module': 0.09; 'python': 0.11; 'issue?': 0.16; 'subject:class': 0.16; 'subject:writing': 0.16; 'module': 0.19; 'written': 0.21; 'command': 0.22; 'script.': 0.24; 'message-id:@mail.gmail.com': 0.30; 'subject:some': 0.31; 'class': 0.32; 'classes': 0.35; 'requirement': 0.35; 'received:google.com': 0.35; 'clear': 0.37; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'subject:can': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; '8bit%:6': 0.40; 'future': 0.60; 'hope': 0.61; 'subject:Need': 0.64; 'dont': 0.67
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6v2wO3SFTlwfVxJ71eS3ZNulaLmIAH44v0qqgOAgHKo=; b=BnlP85jH6PE2t/uSpLGLE+NBV0ulkjH0vQhA8OP8L6XXNJ9+7VkBQTjKVO64aZ47cY J4dR36eCICjW/XuLS6kw59Yfpykz5WemTb/jEADMhXjCVMW54gA9G1oq4ZoVIKMHBQkp uiHFaHg0Eo1uugUhxFAMpMKngPeNfixkl26rYYSRJhj2LvFpLcgu84DBqSTiUzwFW7L1 tKOgjNyBRyhGJSyDoUnmC0IfS1LR/iNV1HhR+8P8OJJrP4tIyNKrhEXT8qLL4VZGSojH adi2vQgaXf+o3dicEBHPJQdfzix2H50atHEDDzpsStGah8JJuD6ogw/Cv0zdzGBmjSrq MiPQ==
MIME-Version 1.0
X-Received by 10.14.99.196 with SMTP id x44mr6804837eef.65.1393423252339; Wed, 26 Feb 2014 06:00:52 -0800 (PST)
Date Wed, 26 Feb 2014 19:45:52 +0545
Subject Need help in writing some code so i can re-use it in every module or class
From Unix SA <d.joshi84@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=001a11c39272fa3f5d04f34fa10e
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.7395.1393423618.18130.python-list@python.org> (permalink)
Lines 48
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1393423618 news.xs4all.nl 2914 [2001:888:2000:d::a6]:49888
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:67097

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello Experts,

I have requirement, like i want to use below command in python script.

<command> --username <username> --password <password>  <Command line
arguments>

now my requirement is i want to write some class so i can re-use "<command>
--username <username> --password <password>" part via importing as module
or class  .. and re-use that in other module or classes .. so i dont have
to write that in every module or classes ..

Now why i wan to do this is ... currently <command> we are using is going
to change in near future to <command1>, so i dont have go to every module
and change that command if i have written single module or class and re-use
it in other ?

Hope i am clear enough to describe my issue?

any suggestions ?

Regards,
DJ

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Need help in writing some code so i can re-use it in every module or class Unix SA <d.joshi84@gmail.com> - 2014-02-26 19:45 +0545
  Re: Need help in writing some code so i can re-use it in every module or class Roy Smith <roy@panix.com> - 2014-02-26 09:37 -0500

csiph-web