Re: noob needs help

2008-12-02 Thread Sambo
Peter Pearson wrote: > When you type "python helloworld.py", python looks for helloworld.py > in the current "working" directory, which is probably your personal > default directory ("~"). For better results, either save helloworld.py > to this directory, or copy it to this directory > ("cp Doc

access to base class __init__

2008-03-05 Thread sambo q
I got myself in jam trying to be too fancy with threading.Thread Docs say / remind to call the base __init__ but I can't fighure out how. --- def main() . ls.listen(5) key = ' ' #while key != EXITCHARCTER: while stop_serving == False: cs, raddr

port forwarding: python scrypt or C ?

2008-01-23 Thread Sambo
Anyone aware of something that I could test my new DSL modem with. when I finally unlocked it ( Siemens 4200 ) some setting I saw made me wonder if it is filtering at all, but tiberian sun internet play was having problems. After going through the instructions at {http://portforward.com/english/r

Re: Push to Make (Single Pole) Button running a loop

2008-01-01 Thread Sambo
Hendrik van Rooyen wrote: > "Jon Todd" wrote: > > >>I'd like to have a button that when pressed executes a loop (this could be a >>thread) and then stops execution when it's released (Push to Make - Single >>Pole in electronics terms). >> >>I've tried the regular way of associating the procedur

Re: split with "*" in string and ljust() puzzles

2006-06-14 Thread Sambo
George Sakkis wrote: > Serge Orlov wrote: > > >>Sambo wrote: >> >>>I have just (finally) realized that it is splitting and removing >>>on single space but that seams useless, and split items >>>1 and 2 are empty strings not spaces?? >> >

split with "*" in string and ljust() puzzles

2006-06-14 Thread Sambo
I have couple of puzzles in my code. def load_headers( group_info ): if os.path.isfile( group_info.pointer_file ): ptr_file = open( group_info.pointer_file, "r" ) else: print group_info.mess_list return linecount = 0 ptr_file.seek( 512 ) print ptr_file.

Re: mutable member, bug or ...

2006-06-12 Thread Sambo
Bruno Desthuilliers wrote: > Sambo a écrit : > >> By accident I assigned int to a class member 'count' which was >> initialized to (empty) string and had no error till I tried to use it >> as string, obviously. Why was there no error on assignment( nea

mutable member, bug or ...

2006-06-04 Thread Sambo
By accident I assigned int to a class member 'count' which was initialized to (empty) string and had no error till I tried to use it as string, obviously. Why was there no error on assignment( near the end ). class Cgroup_info: group_name = "" count = "0" #last time checked and proces

Re: Problem calling math.cos()

2006-04-22 Thread Sambo
Roy Smith wrote: > In article <[EMAIL PROTECTED]>, Sambo <[EMAIL PROTECTED]> > wrote: > > >>I have the following module: >>--- >>import math >> >>def ac_add_a_ph( amp1, ph1, amp2, ph2 ): >> >>amp

Problem calling math.cos()

2006-04-22 Thread Sambo
I have the following module: --- import math def ac_add_a_ph( amp1, ph1, amp2, ph2 ): amp3 = 0.0 ph3 = 0.0 ac1 = ( 0, 0j ) ac2 = ( 0, 0j ) ac3 = ( 0, 0j ) ac1 = complex( amp1 * math.cos( mat

Re: Fixing Python instalation in win2000 by hand

2006-04-17 Thread Sambo
> > c:\temp1>msiexec /I c:\temp1\python-2.4c1.msi /L*v install.log > /L*v ok here it is... before downloading and installin the VB > scripting crap.( in case it starts closing apps > trying to reboot and clear all this typing I've done hehe. > install.log > === Verbose logging started: 17/04

Re: Fixing Python instalation in win2000 by hand

2006-04-17 Thread Sambo
BartlebyScrivener wrote: > > You may want to try disabling any anti-virus software you have running > as they > frequently cause software installation failures. NONE!! > > MSI Installers have a known issue with mapped network drives; please > copy the > installer to the c:\ root drive and try

Re: Fixing Python instalation in win2000 by hand

2006-04-14 Thread Sambo
BartlebyScrivener wrote: >>>Not sure if the .msi installers were broken before, >>>but they are now (on this installation) > > > Are you installing from c:\ ? almost never > > With administrator rights? > pretty sure "YES" > Check other requirements. It chokes if you are installing from anothe

Fixing Python instalation in win2000 by hand

2006-04-14 Thread Sambo
Some time ago I bought a newer computer with W2000 already on it so I moved my old drive to it as secondary( python was installed on non primary partition ). Not sure if the .msi installers were broken before, but they are now (on this installation) and the reason I can't move to brand new instal