Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-23 Thread Godson
From: James Stroud <[EMAIL PROTECTED]>
To: [email protected]
Date: Thu, 19 Oct 2006 20:34:26 GMT
Subject: Re: Tkinter--does anyone use it for sophisticated GUI development?
Kevin Walzer wrote:
> I'm a Tcl/Tk developer who has been working, slowly, at learning Python,
> in part because Python has better support for certain kinds of
> applications that I want to develop than Tcl/Tk does. Naturally, I
> thought that I would use Tkinter as the GUI for these programs. However,
> in doing research into GUI development techniques, sample code, and
> showcase applications, what has struck me is how little sophisticated
> GUI development seems to be done in Tkinter as compared to, say,
> wxPython. I've found plenty of tutorials on how to do basic GUI stuff
> with Tkinter, but that stuff pretty much ends with the core Tk widgets
> (buttons, entry fields, scrollbars, and menu items).
>
> Coming from Tcl/Tk, where there are a huge number of extension packages
> to enhance the Tk widgets and which allow you to make really polished
> GUI's, I'm struck mainly by how little of this stuff has made it over
> into Tkinter/Python. For instance, I've developed several Tcl
> applications that use the core Tk widgets, the Tile theming package, the
> Bwidget set (great tree widget and listbox, which allows you to embed
> images), and tablelist (an extremely flexible muti-column listbox
> display). I've found Python wrappers for some of this stuff, but almost
> no documentation on how to use them, and very little in the way of
> actual applications making use of them--which is itself a red flag. And
> most of the pure-Python extension stuff that I've found, such as Python
> megawidgets, is pretty dated/ugly and lags far behind the comparable
> stuff on the Tcl side.
>
> Am I better off biting the bullet and learning wxPython--a different GUI
> paradigm to go with the new language I'm trying to learn? I had hoped to
> reduce my learning curve, but I'm very concerned that I simply can't do
> what I want to do with Tkinter. What do other Tkinter developers think?

I've used Tkinter + bwidgets for Crescendo which you can find in this page http://godson.auroinfo.com/downloads
you can look at the screen shots of Crescendo there. We have a wrapper for Tile written by Franklin a long time ago 
but his site is down currently.  here is the google cached version
of that page
http://72.14.209.104/search?hl=en&q=cache%3Ahttp%3A%2F%2Fmfranklin.is-a-geek.org%2Fdocs%2FTile%2Findex.html&btnG=Search&meta=

Bwidgets wrapper of python has not all widgets that Bwidgets offers, i've tried changing the file __init__.py its pretty easy.

Regards,
Godson.


-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Porting Tkinter application to JYthon

2006-11-23 Thread Godson

On 11/23/06, sandip desale <[EMAIL PROTECTED]> wrote:


Dear All,

We have a Tcl/Tk application written using Python 2.2. Using this
application we want to call some customizable Java APIs. I tried porting
Tcl/Tk application to Jython but not able to do the same as TKinter library
is not available with JYthon.

Can you please help me in porting Tkinter application to Jython? Also
kindly let me know how to do the same.


Thanks & Regards,
Sandip Desale


--

Search for products and services at:
http://search.mail.com
--
http://mail.python.org/mailman/listinfo/python-list




Try this, may be this is what you are looking for

http://jtkinter.sourceforge.net/

Godson Gera
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: How can I change the icon

2006-12-01 Thread Godson

On 30 Nov 2006 13:05:23 -0800, Boneh <[EMAIL PROTECTED]> wrote:



Boneh wrote:
> Is it possible to change the icon "Tk" of the windows popped up ?

I am using tkinter for widgets, thanks :-)

--
http://mail.python.org/mailman/listinfo/python-list




user iconbitmap method to change the icon of the window, this method works
on all root or Toplevel windows

iconbitmap(path of the ico file)

Example

from Tkinter import*
root=TK()
root.iconbitmap("c:/python25/smiley.ico")


Godson Gera
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python, PostgreSQL, What next?

2006-12-01 Thread Godson

On 1 Dec 2006 23:04:37 -0800, vbgunz <[EMAIL PROTECTED]> wrote:


Hello all,

I've studied Python and studied PostgreSQL. What is the absolute next
best step to take to merge these two finely together? I've heard of
SQLAlchemy and some others but before I dive in, I would really like
the opinion of those who tried it and other toolkits.

My main concern is, I would like to completely work with a database
from Python. What would you suggest I look into?

