Click here to Skip to main content
15,887,027 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Why I don't use python Pin
honey the codewitch7-Feb-24 4:59
mvahoney the codewitch7-Feb-24 4:59 
GeneralRe: Why I don't use python Pin
Chris Maunder7-Feb-24 6:55
cofounderChris Maunder7-Feb-24 6:55 
GeneralRe: Why I don't use python Pin
megaadam7-Feb-24 11:07
professionalmegaadam7-Feb-24 11:07 
GeneralRe: Why I don't use python Pin
honey the codewitch7-Feb-24 11:09
mvahoney the codewitch7-Feb-24 11:09 
GeneralRe: Why I don't use python Pin
megaadam7-Feb-24 11:46
professionalmegaadam7-Feb-24 11:46 
GeneralRe: Why I don't use python Pin
honey the codewitch7-Feb-24 11:53
mvahoney the codewitch7-Feb-24 11:53 
GeneralRe: Why I don't use python Pin
megaadam7-Feb-24 12:18
professionalmegaadam7-Feb-24 12:18 
GeneralRe: Why I don't use python Pin
honey the codewitch7-Feb-24 12:32
mvahoney the codewitch7-Feb-24 12:32 
It's not but for those I have my Program.Base code which makes writing say, a CLI app to wordwrap input files into an output file this easy:

C#
using System;
using System.Collections.Generic;
using System.IO;
internal partial class Program
{
	[CmdArg(Ordinal = 0)] // the description and itemname are filled
	static List<TextReader> Inputs = new List<TextReader>() { Console.In };
	[CmdArg(Name = "output")] // the description and itemname are filled
	static TextWriter Output = Console.Out;
	[CmdArg(Name = "width", Description = "The width to wrap. Defaults based on console window size", ItemName = "columns")]
	static int Width = (int)Math.Floor((double)Console.WindowWidth / 1.5);
	[CmdArg(Name = "ifstale", Description = "Skip if the input file is older than the output file")]
	static bool IfStale = false;
	static void Run()
	{
		if (!IfStale || IsStale(Inputs, Output))
		{
			foreach (var input in Inputs)
			{
				// do this because stdin requires it
				string line;
				while((line = input.ReadLine()) != null)
				{
					Output.WriteLine(WordWrap(line, Width));
				}
			}
		} else
		{
			Console.Error.WriteLine("Skipped execution because the inputs did not change");
		}
	}
}


That parses arguments, presents a using screen, all of that mess. This is how i do "quick things."
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: Why I don't use python Pin
Amarnath S7-Feb-24 3:27
professionalAmarnath S7-Feb-24 3:27 
GeneralRe: Why I don't use python PinPopular
Daniel Pfeffer7-Feb-24 3:52
professionalDaniel Pfeffer7-Feb-24 3:52 
GeneralRe: Why I don't use python Pin
theoldfool7-Feb-24 8:00
professionaltheoldfool7-Feb-24 8:00 
GeneralRe: Why I don't use python Pin
honey the codewitch7-Feb-24 8:30
mvahoney the codewitch7-Feb-24 8:30 
GeneralRe: Why I don't use python Pin
theoldfool7-Feb-24 8:57
professionaltheoldfool7-Feb-24 8:57 
GeneralRe: Why I don't use python Pin
honey the codewitch7-Feb-24 11:02
mvahoney the codewitch7-Feb-24 11:02 
GeneralRe: Why I don't use python Pin
Daniel Pfeffer7-Feb-24 9:46
professionalDaniel Pfeffer7-Feb-24 9:46 
GeneralRe: Why I don't use python Pin
theoldfool7-Feb-24 10:46
professionaltheoldfool7-Feb-24 10:46 
GeneralRe: Why I don't use python Pin
Daniel Pfeffer7-Feb-24 11:04
professionalDaniel Pfeffer7-Feb-24 11:04 
GeneralRe: Why I don't use python Pin
0x01AA9-Feb-24 5:29
mve0x01AA9-Feb-24 5:29 
GeneralRe: Why I don't use python Pin
Daniel Pfeffer10-Feb-24 5:31
professionalDaniel Pfeffer10-Feb-24 5:31 
GeneralWhy I use python Pin
StarNamer@work7-Feb-24 14:03
professionalStarNamer@work7-Feb-24 14:03 
GeneralRe: Why I don't use python Pin
jochance8-Feb-24 4:54
jochance8-Feb-24 4:54 
GeneralRe: Why I don't use python Pin
honey the codewitch8-Feb-24 5:19
mvahoney the codewitch8-Feb-24 5:19 
GeneralRe: Why I don't use python Pin
jochance9-Feb-24 6:07
jochance9-Feb-24 6:07 
GeneralRe: Why I don't use python Pin
honey the codewitch9-Feb-24 6:56
mvahoney the codewitch9-Feb-24 6:56 
GeneralRe: Why I don't use python Pin
jochance9-Feb-24 8:33
jochance9-Feb-24 8:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.