Alon Levy | 2 May 11:12 2007
Picon

Yet Another Searcher for Python Training

Hello List,

 I'm looking for someone to give a basic-midlevel course in python (participants have very basic knowledge of python, and experience with c++). Does anyone on the list offer such training, or knows of such - in israel - and can point me at it? thanks in advance.

--
Alon Levy

Arik Baratz | 4 May 09:28 2007

[OT] python.org.il domain renewal

Hello folks,

As you may or may not know, I own the domain python.org.il, and it's
time to renew it again.

So here's my question: I haven't renewed an Israeli domain since the
registry was open to other registrars. I'm not sure that renewing it
with ISOC is the preferred option anymore. What is your opinion?

Should I renew it with ISOC or should I choose another registrar, and
who? The list (http://isoc.org.il/domain_heb/accredited_registrars.html)
is very short, and none of the incumbents make me feel all warm and
fuzzy inside. They all use ASP based sites, flash and other flare.

Lacking other advise, the only site that didn't ask for my Israeli ID
card, isn't named after a private person, isn't using bad English,
isn't called something that is bad English, doesn't have more than 1
piece of flash per page and looks half decent is livedns.co.il, so
I'll go with them.

Take care,

-- Arik

Maxim Veksler | 7 May 10:52 2007
Picon

curses drives me mad!

Shalom people,

I'm new on this list, and to python in general.
Fun with python to us.

I'm attaching my sanity checking script (which in the mean time doing
it's job perfectly - getting me insanse :)

The lines for error don't print with CR/LF but only with LF; I
susspect curses is to blame but I have no experience with it and
haven't found what proper switches/flags/objects I need to pass to it
to make it work like expected.

Current output
"""
./ColorReport.py
Check directory "/bin" exists
                                              [OK]Check directory
"/usr" exists
                              [OK]Check directory "/opt/hq4ever"
exists
                                     Failed directory existance test
                                                                    Do
you have my-core rpm installed
Check directory "/opt/hq4ever" exists
                                            [FAIL]
"""

expected output
"""
./ColorReport.py
Check directory "/bin" exists
                              [OK]
Check directory "/usr" exists
                              [OK]
Check directory "/opt/hq4ever" exists
    Failed directory existence test
    Do you have my-core rpm installed
Check directory "/opt/hq4ever" exists
                          [FAIL]

the code

"""
#!/usr/bin/python -u

class ColorTerm:
    def __init__(self, Mono = False):
	pass

    def __get_tput_color_value__(colorcode):
	from commands import getoutput
	return getoutput('tput setaf ' + colorcode)

    BLACK_FG = 	__get_tput_color_value__('0')
    RED_FG = 		__get_tput_color_value__('1')
    GREEN_FG = 	__get_tput_color_value__('2')
    YELLOW_FG = 	__get_tput_color_value__('3')
    BLUE_FG = 		__get_tput_color_value__('4')
    MAGENTA_FG = 	__get_tput_color_value__('5')
    CYAN_FG = 		__get_tput_color_value__('6')
    WHITE_FG = 	__get_tput_color_value__('7')

    def black(self, msg):
	return self.BLACK_FG + msg + self.BLACK_FG

    def red(self, msg):
	return self.RED_FG + msg + self.BLACK_FG

    def green(self, msg):
	return self.GREEN_FG + msg + self.BLACK_FG

    def yellow(self, msg):
	return self.YELLOW_FG + msg + self.BLACK_FG

    def blue(self, msg):
	return self.BLUE_FG + msg + self.BLACK_FG

    def magenta(self, msg):
	return self.MAGENTA_FG + msg + self.BLACK_FG

    def cyan(self, msg):
	return self.CYAN_FG + msg + self.BLACK_FG

    def white(self, msg):
	return self.WHITE_FG + msg + self.BLACK_FG

class StatusWriter(ColorTerm):
    import curses

    def __init__(self, report_type = None):
        pass

    def initstyle_message(self, printed_msg, status = True):
        screen = self.curses.initscr(); self.curses.endwin()
        if status:
            status_msg = '[' + self.green('OK') + ']'
	    status_msg_len = len('['+'OK'+']')
        else:
            status_msg = '[' + self.red('FAIL') + ']'
	    status_msg_len = len('['+'FAIL'+']')
	
        __spaces_count = ( screen.getmaxyx()[1] -
(len(printed_msg)+status_msg_len)  )
	#print ''
	#print len(printed_msg)
	#print __spaces_count
	#print len(status_msg)
	#print '=', len(printed_msg)+__spaces_count+len(status_msg)
        return printed_msg + ' '*__spaces_count + status_msg

    def initstyle_skip_message(self, msg):
        screen = self.curses.initscr(); self.curses.endwin()
        status_msg = '[' + self.yellow('SKIP') + ']'

        __spaces_count = ( screen.getmaxyx()[1] - (len(msg)+len(status_msg)) )
        return msg + ' '*__spaces_count + status_msg

class SanityCheck():
    cc = StatusWriter()

    def __init__(self, test_name, depends = []):
        self.status = None
        self.test_name = test_name
        self.depends = depends
        pass

    def directory_exists(self, dirpath):
	import os.path
	import sys

	usr_output_info = 'Check directory "' + dirpath + '" exists'
	sys.stdout.write(usr_output_info)

	if os.path.exists(dirpath):
            if self.status == None:
                self.status = True
            sys.stdout.write( self.cc.initstyle_message(usr_output_info) )
        else:
            self.status = False
	    print
	    print "Failed directory existence test"
	    print "Do you have", '-'.join(self.test_name.split('_')[:2]),
"rpm installed"
            sys.stdout.write(
self.cc.initstyle_message(usr_output_info, False) )

    def file_exists(self, filepath):
        pass

    def directory_writable(self, dirpath):
        pass

    def file_executable(self, filepath):
        pass

    def oscommand(self, command):
        pass

    def docheck(self, check, predeps_check = []):
        pass
        for check_field in predeps_check:

            if not ChecksMap[check_field]:
                raise check_field + " failed!"
        pass

my_core_paths = SanityCheck('my_core_paths')

my_core_paths.directory_exists('/bin')
my_core_paths.directory_exists('/usr')
my_core_paths.directory_exists('/opt/hq4ever')
"""

Thanks for the helps guys (and girls).

Maxim.
--

-- 
Cheers,
Maxim Veksler

"Free as in Freedom" - Do u GNU ?

Ori Peleg | 7 May 23:39 2007
Picon

Re: curses drives me mad!

Hi Maxim!

I'm not a curses expert and I don't know why this is happening, but maybe these suggestions will help:

  1. Have you read the tutorial Curses Programming with Python ? I found it very helpful.
  2. Try using curses.addstr to print text (including colors) instead of 'print' or 'sys.std*'. Examples are in the tutorial.
  3. curses.wrapper is nice, takes care of initscr and friends.
  4. Check out the Python curses demos, here or in a Python source tarball.
  5. Bli Kesher, you can get the color codes from terminfo without running 'tput' (but you don't need them when using curses.addstr):
    curses.setupterm() # not needed if you call curses.initscr()
    curses.tparm(curses.tigetstr('setaf'), 0) # same as commands.getoutput('tput setaf 0')
Hope I helped,
Ori.

On 5/7/07, Maxim Veksler <hq4ever <at> gmail.com> wrote:
Shalom people,

I'm new on this list, and to python in general.
Fun with python to us.

I'm attaching my sanity checking script (which in the mean time doing
it's job perfectly - getting me insanse :)

The lines for error don't print with CR/LF but only with LF; I
susspect curses is to blame but I have no experience with it and
haven't found what proper switches/flags/objects I need to pass to it
to make it work like expected.

Current output
"""
./ColorReport.py
Check directory "/bin" exists
                                              [OK]Check directory
"/usr" exists
                              [OK]Check directory "/opt/hq4ever"
exists
                                     Failed directory existance test
                                                                   &nbs p;Do
you have my-core rpm installed
Check directory "/opt/hq4ever" exists
                                            [FAIL]
"""

expected output
"""
./ColorReport.py
Check directory "/bin" exists
                              [OK]
Check directory "/usr" exists
                              [OK]
Check directory "/opt/hq4ever" exists
    Failed directory existence test
    Do you have my-core rpm installed
Check directory "/opt/hq4ever" exists
                          [FAIL]

the code

"""
#!/usr/bin/python -u

class ColorTerm:
    def __init__(self, Mono = False):
        pass

    def __get_tput_color_value__(colorcode):
        from commands import getoutput
        return getoutput('tput setaf ' + colorcode)

    BLACK_FG =  __get_tput_color_value__('0')
    RED_FG =            __get_tput_color_value__('1')
    GREEN_FG =  __get_tput_color_value__('2')
    YELLOW_FG =         __get_tput_color_value__('3')
    BLUE_FG =           __get_tput_color_value__('4')
    MAGENTA_FG =        __get_tput_color_value__('5')
    CYAN_FG =           __get_tput_color_value__('6')
    WHITE_FG =  __get_tput_color_value__('7')

    def black(self, msg):
        return self.BLACK_FG + msg + self.BLACK_FG

    def red(self, msg):
        return self.RED_FG + msg + self.BLACK_FG

    def green(self, msg):
        return self.GREEN_FG + msg + self.BLACK_FG

    def yellow(self, msg):
        return self.YELLOW_FG + msg + self.BLACK_FG

    def blue(self, msg):
        return self.BLUE_FG + msg + self.BLACK_FG

    def magenta(self, msg):
        return self.MAGENTA_FG + msg + self.BLACK_FG

    def cyan(self, msg):
        return self.CYAN_FG + msg + self.BLACK_FG

    def white(self, msg):
        return self.WHITE_FG + msg + self.BLACK_FG

class StatusWriter(ColorTerm):
    import curses

    def __init__(self, report_type = None):
        pass

    def initstyle_message(self, printed_msg, status = True):
        screen = self.curses.initscr(); self.curses.endwin()
        if status:
            status_msg = '[' + self.green('OK') + ']'
            status_msg_len = len('['+'OK'+']')
        else:
            status_msg = '[' + self.red('FAIL') + ']'
            status_msg_len = len('['+'FAIL'+']')

        __spaces_count = ( screen.getmaxyx()[1] -
(len(printed_msg)+status_msg_len)  )
        #print ''
        #print len(printed_msg)
        #print __spaces_count
        #print len(status_msg)
        #print '=', len(printed_msg)+__spaces_count+len(status_msg)
        return printed_msg + ' '*__spaces_count + status_msg

    def initstyle_skip_message(self, msg):
        screen = self.curses.initscr(); self.curses.endwin()
        status_msg = '[' + self.yellow('SKIP') + ']'

        __spaces_count = ( screen.getmaxyx()[1] - (len(msg)+len(status_msg)) )
        return msg + ' '*__spaces_count + status_msg

class SanityCheck():
    cc = StatusWriter()

    def __init__(self, test_name, depends = []):
        self.status = None
        self.test_name = test_name
        self.depends = depends
        pass

    def directory_exists(self, dirpath):
        import os.path
        import sys

        usr_output_info = 'Check directory "' + dirpath + '" exists'
        sys.stdout.write(usr_output_info)

        if os.path.exists(dirpath):
            if self.status == None:
                self.status = True
            sys.stdout.write( self.cc.initstyle_message(usr_output_info) )
        else:
            self.status = False
            print
            print "Failed directory existence test"
            print "Do you have", '-'.join(self.test_name.split('_')[:2]),
"rpm installed"
            sys.stdout.write(
self.cc.initstyle_message(usr_output_info, False) )



    def file_exists(self, filepath):
        pass

    def directory_writable(self, dirpath):
        pass

    def file_executable(self, filepath):
        pass

    def oscommand(self, command):
        pass


    def docheck(self, check, predeps_check = []):
        pass
        for check_field in predeps_check:

            if not ChecksMap[check_field]:
                raise check_field + " failed!"
        pass

my_core_paths = SanityCheck('my_core_paths')

my_core_paths.directory_exists('/bin')
my_core_paths.directory_exists('/usr')
my_core_paths.directory_exists('/opt/hq4ever')
"""


Thanks for the helps guys (and girls).

Maxim.
--
Cheers,
Maxim Veksler

"Free as in Freedom" - Do u GNU ?

Maxim Veksler | 12 May 00:17 2007
Picon

Re: curses drives me mad!

On 5/8/07, Ori Peleg <oripel <at> gmail.com> wrote:
> Hi Maxim!
>
> I'm not a curses expert and I don't know why this is happening, but maybe
> these suggestions will help:
>
> Have you read the tutorial Curses Programming with Python ? I found it very
> helpful.
> Try using curses.addstr to print text (including colors) instead of 'print'
> or 'sys.std*'. Examples are in the tutorial.
> curses.wrapper is nice, takes care of initscr and friends.
> Check out the Python curses demos, here or in a Python source tarball.
> Bli Kesher, you can get the color codes from terminfo without running 'tput'
> (but you don't need them when using curses.addstr):
> curses.setupterm() # not needed if you call curses.initscr()
>  curses.tparm(curses.tigetstr('setaf'), 0) # same as
> commands.getoutput('tput setaf 0')
>  Hope I helped,
> Ori.
>

Hi,

I found out about TIOCGWINSZ so here is the implementation in python
to get what I screen x,y (the reason I've used curses in the first
place). Thanks for the help :)

"""
# Determining Terminal or Window Size

# either use ioctl
import struct, fcntl, termios, sys

s = struct.pack("4H", 0, 0, 0, 0)
hchar, wchar = struct.unpack("4H", fcntl.ioctl(sys.stdout,
termios.TIOCGWINSZ, s))[:2]
print hchar, wchar
"""

The code is a slightly modified version of
http://pleac.sourceforge.net/pleac_python/userinterfaces.html

As a side note, yes I did read the curses tutorial, I find it fuzzy.

Maxim.

--

-- 
Cheers,
Maxim Veksler

"Free as in Freedom" - Do u GNU ?

Gabor Szabo | 15 May 12:45 2007
Picon

OSDC Israel 2008 - Call for Organizers

Hi,

After a year break I would like to try to organize another OSDC in
Israel around Februray 2008. The conference is planned to be 3 days
long with 3-4 parallel tracks.

The first step for this is to assemble the list of organizers,
especially the content managers and language liaisons.

I would like to have 4 main tracks in the conference, one for each one
of the P languages:
Perl, Python, PHP and Ruby.

For each track I need one or better two person who will act as content managers.

The task of the content manager is to
1) make sure the community knows about the conference
2) make sure when we set the date it does not conflict with some event
of the community
    (e.g. German Perl Workshop, PyCon tend to be in February)