Thank you for your time!

--
http://mail.python.org/mailman/listinfo/python-list



I am using psycopg 1.1.21 for interacting with postgresql, which proved to
be good for my need i guess django and  zope  also using psycopg for doing
things with postgresql, to get started with that, The following links could
be useful

http://initd.org/pub/software/psycopg/dbapi20programming.pdf


http://www.python.org/dev/peps/pep-0249/

Godson Gera
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: os.mkdir and mode

2006-12-01 Thread Godson

On 1 Dec 2006 23:17:50 -0800, vj <[EMAIL PROTECTED]> wrote:


How do I do the following unix command:

mkdir -m770 test

with the os.mkdir command. Using os.mkdir(mode=0770) ends with the
incorrect permissions.

Thanks,

VJ

--
http://mail.python.org/mailman/listinfo/python-list





using

os.mkdir("/home/godson/test",0770)

Allows me to do that with out any trouble, and also please check whether you
have appropriate permission to the area where you are trying to create the
folder. os.mkdir takes no keyword arguments, if you dont have appropriate
permissions you can try running python as super user, or user with proper
permissions.

Godson Gera
http://godson.auroinfo.com  <http://godson.auroinfo.com/>
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Godson

On 8 Dec 2006 01:57:20 -0800, Allen <[EMAIL PROTECTED]> wrote:



> Sure, and earth is a heavy version of a basketball. If all you have is
> a hammer...
>

It is not make sense to compare earth and basketball.
I think Python introduced many idea of matlab.

If you have used matlab, you will say that they are very very similar,
except that matlab was born years earlier and is used mainly in the
area
of matrix calculation.

I do not mean Python shall feel ashamed for it. We will be pleased that
Python
does absorb many successful ideas of computer languages.

--
http://mail.python.org/mailman/listinfo/python-list



