Python Forum
Whether to create a separate package for command line support
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whether to create a separate package for command line support
#1
I am writing some software which I call XML Boiler. I have xmlboiler.core for core functionality of my package. In some (far) future, I may also add xmlboiler.http or xmlboiler.proxy for a proxy server implementing access the core library through HTTP protocol.

Now I am working on a command line interface to my core library. (The core library is probably unlike to be used directly, but only through the command line and/or HTTP(S) proxy.)

Question: Should I put the main() function (which interprets the command line) inside xmlboiler.core or to create a special package for command line (xmlboiler.command_line)?

Note that currently all support for command line is to be in one file, not (at least yet) into a hierarchy of several packages.

https://github.com/vporton/xml-boiler (currently in debugging).
Reply
#2
I would say create a special package. If you are going to have multiple ways to access the core functionality, I would keep the different access methods separate from that functionality. You don't want to bias things towards one access type, so keeping them in separate packages clarifies keeping them separate conceptually.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Insert command line in script lif 4 974 Mar-24-2025, 10:30 PM
Last Post: lif
  MPEG DASH Package implementation similar to M3U8 package anantha_narayanan 0 582 Feb-06-2025, 03:55 AM
Last Post: anantha_narayanan
  Simplest way to run external command line app with parameters? Winfried 2 1,234 Aug-19-2024, 03:11 PM
Last Post: snippsat
  Create Excel Line Chart Programmatically dee 3 2,000 Dec-30-2022, 08:44 PM
Last Post: dee
  Command line argument issue space issue mg24 5 2,322 Oct-26-2022, 11:05 PM
Last Post: Yoriz
  accept command line argument mg24 5 2,319 Sep-27-2022, 05:58 PM
Last Post: snippsat
  importing functions from a separate python file in a separate directory Scordomaniac 3 2,279 May-17-2022, 07:49 AM
Last Post: Pedroski55
  Python code to read second line from CSV files and create a master CSV file sh1704 1 3,491 Feb-13-2022, 07:13 PM
Last Post: menator01
  Accessing varying command line arguements Rakshan 3 2,979 Jul-28-2021, 03:18 PM
Last Post: snippsat
  How to input & output parameters from command line argument shantanu97 1 3,586 Apr-13-2021, 02:12 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020