Re: ANN: PyGUI 2.0.5

2009-04-28 Thread Suraj
On Apr 26, 10:33 pm, greg  wrote:
>
> I don't know what I need to do in order to get a
> Vista look...
>

A closed issue in Python tracker http://bugs.python.org/issue5019
refers to similar problem reported by wxPython developers. AFAIK, the
solution used by the wxPython project can not be used with PyGUI as it
requires PyGUI to be compiled & loaded as a separate dll. I am not
sure if we should reopen this issue or create a new issue.

As a workaround to enable theme on Vista you need to:
1. Download http://bugs.python.org/file12995/python.exe.manifest
and copy it to Python installation directory
2. Execute following commands in python installation directory:
   mt.exe -manifest python.exe.manifest -
outresource:python.exe;#1
   mt.exe -manifest python.exe.manifest -
outresource:pythonw.exe;#1
Note: mt.exe is installed with Windows SDK.

P.S. I also found out that I can not run any tests if I use
pythonw.exe on Vista. I will check the same on XP and report back.

Regards,
Suraj
--
http://mail.python.org/mailman/listinfo/python-list


Re: dbus-python for windows

2008-01-15 Thread Suraj Barkale
est  gmail.com> writes:
> I am trying to port Scribes to Windows, 

Hi there like minded fellow

> sourceforge.net/projects/windbus/≥ but it not for Python, so how could
> I install dbus module for Windows Python 2.5 ?

I have also started to dabble in windbus-python for the sake of Scribes. I have
following observations:
1. I don't have Visual Studio 2003 (required for compiling Python 2.x modules)
so alternative is to use MinGW. Follow instructions at
http://js.cx/~justin/mingw You can skip the GtkGLExt part.
2. Checkout windbus from sourceforge, apply the patch (patch.exe doesn't work on
Vista. Rename it to p4tch.exe)
3. Follow the windows build instructions for windbus. It gets compiled 
correctly 
:).
4. dbus-python has dependency on dbus AND dbus-glib. But all my attempts of
getting dbus-glib to build have failed so for.
5. dbus-python looks at wrong place for python headers, this is very easy to
connect and if we can get dbus-glib to build then we are there :)

I will keep banging my head & let you know once I have cracked it (or the
dbus-python :)

P.S. Please CC me in your reply as I am not on the list.

Regards,
Suraj



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

Re: email from windows