Yes starting from the prompt '>>>' to concept of name spaces, they are
alike, I came to know python first later Matlab in college.  The scope of
matlab is very narrow ,scientific computations and nothing else, To me
matlab seems to be a subset of python, and python being light weight, cause
it swallows what ever comes in it way!!! [
http://www.ibiblio.org/Dave/Dr-Fun/df24/df2406.jpg ]

--
Godson Gera,
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: play video file

2006-12-11 Thread Godson

On 11 Dec 2006 00:10:59 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


hi...
plase take me a simple code for a run a video file with tkinter???

or pymedia...

thanks

fabri

--
http://mail.python.org/mailman/listinfo/python-list



It cant be more simple than this but with pygame! most of the pymedia
examples use pygame for overlay.

http://godsongera.blogspot.com/2006/12/play-mpeg-file-with-python.html

from pygame import display,movie

overlay = display.set_mode((800,600))
m=movie.Movie("some.mpg")
m.set_display(overlay)
m.paly()
--
Godson Gera,
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Retrieve Tkinter listbox item by string, not by index

2006-12-23 Thread Godson

On 12/23/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:


I'm trying to set the active item in a Tkinter listbox to my
application's currently-defined default font.

Here's how I get the fonts loaded into the listbox:

  self.fonts=list(tkFont.families())
  self.fonts.sort()

   for item in self.fonts:
 self.fontlist.insert(END, item)   #self.fontlist is the
ListBox instance


So far, so good. But I don't know how to set the active selection in the
listbox to the default font. All the methods for getting or setting a
selection in the listbox are based on index, not a string. And using
standard list search methods like this:

if "Courier" in self.fontlist:
 print "list contains", value
 else:
 print value, "not found"

returns an error:

TypeError: cannot concatenate 'str' and 'int' objects

So I'm stuck. Can someone point me in the right direction?
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


to me self.fontlist to be a Listbox instance so you cant do a list search on
it, to get current selection from a list box use curselection method Listbox

self.fontlist.curselection()

returns a list of index numbers of  currently selected items in a list box,
following link has more to say on this

http://effbot.org/tkinterbook/listbox.htm

--
Godson Gera,
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: python and MOV or MPEG

2007-01-15 Thread Godson

On 1/15/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:


siggi wrote:

> Hi all,
>
> does Python support MPEG or MOV videoclips? I couldn't find anything
about
> it online.

Weak in googling today? Must have been a rough weekend.

There are several options, including pymedia and pygame.

Diez
--
http://mail.python.org/mailman/listinfo/python-list



Here is a way how you can do it!

http://godsongera.blogspot.com/2006/12/play-mpeg-file-with-python.html

--
Godson Gera,
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Twisted 12.2.0 released

2012-09-03 Thread Godson Gera
On Sat, Sep 1, 2012 at 7:17 PM, Ashwini Oruganti  wrote:

> On behalf of Twisted Matrix Laboratories, I am honored to announce the
> release of Twisted 12.2.
>
>
Congrats, Ashwini. adoptStreamConnection is much needed feature, happy to
see that added to this release.

-- 
Thanks & Regards,
Godson Gera
http://godson.in
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How do you get the value you entered using the Entry widget in Tkinter?

2011-07-13 Thread Godson Gera
On Wed, Jul 13, 2011 at 1:31 PM, Benji Benjokal  wrote:

> What is the simplist way to get the value you entered from the Entry widget
> in  Tkinter?
>

 Have you tried the get method of Entry widget ?

Here is a crude example

from Tkinter import*
r = Tk()
e = Entry(r)
e.pack()
def printData():
 print e.get()
b = Button(r,text='getdata',command=printData)
b.pack()
r.mainloop()






-- 
Thanks & Regards,
Godson Gera
Python Consultant India <http://godson.in/>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Communicating from Flash to Python

2011-03-03 Thread Godson Gera
You can use PyAMF http://pyamf.org

On Fri, Mar 4, 2011 at 3:31 AM, Victor Subervi wrote:

> Hi;
> I have an AS3 script that is supposed to communicate with a python script
> and I don't think it is. The python script is to email. How can I
> trouble-shoot this?
> Beno
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>


-- 
Thanks & Regards,
Godson Gera
VoIP Consultant India <http://godson.in/>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter FileDialog

2011-05-22 Thread Godson Gera
Hi,

You can try the following

from Tkinter import*
root = Tk()
root.withdraw() #this will hide the main window
import tkFileDialog as tkf
f = tkf.Open().show()

tkFileDialog, requires a main window to be existing before it can show the
file dialog. If there are no main windows then it will create its own.
On Mon, May 23, 2011 at 1:43 AM, Alex van der Spek  wrote:

> Trying to bring up a simple File or Directory chooser using Tkinter. Right
> now I use pywin32  as Mark Hammond's extensions are somewhat more familiar
> to an (ex)VB programmer who started way back with Fortran.
>
> On Windows Vista with Python 2.7. The examples from Mark Lutz' book
> "Programming Python" do not immediately apply. The book describes Python 3.x
> only.
>
> This is what I do (in IDLE):
>
> import tkFileDialog as tk
> file2open=tk.Open().show()
>
> This works. But it also brings up a persistent Tk window. Killing this
> window forces a restart in IDLE, which is not desirable. There does not
> appear to be a way to multiselect files?
>
> I am probably missing a whole lot. Please point me to a simple example of
> GUI file manipulations. I can save myself with os.path.walk and os.listdir
> but the users I try to serve cannot.
>
> Regards,
> Alex van der Spek
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Thanks & Regards,
Godson Gera
FreeSWITCH & Python Consultant India <http://godson.in/>
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] PySWITCH 0.2

2015-06-25 Thread Godson Gera
=
pyswitch 0.2
=

PySWITCH 0.2 is released

Please, note that PySWITCH 0.2 is not available on PyPI because of name
conflict

Major changes to 0.2

*Many new FreeSWITCH API and dialplan commands added

Full list of changes can be found at
http://pyswitch.sourceforge.net/pages/changelog.html

About PySWITCH
=

PySWITCH is a Python <http://python.org/> library to communicate with
FreeSWITCH <http://freeswitch.org/> server via EventSocketLayer (ESL). It's
based on Twisted library. Unlike the default python ESL library that comes
with FreeSWITCH, this library is designed to handle high volume of
concurrent calls with an easy to use API. PySWITCH currently supports
extensive set of FreeSWITCH API and dialplan commands. You need to be
familiar with Twisted library inorder use this.

Project website: http://pyswitch.sf.net
Download Page: http://pyswitch.sourceforge.net/pages/download.html

-- 
Godson Gera
Python Consultant <http://godson.in>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Use of while(1) with app.mainLoop of wxpython