3) Find speakers and other people who will generate *good* content
4) Fnd a star speaker possibly from abroad (if we have the budet for
the invitation)
5) Get the speakers to submit their talks in time to be printed in the
proceeedings
6) Get the slides to be posted on the web site
7) Probably other things I don't remember now.

So in order to start organizing - or at least to see if there is
enough interest in the communities to have a conference please let me
know if you are interested in being
the conent manager for one of the languages.

regards
   Gabor
   http://www.osdc.org.il/

--
Gabor Szabo
http://www.szabgab.com/
Perl Training in Israel  http://www.pti.co.il/
08-975-2897   054-4624648

Amit Aronovitch | 16 May 23:45 2007
Picon

may meeting - call for talks

We set a tentative date: Tuesday, 29/5.

Anyone with ideas for talks, is welcome to declare publicly or contact
me privately.

http://wiki.python.org.il/Upcoming_Meeting

  Cheers,
        AA

Mark Koudritsky | 19 May 12:19 2007
Picon

Commercial support for Subversion needed

Hi all,
Please forgive me if it's somewhat off topic but I haven't found any
mailing list specific to both subversion and Israel, so, posting it
here.

On my new job in a large financial organization we are trying to
promote Subversion (and maybe Trac) for our group's project (which is
a large plain C application running on OpenVMS) currently the group
uses no source management tool whatsoever.