2009-03-30 Thread Suraj Barkale
prakash jp  gmail.com> writes:
> Hi all,
>  
> In windows environment, how to send email from one gmail address to another
gmail (or another mail) addrress
>  
>  
Gmail requires SSL smtp support which is missing in Python stdlib. However, you
can look at this example (http://www.example-code.com/python/gmail_smtp_465.asp)
which uses a module called chilkat to do the work.

Regards,
Suraj

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


Re: Modifying the value of a float-like object

2009-04-15 Thread Suraj Barkale
  spectro.jussieu.fr> writes:
> 
> Hello,
> 
> Is there a way to easily build an object that behaves exactly like a
> float, but whose value can be changed?  The goal is to maintain a list
> [x, y,…] of these float-like objects, and to modify their value on the
> fly (with something like x.value = 3.14) so that any expression like "x
> +y" uses the new value.
> 

Have you looked at sympy (http://code.google.com/p/sympy/)? It implements
symbolic mathematics so you can define the equations & put in the values to get
the result. You should be able to derive from the Symbol class to implement the
accuracy behavior.

Regards,
Suraj

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


Re: ANN: PyGUI 2.0.1

2009-04-15 Thread Suraj Barkale
Greg Ewing  canterbury.ac.nz> writes:
> 
> PyGUI 2.0.1 is available:
> 
Thank you very much for this GUI toolkit. I always wanted something like this on
windows. I installed this and tried out the tests on Python 2.6.1 and Windows XP
SP3. Following are my observations. I will try to send some patches once I have
looked at the code in detail.

After installing on windows I had to manually delete
"C:\python26\lib\site-packages\GUI\Win32\__init__.py" in order to get it work.

Test 02-window.py:
1. Resizing window produces white horizontal bars. Use double buffering to
prevent this?

Test 05-checkbox.py:
1. Checkbok background is a black rectangle.

Test 06-radiobutton.py:
1. Radiobutton has a white background.

Test 09-textfield.py:
1. All textfields have black area at right & bottom.
2. For multiline textfield, the black are is not painted over during 
repaint.
3. Textfields no not have XP style borders.

Test 15-dialog.py:
1. Alt+F4 does not work. However Ctrl+Q works fine.
2. Initially keyboard navigation is not possible. Once a button is clicked,
it is focused and keyboard navigation is possible.
2. If Cancel button has focus, pressing Enter should print Cancel. Currently
it prints OK.
3. Pressing spacebar should activate focused button.

Test 18-exceptions.py:
1. Printing traceback to console is not sufficient on windows.

Test 29-slider.py:
1. Defenitions of 'live' and 'non-live' are swapped in the printed message.

Test 33-mouse-events.py:
1. mouse-enter and mouse-leave events are not reported.

Test 37-image-cursor.py:
1. Mouse pointer hotspot is in the middle of the image.

Test 38-keys.py:
1. Key combinations with Ctrl & Alt are not detected properly.
2. Scroll-lock is reported as f14
3. Pause/Break is reported as f15
4. Caps-lock & Num-lock are detected as keycodes but 'key' is not reported.

Regards,
Suraj


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


Re: ANN: PyGUI 2.0.4

2009-04-22 Thread Suraj Barkale
Greg Ewing  canterbury.ac.nz> writes:

> 
> PyGUI 2.0.4 is available:
> 
>http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
> 
> Fixes a few more bugs and hopefully improves things
> on Windows, although I can't be sure it will fix all
> the Windows problems people are having, because I
> haven't been able to reproduce some of them.
> 
I will test this over the weekend on Vista. Are you planning to put it on google
code or sourceforge so issues can be easily submitted?

Thanks & Regards,
Suraj

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


Re: ANN: PyGUI 2.0.5

2009-04-26 Thread Suraj Barkale
Greg Ewing  canterbury.ac.nz> writes:
> 
> PyGUI 2.0.5 is available:
> 
>http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
> 
> More bug fixes for various platforms.

Tested on "Vista Home Premium 64bit" with Python 2.6.2 all tests pass except:
16-model_dialog.py - If the model dialog "Spanish Inqisition" is closed by
pressing ENTER key, it pops up again. However, clicking buttons works fine.

Minor nitpicks:
1. Menu accelerators are not enabled by default i.e. pressing Alt + F does not
open the File menu.
2. Alt + F4 does not close the window.
3. None of the controls (except menus) have _Vista look_ to them
(http://dl.getdropbox.com/u/14797/no_vista_theme.png).

 
> Still no idea what's causing the "object has been destroyed"
> error on Windows XP, though. Does this happen for everyone?
> Is there anyone who *has* got 12-scroll.py working for them
> on XP?
> 
I have never seen this error either on XP or Vista. 12-scroll.py has always
worked for me.

Regards,
Suraj

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


Re: Web framework for embedded system

2009-04-28 Thread Suraj Barkale
Thomas Heller  python.net> writes:
> 
> I'm looking for a lightweight web-framework for an embedded system.
> The system is running a realtime linux-variant on a 200 MHz ARM
> processor, Python reports a performance of around 500 pystones.

You can start with webpy (http://webpy.org/) and build up from there.

> 
> The web application will not be too fancy, no databases involved
> for example, but it will need to control some simple peripherals
> (some parallel in/out, some dacs) attached to the system.
> 
> It should provide a user interface showing the current state and
> allowing to manipulate it via a browser, and I will probably need
> to support some rpc as well.
> 
> Does this sound sensible at all? Any suggestions?

I don't know how Python will affect the real-time tasks your system is
performing. You may want to look at a web framework in C (e.g.
http://www.koanlogic.com/klone/index.html).
Regards,
Suraj


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


Re: Parsing text

2009-05-07 Thread Suraj Barkale
iainemsley  googlemail.com> writes:

> 
> Hi,
> I'm trying to write a fairly basic text parser to split up scenes and
> acts in plays to put them into XML. I've managed to get the text split
> into the blocks of scenes and acts and returned correctly but I'm
> trying to refine this and get the relevant scene number when the split
> is made but I keep getting an NoneType error trying to read the block
> inside the for loop and nothing is being returned. I'd be grateful for
> some suggestions as to how to get this working.
> 
> for scene in text.split('Scene'):
> num = re.compile("^\s\[0-9, i{1,4}, v]", re.I)
> textNum = num.match(scene)
> if textNum:
> print textNum
> else:
> print "No scene number"
> m = 'http://mail.python.org/mailman/listinfo/python-list
> 
> 

Are you trying to match Roman numerals? As others have said, it is difficult to
make any suggestions without knowing the input to your program.

You may want to look at PyParsing (http://pyparsing.wikispaces.com/) to parse
the text file without messing with regular expressions.

Regards,
Suraj

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


Need help in python plug-in development

2010-04-28 Thread Suraj Sakhare
Hi, I am new to python. I am using python 2.6. I have gone through the
basic python and now I am trying to develop some plugin for maya 2009
through python. So, for that I would need helping hand.
-- 
http://mail.python.org/mailman/listinfo/python-list