Re: Get IP address of WIFI interface

2011-05-13 Thread Ishwor Gurung
. 1/ posix - (Linux in your case) will use ifconfig 2/ nt - (windows in your ase) will use ipconfig. HTH. -- Regards Ishwor Gurung Key id:0xa98db35e Key fingerprint:FBEF 0D69 6DE1 C72B A5A8  35FE 5A9B F3BB 4E5E 17B5 -- http://mail.python.org/mailman/listinfo/python-list

Re: When will Python go mainstream like Java?

2010-02-23 Thread Ishwor Gurung
. Perhaps I see a light, perhaps I see nothing.. but I feel the day is coming nearer when Python would run as fast as Java/C. Only time can tell - I hope the time is right about this. -- Regards Ishwor Gurung Key id:0xa98db35e Key fingerprint:FBEF 0D69 6DE1 C72B A5A8 35FE 5A9B F3BB 4E5E 17B5

Re: Prepend to logging message

2010-01-09 Thread Ishwor Gurung
LoggerAdapter and override process(..) Read this: http://docs.python.org/library/logging.html#adding-contextual-information-to-your-logging-output -- Regards Ishwor Gurung Key id:0xa98db35e Key fingerprint:FBEF 0D69 6DE1 C72B A5A8 35FE 5A9B F3BB 4E5E 17B5 -- http://mail.python.org/mailman/listinfo/python

Re: Multiple python installations on opensuse?

2009-12-17 Thread Ishwor Gurung
/ $ ./configure --prefix=$HOME/my2.4build make make install; To run- $ cd $HOME/my2.4build/bin $ ./python I am assuming you've got the C/C++ libraries installed. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Multiple python installations on opensuse?

2009-12-17 Thread Ishwor Gurung
installations on opensuse? To: Ishwor Gurung ishwor.gur...@gmail.com Thanks guys, I installed it as root without the --prefix option using make altinstall instead of make install. It worked and I can now execute python2.4.6 with python2.4 while python2.6 is still executed with python. I also

Re: Multiple python installations on opensuse?

2009-12-17 Thread Ishwor Gurung
/lib, how can I do this? As root, tell linker to look for libraries in /usr/lib64: $ echo /usr/lib64 /etc/ld.so.conf $ ldconfig $ ./configure Please send email to the mailing list. I am subscribed to it : [...] -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: problem in installing wxwidgets for python..

2009-11-04 Thread Ishwor Gurung
, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: transpose array

2009-10-27 Thread Ishwor Gurung
, zVec)) a1,b1,c1 a2,b2,c2 a3,b3,c3 a4,b4,c4 a5,b5,c5 Or, http://docs.scipy.org/doc/numpy/reference/generated/numpy.transpose.html :-) -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing deadlock