Our direct management is supportive but we meet considerable
resistance from the infrastructure people, they are very MS oriented
and when it's not MS, the company policy is that the administration of
it should be outsourced. Not that we have much choice, since MS tools
like VSS and TeamSystem currently in use in the organization don't
provide any support for OpenVMS (Subversion does via Java based SvnKit
command line client. The svn server, of course, will run on Win or
Linux box).

So my questions are:
1)	Do you know some Israeli company that provides paid for support for
Subversion including server side installations and ongoing
maintenance? (no need to tell me it's easy enough to do it ourselves,
I know that)
2)	It would be nice to have some examples of large Israeli
organizations or companies that use Subversion (or svn+Trac).
3)	If somebody already used svn under VMS, I would be glad to hear
about your experience, we are only beginning to test it.
4)	If somebody used both svn and MS TeamSystem it would be nice to
hear how they compare. (I hope I don't start any flame wars with
this).

Thank you and best regards

 - Mark

Shlomi Fish | 19 May 12:46 2007
Picon

Re: Commercial support for Subversion needed

On Saturday 19 May 2007, Mark Koudritsky wrote:
> Hi all,
> Please forgive me if it's somewhat off topic but I haven't found any
> mailing list specific to both subversion and Israel, so, posting it
> here.
>
> On my new job in a large financial organization we are trying to
> promote Subversion (and maybe Trac) for our group's project (which is
> a large plain C application running on OpenVMS) currently the group
> uses no source management tool whatsoever.
>
> Our direct management is supportive but we meet considerable
> resistance from the infrastructure people, they are very MS oriented
> and when it's not MS, the company policy is that the administration of
> it should be outsourced. Not that we have much choice, since MS tools
> like VSS and TeamSystem currently in use in the organization don't
> provide any support for OpenVMS (Subversion does via Java based SvnKit
> command line client. The svn server, of course, will run on Win or
> Linux box).
>
> So my questions are:
> 1)	Do you know some Israeli company that provides paid for support for
> Subversion including server side installations and ongoing
> maintenance? (no need to tell me it's easy enough to do it ourselves,
> I know that)

