What kind of program is this

J

John Smith

what kind of program is this?
I would like to know.

import win32api
from win32api import *
import win32con
from win32con import *; from string \
import split

aJAPy = 'C:/Program Files/Python/Lib/ \
JAPy.py'
if split(aJAPy,'.')[-1] in ('py','pyw'\
):
aJAPy = "%s %s %s" % ('J' 'A' 'Py'\
,'','')

aStyle = win32con.MB_ICONEXCLAMATION
aLanguage = win32api.MAKELANGID \
(LANG_NEUTRAL,SUBLANG_DEFAULT)

win32api.MessageBox(0,'Just Another ' \
+ 'Pythoneer',aJAPy,aStyle,aLanguage)
 
D

Dennis Lee Bieber

what kind of program is this?
I would like to know.

import win32api
from win32api import *
import win32con
from win32con import *; from string \
import split
A very badly written one... Did you try running it? Here's the clean
version...

-=-=-=-=-=-=-=-

import win32api
import win32con

aJAPy = 'C:/Program Files/Python/Lib/JAPy.py'

if aJAPy.endswith(".py") or aJAPy.endswith(".pyw"):
## aJAPy = "%s %s %s" % ('J' 'A' 'Py','','')
# That should fail -- three format codes, and five output values
aJAPy = "J A Py"

aStyle = win32con.MB_ICONEXCLAMATION
aLanguage = win32api.MAKELANGID(win32con.LANG_NEUTRAL,
win32con.SUBLANG_DEFAULT)

win32api.MessageBox(0,'Just Another Pythoneer',
aJAPy,
aStyle,
aLanguage)
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
P

Peter Otten

Dennis said:
##aJAPy = "%s %s %s" % ('J' 'A' 'Py','','')
#   That should fail -- three format codes, and five output values

No. 'JAPy' is a single string, oddly written:
'JAPy'

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top