473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Creating methods depending on packages that have been installed

Dear All,

What is the best way of creating methods depending on the packages that have
been installed.

A silly example is

try:
import somepack
class hello:
def __init__(self):
print 'hi'
def some(self):
print 'some'
except:
class hello:
def __init__(self):
print 'hi'

This is obviously not what I want - since it looks ugly and I wish to test
for lots packages.

Any ideas?

Thanks

Colin

Jul 19 '05 #1
0 847

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Edwin Young | last post by:
Hi, I'm developing an application which is primarily in Python but has some C-coded extension modules. These modules aren't really useful to anyone other than the main application. The app works...
0
by: Matt Price | last post by:
Hi, I have two quick questions about managing packages: 1) I'm writing a simple module with which I would like to include a couple of macros for the MoinMoin wiki system. The files I want to...
3
by: enrio | last post by:
I recently installed python 2.4, and many installed software packages stopped working. Some things got working after I copied some files and directories from /usr/lib/python2.3/site-packages to...
2
by: jcooper | last post by:
Hi all, I'm new to VB.net and have a question about creating the .exe file for my program. In VB6 you could just select 'Make .exe' from the File menu, but everything that I read about...
7
by: Oliver Elphick | last post by:
Debian packages of PostgreSQL 7.4beta4 are available in the experimental section of the Debian archive. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight,...
6
by: Pep | last post by:
Firstly, I'm not sure if this is the right group for this query, so please forgive me if I am wrong. My problem is that most users I distribute my software to cannot install it on their systems...
7
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then...
3
Kelicula
by: Kelicula | last post by:
This is NOT a complete OO perl tutorial However I thought it could be beneficial to explain some of the basic concepts, and allow some users to simplify the software design process. I have...
3
by: james | last post by:
Hi all, I recently updated os x from python 2.4 to 2.5 (from python.org) and in doing so I lost my old python path entries. Python 2.4 was installed using fink. Now when I do: import sys...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.