See:

http://www.iglu.org.il/wiki/index.php/Consulting/Subversion

I'm included there and would be happy to give support, but I can speak highly 
of the other two companies there.

> 2)	It would be nice to have some examples of large Israeli
> organizations or companies that use Subversion (or svn+Trac).

I believe Intel Israel started deploying Subversion for some of their version 
control needs a few years ago (email me if you want a contact there). I also 
know of my last workplace which isn't large by any means, where the Linux 
team and VLSI team used Subversion (while the Windows team did not use any 
VCS whatsoever.)

> 3)	If somebody already used svn under VMS, I would be glad to hear
> about your experience, we are only beginning to test it.

Sorry I don't.

That's what Google yields:

http://svn.haxx.se/users/archive-2005-09/1308.shtml

You might be able to build the ANSI C svn client.

> 4)	If somebody used both svn and MS TeamSystem it would be nice to
> hear how they compare. (I hope I don't start any flame wars with
> this).

* http://www.szabgab.com/subversion_vs_xyz.html

* http://en.wikipedia.org/wiki/Comparison_of_revision_control_software

Hope it helps.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif <at> iglu.org.il
Homepage:        http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
    -- An Israeli Linuxer

Beni Cherniavsky | 24 May 11:48 2007
Picon

Python users in Israel

You wrote in `The Python Papers`_, Volume 2, Issue 2, Letter from the Editor:
> If anyone from Japan, Singapore, Taiwan or Israel would like
> to contact The Python Papers, we would love to hear from you
> as we do not currently have any contacts from these countries.

Hi.  I'm a Python user from Israel, currently reading Python Papers :-).

Here's is my attempt at a (subjective) picture of Python usage in Israel.
Israel has been a mostly Perl country in the 90s; there were a few
cases of internal Python use but no public awareness.  This century
Python awareness and usage has risen sharply.
We formed a PUG_ (CC:ed) in 2005, holding monthly meetings with 5-25 attendance.
In 2006 the established Perl conference was expanded to a very
successful (IMHO) 3-day conference_ on all "P" languages, including a
solid Python track.
I could name at least a dozen companies seriously using Python.

.. _The Python Papers: http://pythonpapers.cgpublisher.com/
.. _PUG:  http://wiki.python.org.il/Main_Page
.. _confenrence: http://www.osdc.org.il/2006/

BTW, Perl is still popular, and PHP and Ruby are also used a lot here.

--

-- 
Beni Cherniavsky <cben <at> users.sf.net> (I read email only on weekends)


Gmane