<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=Arial size=2>Hello ...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>1.)</STRONG> I noticed, that after I have 
imported some random module (in this case, module I made) there appear an 
additional&nbsp;file in Python\Saves directory, where my modules are stored 
...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The module I imported was 
<STRONG>Sample9.py</STRONG> (green icon), process it. and just after last line 
the new file <STRONG>Sample9.pyc</STRONG> appeared (more or less red icon) 
...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>It has also different content compare to "original" 
file, some sort of "program language" I do not recognize ...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>Sample9.py</STRONG></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>print "tadej"<BR>multiplier = input("Which 
multiplier do you want? Pick a number ")<BR>for j in 
range(1,13):<BR>&nbsp;&nbsp; print "%d x %d = %d" % (j, multiplier, j * 
multiplier)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>Sample9.pyc</STRONG></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>;ò<BR>~æ²?c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 
@&nbsp;&nbsp; sE&nbsp;&nbsp; d&nbsp; GHe&nbsp; d ƒ Z x- e d d ƒ D] Z d 
e e e e f GHq! Wd S(&nbsp;&nbsp; s&nbsp;&nbsp; tadejs,&nbsp;&nbsp; 
Which multiplier do you want? Pick a number i&nbsp;&nbsp; i<BR>&nbsp;&nbsp; s 
&nbsp;&nbsp; %d x %d = %dN(&nbsp;&nbsp; s&nbsp;&nbsp; inputs<BR>&nbsp;&nbsp; 
multipliers&nbsp;&nbsp; ranges&nbsp;&nbsp; j(&nbsp;&nbsp; s&nbsp;&nbsp; 
js<BR>&nbsp;&nbsp; multiplier(&nbsp;&nbsp;&nbsp; (&nbsp;&nbsp;&nbsp; 
s/&nbsp;&nbsp; D:\Program Files\Python\Lib\idlelib\Saves\gg.pys&nbsp;&nbsp; 
?&nbsp;&nbsp; s&nbsp;&nbsp;   </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>What is&nbsp;that *.pyc file is 
&nbsp;??</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>What is it used for&nbsp;(just assuming something has changed in it during 
processing, compare to "original" .py file)&nbsp;??</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>2.)</STRONG> Just before writting this 
mail, when I was trying to make some more complex "read/write" file operatons, I 
always get an error:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>IOError [Errno 2] No such file or directory: 
'Sample.py'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>A also tryed with 
sys.path.append("D:\\PROGRAM~1\Python) function, which worked fine previous 
time, when Python didn't "know" the right path, and there was IOError 
again.&nbsp;Further, to be more certain I also tryed</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;sys.path.append("D:\\PROGRAM~1\Lib\idlelib\Saves\) - the directory, 
where I store my sample files, &nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>... and there was the same error again. Please tell 
me, what am I doing wrong ??</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>3.)</STRONG> And only one question directly 
releated to programming:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I finished with Alan Gauld's tutorial (than you 
again, Alan -&nbsp;it's really the best option for non-programmer to start 
with), so to continue, I am learning from&nbsp;4 new tutorials (not at the same 
time), one&nbsp;from techiwarehouse.com, second is&nbsp;Dive into Python, third 
is <FONT size=6><FONT size=2>"An Informal Introduction to Python</FONT><FONT 
size=2>" from <A href="http://www.python.org">www.python.org</A>&nbsp;and fourth 
is Josh Cogliati's "Python for Non-Programmers"</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT size=2>So in&nbsp;the one from 
techiwarehouse.com, there&nbsp;is an explanation of so-called Logical operators: 
and, or, and not. I do not understand explanation of <STRONG>and</STRONG> 
operator:</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT size=2>Firts it 
says:</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT size=2>For example, x &gt; 0 and 
x &lt; 10 is true only if x is greater than 0 and less than 10. 
</FONT></FONT></FONT></DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT size=2>and 
then:</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT size=6><FONT size=2>
<P>Strictly speaking, the operands of the logical operators should be boolean 
expressions, but Python is not very strict. Any nonzero number is interpreted as 
"true."</P>
<DIV>&gt;&gt;&gt; x = 5</DIV>
<DIV>&gt;&gt;&gt; x and 1</DIV>
<DIV>1</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;&gt;&gt;&nbsp;y = 0</DIV>
<DIV>&gt;&gt;&gt;&nbsp;y and 1</DIV>
<DIV>0</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV>So, how do we get 1 and 0 here ??</DIV>
<DIV>Probably they are not meaning "true" or "false", cause when I typed 
...</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;&gt;&gt; x = 1</DIV>
<DIV>&gt;&gt;&gt; x and 2</DIV>
<DIV>2</DIV>
<DIV>...&nbsp;it gives value 2&nbsp; !!</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>I assume it is releated to "Any nonzero number is interpreted as 
"true.", but I can't get it 100 % ...</FONT></DIV></FONT></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks for any answer, 
Tadey</FONT></DIV></BODY></HTML>