The following script works fine:
#!/bin/python
import socket
str = raw_input("Enter a domain name: ");
print "Your domain is ", str
print socket.gethostbyname(str)
You provide it a hostname, it provides an IP. That works fine. But I need a
way to handle errors. For example:
[root@bart /]#
Note the following code:
import subprocess
import shlex
domname = raw_input("Enter your domain name: ");
print "Your domain name is: ", domname
print "\n"
# cmd='dig @4.2.2.2 nbc.com ns +short'
cmd="dig @4.2.2.2 %s ns +short", % (domname)
proc=subprocess.Popen(shlex.split(cmd),stdout=subprocess
I'm trying to create an table in html from a Maria DB table, from a python
script. I'm getting some unexpected results.
The environment is Centos 7, I'm using Python3 with apache.
Here is copy of the script I'm using:
*** SCRIPT START *
import mysql.connector
import cgitb
cgitb.
On Tuesday, September 15, 2020 at 2:52:35 PM UTC-4, larry.mart...@gmail.com
wrote:
> On Tue, Sep 15, 2020 at 11:45 AM SS wrote:
> >
> > I'm trying to create an table in html from a Maria DB table, from a python
> > script. I'm getting some unexpected result
On Tuesday, September 15, 2020 at 2:52:35 PM UTC-4, larry.mart...@gmail.com
wrote:
> On Tue, Sep 15, 2020 at 11:45 AM SS wrote:
> >
> > I'm trying to create an table in html from a Maria DB table, from a python
> > script. I'm getting some unexpected result
Hello,
ive started using python for a few weeks now, and came across a
problem that i would appreciate help solving. im trying to create
code which can grab real time quotes from yahoo (yes ive created an
account for yahoo finance). But im not sure how to generate an
authenticated login and how t
I'm trying to make the following code work:
import os, sys
app=['host1', 'host2', 'host3']
for i in app:
os.system('nmap -p 22 -P0 %s | grep open 2>&1 > /dev/null && echo "%s up"
I've tried many different iterations of the os.system call, how to make this
work?
TIA
--
https://mail.pytho
Check out the following simple code:
#!/bin/python
print "1 - echo 1"
print "2 - echo 2"
answer = input("Enter your choice - ")
if answer == 1:
print "1"
elif answer == 2:
print "2"
else:
print "Invalid choice!"
The else statement noted above works fine for numeric values other then 1 o
On Friday, September 1, 2017 at 9:32:16 AM UTC-4, SS wrote:
> Check out the following simple code:
>
> #!/bin/python
>
> print "1 - echo 1"
> print "2 - echo 2"
>
> answer = input("Enter your choice - ")
>
> if answer == 1:
>
Whenever I try to install any packages with “pip install”, I am getting an
error.
Traceback (most recent call last):
File
"C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\runpy.py",
line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File
"C:\Users\
dailystockselect.com needs a couple of talented python people for the
development and implementation of new trading strategies.
it may be also some pythonic design change for the displayed figures
now the web app consists of 1 of the 8 conceived strategies.
contact us at the email on the website f
what the heck!
who told you this is a spam!
this is a call for cooperation and collaboration
how retarded!
On Sunday, January 5, 2014 4:14:22 AM UTC-5, maxwe...@gmail.com wrote:
> On Thursday, January 2, 2014 11:37:59 AM UTC, d ss wrote:
>
> > dailystockselect.com needs a couple
On Monday, January 6, 2014 12:06:45 PM UTC-5, Chris Angelico wrote:
> On Tue, Jan 7, 2014 at 3:58 AM, d ss wrote:
>
> > what the heck!
>
> > who told you this is a spam!
>
> > this is a call for cooperation and collaboration
>
> > how retarded!
>
>
On Monday, January 6, 2014 6:58:30 PM UTC-5, Walter Hurry wrote:
> On Mon, 06 Jan 2014 13:11:53 -0800, d ss wrote:
>
>
>
> i wrote just 2 words with a clear
>
> > indicative title: "Python, Finance" which summarizes the following "if
>
> > y
ovide full source code if needed):
>>> from win32com.client import gencache
>>> file = 'C:\Shoaev\dev_qxdm\mylog.isf'
>>> mod = gencache.GetModuleForProgID('DMCoreAutomation.ItemStoreFiles')
>>> ds = mod.Dispatch('DMCoreAutomation.Ite
Apologies for any multiple copies received. We would appreciate it if you
could distribute
the following call for papers to any relevant mailing lists you know of.
CALL FOR PAPERS
Special Sess
Apologies for any multiple copies received. We would appreciate it if you
could distribute
the following call for papers to any relevant mailing lists you know of.
CALL FOR PAPERS
Special Sess
Apologies for any multiple copies received. We would appreciate it if
you could distribute
the following call for papers to any relevant mailing lists you know
of.
2nd CALL FOR PAPERS
===
Special
Apologies for any multiple copies received. We would appreciate it if
you could distribute the following call for papers to any relevant mailing
lists you know
of.
---
Dear authors,
=
International Workshop: DATICS-ISPA'11
CALL FOR PAPERS
http://datics.nesea-conference.org/datics-ispa2011
Busan, Korea, 26-28 May, 2011.
=
Aims
20 matches
Mail list logo