Re: How to remember last position and size (geometry) of PyQt application?

2015-11-23 Thread Santosh Kumar
This question was reasked and answered on StackOverflow: http://stackoverflow.com/q/33869721/939986 -- https://mail.python.org/mailman/listinfo/python-list

How to remember last position and size (geometry) of PyQt application?

2015-11-23 Thread Santosh Kumar
Hello all fellow Python programmers! I am using PyQt5 (5.5.1) with Python 3.4.0 (64-bit) on Windows 8.1 64-bit. I don't think this much data was needed. :P I am having trouble restoring the position and size (geometry) of my very simple PyQt app. What I read online is that this is the default be

How to install/uninstall manpages with distutils/setuptools?

2013-04-13 Thread Santosh Kumar
distutils.core import setup __AUTHOR__ = 'Santosh Kumar' __AUTHOR_EMAIL__ = 'u...@domain.com' setup( name='sampleapp', version='1.02.02', author=__AUTHOR__, author_email=__AUTHOR_EMAIL__, packages=['sampler'], scripts=[&#x

Re: Help me debug this script with argparse and if statements

2013-02-21 Thread Santosh Kumar
> To do what you're looking for there, I wouldn't bother with argparse > at all - I'd just look at sys.argv[1] for the word you're looking for. > Yes, it'd be a bit strict and simplistic, but by the look of things, > you don't need sophistication. You are right, but I think sys.argv is very basic.

Re: Any algorithm to preserve whitespaces?

2013-01-24 Thread Santosh Kumar
But I can; see: http://pastebin.com/ZGGeZ71r On 1/24/13, Peter Otten <__pete...@web.de> wrote: > Santosh Kumar wrote: > >> On 1/24/13, Peter Otten <__pete...@web.de> wrote: >>> Santosh Kumar wrote: >>> >>>> Yes, Peter got it right. >>>

Re: Any algorithm to preserve whitespaces?

2013-01-24 Thread Santosh Kumar
On 1/24/13, Peter Otten <__pete...@web.de> wrote: > Santosh Kumar wrote: > >> Yes, Peter got it right. >> >> Now, how can I replace: >> >> script, givenfile = argv >> >> with something better that takes argv[1] as input file as well as &

Re: Any algorithm to preserve whitespaces?

2013-01-23 Thread Santosh Kumar
Yes, Peter got it right. Now, how can I replace: script, givenfile = argv with something better that takes argv[1] as input file as well as reads input from stdin. By input from stdin, I mean that currently when I do `cat foo.txt | capitalizr` it throws a ValueError error: Traceback (m

Re: Any algorithm to preserve whitespaces?

2013-01-23 Thread Santosh Kumar
I am in a problem. words = line.split(' ') preserve whitespaces but the problem is it writes an additional line after every line. And: words = line.split() works as I expect (does not adds addition line after every line) but does not preserves whitespaces. -- http://mail.python.org/m

want to show list of available options and arguments in my command line utility

2012-09-15 Thread Santosh Kumar
I have a script that takes an which basically takes a command line argument and prints after processing. If I don't give the argument to the script, it gives me a ValueError: ValueError: need more than 1 value to unpack I was trying to utilizing this space, if there is no argument I want it to sh

Re: help me debug my "word capitalizer" script

2012-08-22 Thread Santosh Kumar
OK! The bug one fixed. Thanks to Andreas Perstinger. Let's move to Bug #2: 2. How do I escape the words that are already in uppercase? For example: The input file has this: NASA The script changes this to: Nasa Is it possible to make this script look at a word, see if its first character is ca

help me debug my "word capitalizer" script

2012-08-21 Thread Santosh Kumar
Here is the script I am using: from os import linesep from string import punctuation from sys import argv script, givenfile = argv with open(givenfile) as file: # List to store the capitalised lines. lines = [] for line in file: # Split words by spaces. words = line.s

Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Santosh Kumar
System Information Ubuntu 11.10 Python 2.7.2 Problem I think my Ubuntu has PyGTK and GTK both already installed. But however when I am importing "gtk" in Python interactive mode then I am getting the following warning: (.:4126): Gtk-WARNING **: Unable to

some beginners questions about programming

2012-04-21 Thread Santosh Kumar
Hello Python Developers, I have a very less experience with programming. I have digged a little bit of all (I mean *C, **Java, JavaScript, PHP*) at introductory level and now I have two question about it. 1. Are *Arrays* and *Lists* same things? 2. Are *Modules* and *Libraries* same things?