2009-10-24 Thread Ishwor Gurung
the queue Removed 2 from the queue Removed 30 from the queue Removed 31 from the queue Removed 32 from the queue Removed 60 from the queue Removed 61 from the queue Removed 62 from the queue ''' -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python

Re: how to knock a page out of file cache

2009-10-21 Thread Ishwor Gurung
of file cache?  Can madvise or fadvise do this? Does this help http://www.westnet.com/~gsmith/content/linux-pdflush.htm ? (Getting hold of procfs and doing it in Python?) Also, are you looking for sync(2) http://linux.die.net/man/2/sync? [...] -- Regards, Ishwor Gurung -- http

Re: how to knock a page out of file cache

2009-10-21 Thread Ishwor Gurung
of dirty pages and their frequency of writebacks. So if you want the shortest path, you can choose to go the /proc path. [...] -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: How to schedule system calls with Python

2009-10-15 Thread Ishwor Gurung
not have sem_open() syscall). Others suggestions are as good as it can be but yeah you could get a lot of work done using multiprocessing module(all the relevant bits are explained in the module doc). [1] http://docs.python.org/library/multiprocessing.html -- Regards, Ishwor Gurung -- http

Re: How to schedule system calls with Python

2009-10-15 Thread Ishwor Gurung
How can I use Python to schedule these commands? If I were as lucky as you, I would have used multiprocessing module[1] (my platform does not have sem_open() syscall). Others suggestions are s/have/implement/g -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: How to schedule system calls with Python

2009-10-15 Thread Ishwor Gurung
the relevant bits are explained in the module doc). My bad, I assumed Win32. Make sure _your_ platform also supports sem_open syscall before you used the core feature of multiprocessing module. . -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: a splitting headache

2009-10-15 Thread Ishwor Gurung
-length-encoding-in-Python/0,264084,339280649,00.htm [...] -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: a splitting headache

2009-10-15 Thread Ishwor Gurung
into getting some small subset of STL, Boost into Android? :-P That'd be awesome thing you know. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: a splitting headache

2009-10-15 Thread Ishwor Gurung
2009/10/16 Ishwor Gurung ishwor.gur...@gmail.com: 2009/10/16 Paul Rubin http://phr...@nospam.invalid: [...] You might also like:    from itertools import groupby    c = '001110'    print list(list(xs) for k,xs in groupby(c)) Too bad groupby is only available in Python2.6+ OK. I stand

Re: a splitting headache

2009-10-15 Thread Ishwor Gurung
I think I am getting old :-( Should have Googled already. My what who where?  You are confusing me with someone else. Andy Rubin- http://en.wikipedia.org/wiki/Andy_Rubin Sorry to bother you. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: importing with .m instead of .py

2009-09-25 Thread Ishwor Gurung
=[1,2,3] $ cat bar.m z=[3,2,1] These sort of task are pretty trivial to do. You should take some time to read through the documentation.. and oh don't be such a wanderer loosing sight of such good resource such as http://docs.python.org :-) -- Regards, Ishwor Gurung -- http://mail.python.org/mailman

Re: New books: Learning Python, Python Pocket Reference 4th Eds

2009-09-25 Thread Ishwor Gurung
hurriedly used to look up materials through it finding novel and cool ways of doing things (I still do find it very helpful) :-) Thanks for such a wonderful resource. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Pipelining tar create and tar extract the Python way...

2009-09-25 Thread Ishwor Gurung
? :-) It's late and TGIF! Need sleep. Goodluck. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: delete items from list by indices

2009-09-23 Thread Ishwor
list. It's a trivial choice here but later it might help. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Read header and data from a binary file [LONG]

2009-09-23 Thread Ishwor
bytes long) i.e., starting from 8'th byte file descriptor position assuming each char is 1 bytes long on Python (as per struct modules' definition) [ ... ] -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Read header and data from a binary file [LONG]

2009-09-23 Thread Ishwor
char is 1 bytes long on Python (as per struct modules' definition) Also, this is also another option for you to use instead of built-in struct. http://www.sis.nl/python/xstruct/xstruct.shtml -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: detmining name during an assignment

2009-09-18 Thread Ishwor
. -- Regards, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Not this one the other one, from a dictionary

2009-09-18 Thread Ishwor
know or not), you can just traverse it using easily as such: for k in aDict: print k, aDict[k]; [[i,a[i]] for i in aDict] [['a', 'bob'], ['b', 'stu']] [[i,a[i]] for i in aDict][0] ['a', 'stu'] [[i,a[i]] for i in aDict][0][0] 'a' [[i,a[i]] for i in aDict][0][1] 'bob' -- Regards, Ishwor

Re: How to test that an exception is raised ?

2005-01-28 Thread Ishwor
i can't read, i think i am tired and need to go to bed. ;-) -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: list addition methods compared.

2004-12-28 Thread Ishwor
On Mon, 27 Dec 2004 18:49:14 +0100, François Granger [EMAIL PROTECTED] wrote: Le 27/12/04 1:03, « Ishwor » [EMAIL PROTECTED] a écrit : so indeed method 2 (l2.extend() ) is the fastest ?? In 2/3 times, method 3 (l3 += [x] seems faster than method 1/2 in my P2.4GHZ machine with 512mb

Re: IDLE question

2004-12-26 Thread Ishwor
variable called l l # prints the content of l. ['spam', 'eggs'] [snip] -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: list addition methods compared.

2004-12-26 Thread Ishwor
On Sun, 26 Dec 2004 18:37:35 -0500, Terry Reedy [EMAIL PROTECTED] wrote: Ishwor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sun, 26 Dec 2004 04:57:17 -0500, Terry Reedy [EMAIL PROTECTED] wrote: Ishwor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all

Re: Tricks to install/run Python on Windows ?

2004-12-26 Thread Ishwor
://www.python.org/idle/ should be able to provide you with info. So... maybe i've to try BlackAdder ? -- http://mail.python.org/mailman/listinfo/python-list -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE problem :-(

2004-12-25 Thread Ishwor
On Sat, 25 Dec 2004 17:45:02 GMT, Steven Bethard [EMAIL PROTECTED] wrote: Ishwor wrote: I don't know if this has been a problem with other people using IDLE but when i press the home key then the cursor jumps to the beginning of the line and not after the prompt. If google prints the right

Re: IDLE problem :-(

2004-12-25 Thread Ishwor
Sorry IDLE's source ...;P [snip] -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Tinkering with py2exe

2004-12-25 Thread Ishwor
the Python VM i guess. what does the library.zip do?? Currently to convert such a small script to exe why the nuances of 1.98mb?? Thanks -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2004-12-25 Thread Ishwor
-- http://mail.python.org/mailman/listinfo/python-list -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2004-12-25 Thread Ishwor
heres the shell i forgot to show PythonWin 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information. clear.cls() [40 more lines of \n] -- cheers, Ishwor

Re: Clearing the screen

2004-12-25 Thread Ishwor
On 25 Dec 2004 18:20:39 -0800, John Machin [EMAIL PROTECTED] wrote: Ishwor wrote: i was just tinkering with it actually. ;-) In your command prompt just do Pythonwin.exe /run C:\Python24\file\PyFiles\clear.py It's not a very good idea to store your own scripts in the PythonXY

Re: Clearing the screen

2004-12-25 Thread Ishwor
On Sun, 26 Dec 2004 13:07:56 +1030, Ishwor [EMAIL PROTECTED] wrote: On 25 Dec 2004 18:20:39 -0800, John Machin [EMAIL PROTECTED] wrote: Ishwor wrote: i was just tinkering with it actually. ;-) In your command prompt just do Pythonwin.exe /run C:\Python24\file\PyFiles\clear.py

list addition methods compared.

2004-12-25 Thread Ishwor
this code be beautified shortened?? Thanks. -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

methods of addition in Python

2004-12-25 Thread Ishwor
(out of 3)) - 0.0106668472 @@@ So i can assume that type 3 ( l3 += [x] ) addition is the fastest . Is there anything i am doing wrong?? Also could this code be beautified shortened?? Thanks. -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: list Integer indexing dies??

2004-12-24 Thread Ishwor
On Fri, 24 Dec 2004 05:44:50 -0600, Mike Meyer [EMAIL PROTECTED] wrote: Ishwor [EMAIL PROTECTED] writes: On 23 Dec 2004 14:28:37 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: My experience as a learner here is that there should be some automagics say like okay you want to do indexing

IDLE problem :-(

2004-12-24 Thread Ishwor
^ ^ ^ ^- want cursor here instead. cursor goes here Any work around?? Thank you. -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2004-12-24 Thread Ishwor
or even less!! ;-) os.system(cls) #for windows or os.system(clear) #for unix yeah i have used the 'os' module's system() method but that wasn't what i meant. Not the most advanced solution though. ;-) Thanx anyway mate. [snip] -- cheers, Ishwor Gurung -- http://mail.python.org/mailman

list Integer indexing dies??

2004-12-23 Thread Ishwor
reports unsubscriptable object ?? confused , dazzled i am ???!!?? The same list now holds integer instead of strings and l[0][0][0] which worked fine earlier on strings doesn't seem to work on integers??? Any help is greatly appreciated. -- cheers, Ishwor Gurung -- http://mail.python.org/mailman

Re: list Integer indexing dies??

2004-12-23 Thread Ishwor
] Traceback (most recent call last): File pyshell#246, line 1, in -toplevel- 1[0] TypeError: unsubscriptable object .Facundo Bitácora De Vuelo: http://www.taniquetil.com.ar/plog PyAr - Python Argentina: http://pyar.decode.com.ar/ [snip] Thanks Batista. -- cheers, Ishwor

Re: list Integer indexing dies??

2004-12-23 Thread Ishwor
On 23 Dec 2004 14:28:37 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: Op 2004-12-23, Ishwor schreef [EMAIL PROTECTED]: Hi all. Look at this snippet of code. l = ['a','b','c','d'] l ['a', 'b', 'c', 'd'] l[0][0][0] 'a' It prints the value 'a'. Fine so far :-) l[0] --- 'a' . l[0][0

Re: list Integer indexing dies??

2004-12-23 Thread Ishwor
On Thu, 23 Dec 2004 11:40:12 -0300, Batista, Facundo [EMAIL PROTECTED] wrote: [Ishwor] #- 'invalid'[0] #- 'i' #- 123232[-1] #- # Python should automagically infer here that user #- # means indexing and *not* the number per se. #- # (i mean list in context of the line

Re: urllib and sites that require passwds

2004-12-23 Thread Ishwor
returns errcode to process further. doesn't urllib do that? Anyway i wanted to know if any website which is similar to CPAN library website? I mean i want to be able find modules n stuff for Python.. It would be really great to know. Thanks. -- cheers, Ishwor Gurung -- http://mail.python.org

Re: list Integer indexing dies??

2004-12-23 Thread Ishwor
On 23 Dec 2004 15:05:20 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: Op 2004-12-23, Ishwor schreef [EMAIL PROTECTED]: On 23 Dec 2004 14:28:37 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: Op 2004-12-23, Ishwor schreef [EMAIL PROTECTED]: Hi all. Look at this snippet of code. l = ['a','b

Re: list Integer indexing dies??

2004-12-23 Thread Ishwor
On Thu, 23 Dec 2004 13:33:16 -0300, Batista, Facundo [EMAIL PROTECTED] wrote: [Ishwor] #- What should 035[0] cough up? Be carefull it should #- #- 035[0] #- 3 # my own opinion. #- #- cough up the same as 29[0]. #- #- 29[0] #- 2 #again my own opinion Be aware

Re: list Integer indexing dies??

2004-12-23 Thread Ishwor
On Thu, 23 Dec 2004 13:33:16 -0300, Batista, Facundo [EMAIL PROTECTED] wrote: [Ishwor] #- What should 035[0] cough up? Be carefull it should #- #- 035[0] #- 3 # my own opinion. why 3? The reason we get 3 and not 0 here is the *fact* that Python knows that its an octal rep

Re: list IndexError

2004-12-22 Thread Ishwor
On Wed, 22 Dec 2004 14:59:32 -0500, Mike C. Fletcher [EMAIL PROTECTED] wrote: [snip] Probably the most pythonic approach to this problem when dealing with small lists is this: result = [ item for item in source if item != 'e' ] or, if you're using an older version of Python without

Re: list IndexError

2004-12-22 Thread Ishwor
On Thu, 23 Dec 2004 07:27:52 +1000, Egor Bolonev [EMAIL PROTECTED] wrote: On Thu, 23 Dec 2004 06:56:02 +1030, Ishwor [EMAIL PROTECTED] wrote: l ['a', 'b', 'c', 'd', 'e'] for x in l[:]: if x == 'd': l.remove('d'); l ['a', 'b', 'c', 'e'] This code is so

Re: list IndexError

2004-12-22 Thread Ishwor
ishwor( source ): ---for item in source: +++ for item in source[:]: if item == 'd': ...source.remove( item ) that's not the code he quoted in the mail you replied to, though... ;-) [snip] -- cheers, Ishwor Gurung -- http://mail.python.org/mailman

win32 extensions for Python 2.4

2004-12-07 Thread Ishwor
it. :) -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 extensions for Python 2.4

2004-12-07 Thread Ishwor
On Tue, 07 Dec 2004 21:00:22 +1000, Nick Coghlan [EMAIL PROTECTED] wrote: Ishwor wrote: Hello all, I was looking through Mark Hammond's website for win32 extensions for Python 2.4 but couldn't find it. If i am not wrong has anyone any idea when it will be available or is it being

string slicing

2004-12-05 Thread Ishwor
is appreciated.. Thanx -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help here: python == COM

2004-12-05 Thread Ishwor
heheh... this was funny in your posting. :) The following *pythong* ( so this is what a Python wearing a thong is called .. hmmm...) code NOT work.. On Sun, 5 Dec 2004 16:18:33 +0800, mep [EMAIL PROTECTED] wrote: Resolved. Thanks anyway [snip] -- cheers, Ishwor Gurung -- http

Re: string slicing

2004-12-05 Thread Ishwor
you want '==', I'd offer, 'it is not necessary'. - Josiah Thanx. Appreciate it. :) -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list