2007-11-01 Thread Godson Gera
On 11/2/07, tarun <[EMAIL PROTECTED]> wrote:
>
> Dear All,
>
> I've have created a GUI (using wxPython widgets) where in I've a message
> log window (A TextCtrl window). I've a router.dll that helps me putting in
> message onto a channel. In my script that generates the GUI, I want to
> continuously poll the channel and populate the messages from the channel to
> the message log window.
>
> For this I've  to put a while (1) loop, but when I do this, the GUI
> doesn't come up. I see the GUI coming when while(1) is removed. Is there any
> issue with usage of app.mainloop and while(1) together.
>
> Quick help would be really appreciated.
>
>
> Hi Tarun,

The best practice to poll things in any GUI application is to use timers
provided by the GUI frameworks. All of the GUI frameworks does provide
timers, so does wxPython. Look for wx.Timer (also look for wx.CallAfter )
and use it to poll what ever the things you want

http://www.wxpython.org/docs/api/wx.Timer-class.html

When you use a while(1) loop, the python interpreter enters into an infinite
local loop thus GUI events never gets processed.  So your case seems be
that, the while loop is getting executed before GUI is drawn on screen, it
will never show up till the loop exits. And if while(1) is executed after
GUI is drawn on screen, it will hangup and will not get updated till the
loop exits. So avoid using while loops in your GUI for polling long running
tasks .

-- 
Godson Gera,
http://godson.auroinfo.com
http://godson.in

-- 
Godson Gera,
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

ANN: starpy-1.0.0a13

2008-10-11 Thread Godson Gera
Hi All,

 I am happy to announce new release of starpy (Asterisk protocols
for Twisted http://starpy.sf.net ) on behalf of starpy team.

 starpy-1.0.0a13 can be downloaded from here
https://sourceforge.net/project/showfiles.php?group_id=164040

This release contains addition of many manager commands to manager API.
Following is a list of newly added commands.


   1. agentLogoff
   2. dbGet
   3. dbPut
   4. extensionState
   5. getConfig
   6. meetmeMute
   7. meetmeUnmute
   8. park
   9. pauseMonitor
   10. playDTMF
   11. queuePause
   12. sipShowPeers
   13. unpauseMonitor
   14. updateConfig (read AMI documentation before using this )
   15. userEvent
   16. waitEvent
   17. zapDNDoff
   18. zapDNDon
   19. zapDialOffhook
   20. zapHangup
   21. zapRestart
   22. zapShowChannels
   23. zapTransfer


   - Those are all the new manager Actions that were added. Queues action is
   there but it won't work cause AMI returns improperly formatted lines, same
   case with IAXPeers action, as AgentCallbackLogin is deprecated and is not
   functioning properly it was not included.
   - Bug fix in queueStatus manager API, in collectDeferred argument
   'QueueStatusEnd' is changed to 'QueueStatusComplete'. Now the deferred fires
   properly.
   - Bug fix in fastagi playback (not a standard AGI command, was created by
   Mike as a workaround for buggy streamFile command back in Asterisk 1.2 days.
   Now streamFile is working properly so you might not be using this playback
   ).


Those are all the changes that are involved in this release if you find any
bugs or hope for any new features let me know.

Have fun with starpy,
Godson Gera
--
http://mail.python.org/mailman/listinfo/python-list


Re: Need some advice

2008-10-21 Thread Godson Gera
On Tue, Oct 21, 2008 at 9:13 PM, azrael <[EMAIL PROTECTED]> wrote:

> I am starting to work on a application and need some advice.
>
> I am planing to develop a desktop application which would have some
> usage, but also it should be able to comunicate to a web server which
> hosts a php web application. So I wanted to ask if someone has some
> expirience with connecting PHP webapplications with Python desktop
> applications. Could someone at leaset point me to the right direction
> where to look for informations.
>
> Please, I know that google is my best friend, and I googled already,
> but hoped that someone would give me a really great link
> --
> http://mail.python.org/mailman/listinfo/python-list
>

When you want your application to talk with a web server it doesn't matter
if its PHP, JSP or ASP. You have to use HTTP protocol to connect to
webserver. If you have simple needs look for 'urllib' in python standard
library,  Use threads while using urllib with your GUI other wise the whole
application will become unresponsive.

Godson Gera
http://godson.in
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to navigate one window to another window through python scripts ?

2008-11-12 Thread Godson Gera
On Wed, Nov 12, 2008 at 3:01 PM, sambasivareddy
<[EMAIL PROTECTED]>wrote:

>  Hi all,
>
>
>
> How to navigate one window to another window through python scripts ?
>
>
>
> Basically I want to do  Automatic testing one windows base c#.net
> application through python scripts.
>
>
>
> I am Able to open the executable file with following scripts.
>
> Import os
>
>  Os.system ('abc.exe')
>
>
>
> But how to navigate from one window to another window?
>
> How to set values in that window with python script?
>
>
>
> if any one have sample code and documents Plz share to me.
>
> Your inputs will really helpful and thanks in advance !
>
>
>
> *Regards**,*
>
> *Sambasivareddy.S*
>

You can use pywinauto http://pywinauto.openqa.org/ to automate desktop
applications on windows.

Thanks & Regards,
Godson Gera
http://godson.in
--
http://mail.python.org/mailman/listinfo/python-list


ANN: StreamHarvester-0.1 Beta

2009-11-26 Thread Godson Gera
StreamHarvester is built using python.

StreamHarvester is a cross-platform internet radio and TV
recoder.StreamHarverster works with Shoutcast and Icecast streams. You can
record multiple streams simultaneously, also you can relay a stream locally
while recording it. So that you can listen to the stream in an external
media player like VLC , Windows media player.
Features

   - Record multiple streams at a time.
   - Relay multiple streams on different ports.
   - Each job can be recorded and relayed at the same time.
   - Support for playlist formats pls and m3u.
   - Support various media formats mp3,ogg,nsv.
   - Automatic fallback to next URL in playlist.
   - Store stream in a single file or multiple files.
   - Works with shout cast and icecast streams.
   - Works on Windows and Linux. Should work on Mac (not tested).
   - Easy to use interface ;)


