<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Arguments_python_programming</id>
		<title>Arguments python programming - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Arguments_python_programming"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Arguments_python_programming&amp;action=history"/>
		<updated>2026-05-05T16:30:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Arguments_python_programming&amp;diff=41365&amp;oldid=prev</id>
		<title>Heth at 14:05, 13 September 2024</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Arguments_python_programming&amp;diff=41365&amp;oldid=prev"/>
				<updated>2024-09-13T14:05:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:05, 13 September 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import asyncio&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import asyncio&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import sys&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import sys&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import nats&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;#&lt;/ins&gt;import nats&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import argparse&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import argparse&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Arguments_python_programming&amp;diff=41163&amp;oldid=prev</id>
		<title>Heth: Created page with &quot;Example: &lt;source lang=python&gt; import asyncio import sys import nats import argparse  async def main():     args = await parse()     host=args.Host     sub=args.subject     mes...&quot;</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Arguments_python_programming&amp;diff=41163&amp;oldid=prev"/>
				<updated>2023-12-10T08:46:35Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Example: &amp;lt;source lang=python&amp;gt; import asyncio import sys import nats import argparse  async def main():     args = await parse()     host=args.Host     sub=args.subject     mes...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Example:&lt;br /&gt;
&amp;lt;source lang=python&amp;gt;&lt;br /&gt;
import asyncio&lt;br /&gt;
import sys&lt;br /&gt;
import nats&lt;br /&gt;
import argparse&lt;br /&gt;
&lt;br /&gt;
async def main():&lt;br /&gt;
    args = await parse()&lt;br /&gt;
    host=args.Host&lt;br /&gt;
    sub=args.subject&lt;br /&gt;
    mes=args.message&lt;br /&gt;
    debug=args.debug&lt;br /&gt;
&lt;br /&gt;
    print(sub)&lt;br /&gt;
    print(&amp;quot;Done&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
async def parse():&lt;br /&gt;
    p = argparse.ArgumentParser(description='nats publisher utility', epilog='&amp;lt;heth@mercantec&amp;gt;')&lt;br /&gt;
    p.add_argument('-H', '--Host', default='localhost', help='nats server name|ip')&lt;br /&gt;
    p.add_argument('-s', '--subject', type=str, required=True, help='nats subject string')&lt;br /&gt;
    p.add_argument('-m', '--message', type=str, required=True, help='nats message string')&lt;br /&gt;
    p.add_argument('-d', '--debug', help='debug information')&lt;br /&gt;
    return p.parse_args()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
loop = asyncio.get_event_loop()&lt;br /&gt;
task = loop.create_task(main())&lt;br /&gt;
loop.run_until_complete(task)&lt;br /&gt;
pending = asyncio.all_tasks(loop=loop)&lt;br /&gt;
for task in pending:&lt;br /&gt;
    task.cancel()&lt;br /&gt;
group = asyncio.gather(*pending, return_exceptions=True)&lt;br /&gt;
loop.run_until_complete(group)&lt;br /&gt;
loop.close()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	</feed>