what would be the regular expression for null byte present in a string

2015-01-13 Thread Shambhu Rajak
I have a string that I get as an output of a command as: '\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00\x00\x00\x00\x00\x00\x00\n' I want to fetch '10232ae8944a' from the above string. I want to find a re pattern that could replace all the \x01..\x0z to be replace by

RE: Multi-dimensional list initialization

2012-11-06 Thread Shambhu Rajak
Well said Steve, I agree with you... -Shambhu -Original Message- From: Steven D'Aprano [mailto:steve+comp.lang.pyt...@pearwood.info] Sent: Tuesday, November 06, 2012 2:35 PM To: python-list@python.org Subject: Re: Multi-dimensional list initialization On Mon, 05 Nov 2012 21:51:24 -0800,

How to remotely Automate GUI using pywinauto

2012-11-01 Thread Shambhu Rajak
Hi, Here I have a situation: I am trying to automate a GUI application and get some data from it. I tried using 'pywinauto' to launch the application and select the data and save it in -say notepad and later read it. This works fine when the script is locally run on the windows machine. My

How to execute commands on a windows machine from a Linux machine

2012-10-04 Thread Shambhu Rajak
Here i have two questions, 1. I want to write a framework for Linux machine that can execute commands on windows machine: How to create a persistent shell between Linux and Windows machine. 2. I require to extract windows disk management features, for eg: Number of drives on that

RE: Python Interview Questions

2012-07-09 Thread Shambhu Rajak
I agree with Christian, a developer should have hobbies other than computer stuffs. Versatile environment give more Ability to think differently. I like playing guitar :-) Be enthu, run foolishly and learn intelligently. -Shambhu -Original Message- From: Christian Heimes

RE: a problem about print

2012-07-04 Thread Shambhu Rajak
You can use : print aList is +repr([x,x,x,x,x,x,x,x,x]) -Shambhu From: levi nie [mailto:levinie...@gmail.com] Sent: 04/07/2012 9:43 AM To: python-list@python.org Subject: a problem about print aList is a list.i want to get the output seem this aList is [x,x,x,x,x,x,x,x,x] how can i get this?

RE: exception problem

2012-06-24 Thread Shambhu Rajak
If you are not sure about the Exception, You can adopt a generic way of handling exception. try: except Exception,e: print str(e) -Shambhu -Original Message- From: MRAB [mailto:pyt...@mrabarnett.plus.com] Sent: 25/06/2012 4:14 AM To: python-list@python.org Subject: Re:

RE: string to list

2012-06-14 Thread Shambhu Rajak
This will do you job: a = 'AAA,,,,EEE,FFF,GGG' b = [] for x in a.split(','): ... if (x.find(\) -1): ... x = x.strip(\) ... b.append(x) If you want reduce the lines of code u can go for this option: b = [x.strip(\) for x in a.split(',')] So Just Cheerz, -Shambhu

RE: Set Date and Time on Python

2012-04-27 Thread Shambhu Rajak
-Original Message- From: Dave Angel [mailto:d...@davea.name] Sent: 26/04/2012 4:31 PM To: viral shah Cc: python-list@python.org Subject: Re: Set Date and Time on Python On 04/26/2012 03:09 AM, viral shah wrote: Hi I'm very new to Python programming. Please help me to add date and

RE: Zipping a dictionary whose values are lists

2012-04-13 Thread Shambhu Rajak
The below code should work: zip(*d.values()) when you do *d.values() its going to return tuple of elements, which then further be can be zipped to achieve your desired result. Regards, Shambhu Rajak Python Lover -Original Message- From: tkp...@gmail.com [mailto:tkp...@gmail.com

RE: Python-list Digest, Vol 101, Issue 164

2012-02-29 Thread Shambhu Rajak
Hi, I want building GNU debugger for mingw. Need the GDB to support python How should I go about it? Thanks, Shambhu This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it

RE: Total newbie question: Best practice

2011-11-30 Thread Shambhu Rajak
Collins Congratulations for your first step into Python Programming. You can call them script or programs(not necessarily but depends on what your coding for). Yaa..it's always a good practice to call it through main(), but it doesn't really matter you can call the method in way Regards,

RE: Automatic import of submodules

2011-11-27 Thread Shambhu Rajak
-Original Message- From: Massi [mailto:massi_...@msn.com] Sent: 25/11/2011 6:30 PM To: python-list@python.org Subject: Automatic import of submodules Hi everyone, in my project I have the following directory structure: plugins | -- wav_plug | -- __init__.py

RE: What is wrong with this code?

2011-09-19 Thread Shambhu Rajak
I think you cannnot use \ as normal string ,it’s a metacharacter, u can use it like this: '\\begin{document}' -Shambhu -Original Message- From: Steven D'Aprano [mailto:steve+comp.lang.pyt...@pearwood.info] Sent: Monday, September 19, 2011 3:31 AM To: python-list@python.org Subject: Re:

Prequisites required to learn Django frame work

2011-09-07 Thread Shambhu Rajak
Hi, I have been doing python development since last year, I think I should learn the famous Django frame work. Can any one suggest what are the perquisite required to setup django on my local home machine. Please suggest something that does not require a separate server, as this is a personal

Require information on python API for Subversion related work

2011-08-02 Thread Shambhu Rajak
Hi , I need an api that can be used to do following operations on Subversion repository tool: 1. Create branch 2. Check out 3. Check in 4. Merge Regards, Shambhu -- http://mail.python.org/mailman/listinfo/python-list