Please visit the project page to download and try it
http://code.google.com/p/streamharvester/
 --
Thanks & Regards,
Godson Gera
http://blog.godson.in
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python module/utility equivalent to 'time' (linux) and/or 'ntimer'(Windows)

2010-03-12 Thread Godson Gera
Take a look at hotshot module of python
http://docs.python.org/library/hotshot.html

On Fri, Mar 12, 2010 at 7:26 PM, hiral  wrote:

> Hi,
>
> Is there any python module/utility available which would report the
> time same as 'time' command in linux and/or report time same as
> 'ntimer' utility in Windows.
>
> Thank you.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Thanks & Regards,
Godson Gera
http://godson.in
http://www.clickindia.com/detail.php?id=493636
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32com pythonwin extensions part of stdlib?

2010-12-07 Thread Godson Gera
Not sure what you are trying to do but you can get a standalone binaries
from http://sourceforge.net/projects/pywin32/ which gets installed without
any issues. If for some reason you are still having issues, you can try
ActiveState Python which come bundled with pywin32 packages.


On Tue, Dec 7, 2010 at 11:32 PM, harijay  wrote:

> Hi I am using Python 2.6.5 on Windows.
>
> I wanted to start using the win32com extensions which I understand are
> "essentially part of the stdlib" ( quoted in
> http://tgolden.sc.sabren.com/python/win32_how_do_i.html)
> Since I didnt have the extensions as standard  I went to sourceforge
> to get the module.
>
> However when I tried to do a distutils install of the python
> extensions for windows downloaded from sourceforge , I found out I
> need some proprietary components from Microsoft visual studio
> 7)."vcsvarsall.bat" needed.
>
> My question is : Can I use the win32com extensions on a licensed
> windows setup without having access to Visual Studio components.
>
> I did see some places where they suggested compiling with mingw32 ,
> but the compilation didnt work.
>
> Any help in getting the module running would be greatly appreciated
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 

Python Consultant India 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python distribution recommendation?

2010-12-11 Thread Godson Gera
On Sat, Dec 11, 2010 at 6:13 PM, Octavian Rasnita wrote:

>
>
> I am especially interested in creating MS Windows apps with Python.
>

If you want to access win32api and do some COM programming then ActiveState
comes bundled with pywin32. Where in vanilla python distro you have to
install those packages separately by downloading them.  ActiveState is the
same python with additional batteries included.

-- 
Python Consultant India 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Making os.unlink() act like "rm -f"

2010-12-11 Thread Godson Gera
On Sat, Dec 11, 2010 at 10:34 PM, Roy Smith  wrote:

> os.unlink("file", ignore=True)
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Take a look at shutil.rmtree
http://docs.python.org/library/shutil.html?highlight=shutil#shutil.rmtree


