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
  Create Excel Line Chart Programmatically dee 3 1,189 Dec-30-2022, 08:44 PM
Last Post: dee
  Command line argument issue space issue mg24 5 1,337 Oct-26-2022, 11:05 PM
Last Post: Yoriz
  accept command line argument mg24 5 1,304 Sep-27-2022, 05:58 PM
Last Post: snippsat
  importing functions from a separate python file in a separate directory Scordomaniac 3 1,369 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 2,402 Feb-13-2022, 07:13 PM
Last Post: menator01
  Accessing varying command line arguements Rakshan 3 2,049 Jul-28-2021, 03:18 PM
Last Post: snippsat
  How to input & output parameters from command line argument shantanu97 1 2,565 Apr-13-2021, 02:12 PM
Last Post: Larz60+
  How to create new line '/n' at each delimiter in a string? MikeAW2010 3 2,829 Dec-15-2020, 05:21 PM
Last Post: snippsat
  Passing List of Objects in Command Line Python usman 7 3,172 Sep-27-2020, 03:45 PM
Last Post: ndc85430
  How to create and define in one line a 2D list of class objects in Python T2ioTD 1 2,035 Aug-14-2020, 12:37 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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