-- 
Thanks & Regards,
Godson Gera
Python Consultant India <http://blog.godson.in>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: default argument in method

2010-12-13 Thread Godson Gera
On Sun, Dec 12, 2010 at 5:05 PM, ernest  wrote:

> Hi,
>
> I'd like to have a reference to an instance attribute as
> default argument in a method. It doesn't work because
> "self" is not defined at the time the method signature is
> evaluated. For example:
>
> class C(object):
>def __init__(self):
>self.foo = 5
>def m(self, val=self.foo):
>return val
>
> Raises NameError because 'self' is not defined.
>

You can defined foo outside the __init__ and can access it inside methods
using self.foo

class C(object):
 foo=5
 def __init__(self):
  print self.foo
 def m(self,val=foo):
  return val

class attributes can be accessed with out self before them in method
signatures. However, becareful if you change the value of foo inside any
method, the method signature will still hold on to old value.

-- 
Thanks & Regards,
Godson Gera
Python Consultant India <http://godson.in>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: packaging and installing

2010-12-13 Thread Godson Gera
On Mon, Dec 13, 2010 at 10:46 PM, Brian Blais  wrote:

> Hello,
>
> I was wondering if there is any standard or suggested way of installing
> packages *without* going to the commandline.  I often have students who,
> from there experience in Windows, have never looked at the commandline
> before and it is a bit of a challenge to get them to install something (i.e.
> go to the commandline, cd over to the proper folder, type python setup.py
> install, etc...).  I've never seen a package with something like a
> "compileme.bat", but was wondering if there is some suggested way of doing
> this or some reasons *not* to do this.  I can always write my own (1-line)
> .bat file, but I didn't want to reinvent the wheel.  Perhaps there is a
> better way for me to do this, ideally in a platform independent way.
>

You don't even have to write a bat file. Python's distutils package allows
you to build exe file which creates generic windows wizard window for
installing packages.

Take a look at distutils package
http://docs.python.org/distutils/builtdist.html

-- 
Thanks & Regards,
Godson Gera
Asterisk consultant India <http://godson.in>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is there any way to SSH from Python ?!

2010-12-13 Thread Godson Gera
On Mon, Dec 13, 2010 at 10:33 AM, Darshak Bavishi  wrote:

> Hi Experts,
>
> I need to know that is there any way to SSH (From Windows Host) to Unix
> machine ?!
>
> If Yes than How ?
>
> Because when i use telenet it not showing the no result !! As earlier it
> was suggested that i should try with exit first and than read_all()
> but still issue persist and getting hang
>
> import getpass
> import sys
> import telnetlib
> import time
> HOST = "*.*.*.*"
> #user = raw_input("Enter your remote account: ")
> #password = getpass.getpass()
> user = "Darshak2"
> password = ""
> tn = telnetlib.Telnet(HOST , 5400)
> print "1"
> tn.read_until("login:" , 5)
> print "2"
> tn.write(user + "\n")
> print "3"
> if password:
> tn.read_until("Password: ")
> tn.write(password + "\n")
>
> print "4"
> tn.write("set alarm = off" + "\n")
> tn.write("set event = off" + "\n")
> print "5"
> tn.write("Cd
> /Office-Parameters/Mobility-Config-Parameters/Subscriber-Query-by-IMSI-MSISDN-or-IMEI"
> + "\n")
> print "6"
> tn.write("\n")
> tn.write("\n")
> tn.write("vlrsubquery msisdn=***" + "\n")
> tn.write("\n")
> tn.write("exit" + "\n")
> print tn.read_all()
> tn.close()
>
> --
> BR
> Darshak Bavishi
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>

you can try read_very_eager() which won't block. Twisted has complete
support for SSH check it out http://twistedmatrix.com

-- 
Thanks & Regards,
Godson Gera
Asterisk Consultant India <http://godson.in>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: packaging and installing

2010-12-14 Thread Godson Gera
On Tue, Dec 14, 2010 at 6:59 PM, Brian Blais  wrote:

>  On Dec 13, 2010, at 12:30 PM, Godson Gera wrote:
>
> >
> >
> > On Mon, Dec 13, 2010 at 10:46 PM, Brian Blais  wrote:
> >> Hello,
> >>
> >> I was wondering if there is any standard or suggested way of installing
> packages *without* going to the commandline.  I often have students who,
> from there experience in Windows, have never looked at the commandline
> before and it is a bit of a challenge to get them to install something (i.e.
> go to the commandline, cd over to the proper folder, type python setup.py
> install, etc...).  I've never seen a package with something like a
> "compileme.bat", but was wondering if there is some suggested way of doing
> this or some reasons *not* to do this.  I can always write my own (1-line)
> .bat file, but I didn't want to reinvent the wheel.  Perhaps there is a
> better way for me to do this, ideally in a platform independent way.
> >>
> > You don't even have to write a bat file. Python's distutils package
> allows you to build exe file which creates generic windows wizard window for
> installing packages.
> >
> > Take a look at distutils package
> http://docs.python.org/distutils/builtdist.html
> >
>
> that's very interesting, and I didn't realize that.  it may be useful, and
> solves part of my problem, but the other part is that I am not on a windows
> machine and have to distribute to windows users.  Or perhaps I am on
> windows, and need to distribute to Mac.  It's great that python itself is so
> cross-platform, but the installation process for packages seems a lot less
> so.
>
> Don't blame python for that. command line is least command denominator
across all platforms and you don't wanted your audience to visit command
line. As of 2010 you have to be on specific platform to make distributions
for that platform. This kind of asking for toomuch from a few MB sized
python. You need to make your own python distro to support all platform
specific(exe, msi, ELF, app, rpm, deb  etc etc ) packaing in one
installation whose size may swell over many MBs

or resort back to wiriting batch file on windows and bash and sh scripts on
*nix platforms.
-- 
Thanks & Regards,
Godson Gera
Asterisk Consultant India <http://godson.in/>
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN : PySWITCH Release – 0.1alpha

2010-12-27 Thread Godson Gera
Hi All,

I am glad to announce the first alpha release of PySWITCH.

http://pyswitch.sf.net


The idea of PySWITCH is to offer a complete library to Python and Twisted
programmers for interacting with FreeSWITCH using EventSocket interface. The
target is to cover all FreeSWITCH API commands and Dialplan tools. PySWITCH
handles all the low level details in executing FreeSWITCH commands, so the
programmer can easily concentrate on quickly building FreeSWITCH
applications. As an example, the API functions offered by PySWITCH often
executes many FreeSWITCH commands under the hood and finally returns the
desired result. Suppose you execute a background job, PySWITCH API will
automatically wait and catch the backgroundjob event parse the result and
will fire the deferred.

The current release covers good amount of API commands and a few Dialplan
tools. The protocol communication issues are ironed out. It has a nice event
call back interface. I’ll present its usage in couple of tutorials soon.


-- 
Thanks & Regards,
Godson Gera
http://godson.in
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python is cool!!

2010-05-09 Thread Godson Gera
On Sun, May 9, 2010 at 6:24 PM, Fuzzyman  wrote:

> On Mar 23, 10:04 pm, geremy condra  wrote:
> > On Tue, Mar 23, 2010 at 1:07 PM, Tim Golden 
> wrote:
> > > On 23/03/2010 16:55, Jose Manuel wrote:
> >
>
> The closest is Skulpt which is very much an incomplete implementation
> of Python that runs in the browser.
>

Since you have mentioned Skulpt, take a look at much better pyjamas
http://pyjs.org/ demos are awesome.

-- 
Thanks & Regards,
Godson Gera
IVRS India <http://godson.in>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [wxPython-users] wxPython 2.8.11.0 release

2010-05-25 Thread Godson Gera
On Tue, May 25, 2010 at 5:08 AM, Robin Dunn  wrote:

> Announcing
> --
>
> The 2.8.11.0 release of wxPython is now available for download at
> http://wxpython.org/download.php. This release adds Python 2.7 builds,
> PySlices, new pubsub implementation, lots of updates to AGW, and lots
> of bugs fixed.  A summary of changes is listed below and also at
> http://wxpython.org/recentchanges.php.
>
>
Thanks for the great work !

-- 
Thanks & Regards,
Godson Gera
IVR India <http://godson.in>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter library reference

2010-05-29 Thread Godson Gera
Do you mean Tkinter API reference documentation ? If so, this is what I've
used years back http://www.nmt.edu/tcc/help/pubs/tkinter.pdf

you can also get some info from http://effbot.org/tkinterbook


On Sat, May 29, 2010 at 6:41 PM, Pradeep B  wrote:

> Do we have a standard reference library for Tkinter available?
>
> --
> Pradeep
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Thanks & Regards,
Godson Gera
IVR India <http://godson.in/ivr>
IVR Vendor India <http://lintelindia.com/index.php/Product/freedomivrs.html>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pythonware.com down?

2009-06-29 Thread Godson Gera
way back machine,comes to rescue.

http://web.archive.org/web/20071011003451/www.pythonware.com/products/pil/index.htm

On Mon, Jun 29, 2009 at 4:01 PM, C. Feldmann  wrote:

> On 29 Jun., 11:07, Tim Harig  wrote:
> > On 2009-06-29, C. Feldmann  wrote:
> >
> > > I am trying to get a hold of PIL, but pythonware.com seems to be down.
> > > Are there mirrors out there?
> > > I get a 502 Error "Bad Gateway - The proxy server received an invalid
> > > response from an upstream server."
> > > Does anyone else get that error?
> >
> > Yes, more info below:
> >
> > http://groups.google.com/group/comp.lang.python/browse_frm/thread/2db...
>
> yeah. need the windows version. guess this is another reason to add to
> my "why I should buy a mac" list. :)
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Thanks & Regards,
Godson Gera
http://godson.in
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is elementTree really a part of python 2.6?

2010-10-28 Thread Godson Gera
do the following

import xml.etree

that imports the elementtree library in 2.5 it self so you sure can do that
in 2.6

http://docs.python.org/library/xml.etree.elementtree.html

-- 
Thanks & Regards,
Godson Gera
Python Consultant
India<http://blog.godson.in/2010/09/how-to-make-python-xmlrpclib-client.html>

On Thu, Oct 28, 2010 at 1:53 PM, hackingKK  wrote:

>
> Hello all,
> Some days back I had asked a few questions about parsing xml files using
> python.
> I have tryed dom.minidom module but I did not like the prittyPrint way of
> writing nodes.
> There were many other things I did not quite like about dom.minidom, so now
> trying to use elementTree.
> But to my surprise, I could not import xml.elementtree in my default python
> 2.6 setup.
> is it possible that I have broken some thing?
> I had to later on do an easy_install for elementree.
> But I hear that elementtree is a part of python?
> So has my import gone wrong?  or is some thing broken in my python setup?
>
> happy hacking.
> Krishnakant.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Thanks & Regards,
Godson Gera
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python use with Mightex Buffer USB camera

2010-10-28 Thread Godson Gera
In case if you are on windows, have you tried python videocapture module ?
It binds with DirectX API i think.


 http://videocapture.sourceforge.net/

-- 
Thanks & Regards,
Godson Gera
Python Consultant
India<http://blog.godson.in/2010/09/how-to-make-python-xmlrpclib-client.html>



On Wed, Oct 27, 2010 at 7:46 PM, Greg Miller  wrote:

> Does anyone have any experience using Python and ctypes to interface
> with one of the Mightex USB cameras?  I am following the CPP code
> example and so far I think I've done pretty well talking to the dll.
> I am able to get serial number information back from the camera,
> however I am not sure if I'm using the ctypes pointer( ) correctly to
> send the pointer to the data structure that the camera is supposed to
> fill in when I make a call to grab a current frame.  Mightex tech
> staff has been VERY helpful, but they don't know Python.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SIP Libraries?

2010-10-28 Thread Godson Gera
There were some attempts to build SIP libraries in python, I am giving a
list of the libs that I know


   - Twisted -
   http://twistedmatrix.com/documents/8.1.0/api/twisted.protocols.sip.html
   - Shtoom - a dead project by anthony baxter made some enhancements to
   twisted's sip library - http://divmod.org/trac/wiki/ShtoomProject
   - Sine - divmod project additions to shtoom code -
   http://divmod.org/trac/wiki/DivmodSine
   - pjsua - much better compared to above one - http://pjsip.org
   - 39peers - libs by 39peers - http://39peers.net
   - incase if you are linux farsight python bindings does SIP



-- 
Thanks & Regards,
Godson Gera
Asterisk Python FreeSWITCH Consultant India <http://godson.in/>



On Wed, Oct 27, 2010 at 9:13 PM, Matty Sarro  wrote:

> Can anyone point me towards some libraries having to do with SIP
> communication? To be honest I'm working on learning SIP and telephony, and I
> think it'd be fun to play with a softswitch at a slightly lower level than
> soft clients will allow me to do.
> Thanks in advance!
> -Matthew
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list