Re: So apparently I've been banned from this list

2018-09-30 Thread Karim
[2] https://mail.python.org/pipermail/python-list/2018-September/737020.html Hi, I hope you are getting better. Cheers Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: AH01215: ImportError: No module named PIL: - python script unable to recognize PIL when running from apache2 config

2017-03-28 Thread Karim
On 28/03/2017 18:35, Chris Angelico wrote: On Wed, Mar 29, 2017 at 3:32 AM, Karim <kliat...@gmail.com> wrote: On 28/03/2017 18:05, Chris Angelico wrote: On Wed, Mar 29, 2017 at 2:59 AM, <vishnupras...@gmail.com> wrote: Please help if this wont resolve, I have to completely mo

Re: calling a program from Python batch file

2016-12-07 Thread Karim Farokhnia
On Wednesday, December 7, 2016 at 12:18:51 PM UTC-5, Michael Torrie wrote: > On 12/07/2016 09:38 AM, Karim Farokhnia wrote: > > I am writing a batch file in Python. The batch file, in part, calls a > > program named "oq-console.bat" to run. Then once the program comes up &

calling a program from Python batch file

2016-12-07 Thread Karim Farokhnia
Hi there, I am writing a batch file in Python. The batch file, in part, calls a program named "oq-console.bat" to run. Then once the program comes up (it looks like windows CMD), I need the batch file to type some commands to make it run (just like I would do it by myself). I need the batch

Re: Farewell to Rob Collins

2016-11-16 Thread Karim
On 16/11/2016 11:21, M.-A. Lemburg wrote: s a true Pythonista from the heart. He will always be remember RIP Rob. Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: How can I copy one excel file data to another excel file by excluding hidden rows content using Python

2016-10-19 Thread Karim
UnicodeEncodeError exception raised here! try: writer.writerow(row) except UnicodeEncodeError, e: print("\nWarning: {0}. Row '{1}' will not be extracted!".format(e, row)) Regards Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add data in xlm file ?

2016-08-13 Thread Karim
The idea is to print your Element in a string, parse it using # minidom and convert it again in XML using toprettyxml function. raw_string = et.tostring(element, encoding='UTF-8', method='xml') reparsed = minidom.parseString(raw_string) return reparsed.toprettyxml(indent='\t', encoding='UTF-8') Cheers Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Find a file

2016-06-30 Thread Karim
s='cds.li' # Test l = tuple(find(dirs='.', filenames='cds.lib')) print('\n'.join(l)) Cheers Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 2.7.12

2016-06-28 Thread Karim
f the year. Numerologists may wish to upgrade to Python 3 before we hit the unlucky 2.7.13. Servus, Benjamin 2.7 release manager Thank you! Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: movie from pictures

2016-06-11 Thread Karim
05d.png", ... # and so on ]) You should also give it the full path of ffmpeg. On the other hand, in-loop solution would be more preferable since it lets me to use variable names of the images and paths.. -- https://mail.python.org/mailman/listinfo/python-list Why not use the split() met

Re: Django Girls workshop at EuroPython 2016

2016-05-26 Thread Karim
On 26/05/2016 15:31, alex wright wrote: From the link: "If you are a woman, know English and have a laptop you can apply for a pass!" So it would appear so. On Thu, May 26, 2016 at 5:39 AM, Karim <kliat...@gmail.com> wrote: On 26/05/2016 10:58, M.-A. Lemburg wrote:

Re: Django Girls workshop at EuroPython 2016

2016-05-26 Thread Karim
On 26/05/2016 10:58, M.-A. Lemburg wrote: We’re pleased to announce a Django Girls workshop on Sunday, July 17, the first day of the EuroPython 2016 conference. If you want participate or know someone who’d like to join, please fill in our application form on the Django Girls’ website:

Re: Writing different sections into a file

2016-04-25 Thread Karim
On 25/04/2016 17:00, justin walters wrote: On Mon, Apr 25, 2016 at 3:04 AM, Karim <kliat...@gmail.com> wrote: On 25/04/2016 09:30, Palpandi wrote: Hi, I need to write different sections into a file. At any point of time, content can be added to any section. I don't want kee

Re: Writing different sections into a file

2016-04-25 Thread Karim
()) - Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Fraud

2016-04-17 Thread Karim
On 17/04/2016 03:27, Steven D'Aprano wrote: On Sun, 17 Apr 2016 03:12 am, Mel Drosis wrote: My phone my accounts my home network have all been affected because of someone using coding from Python and Linux and GitHub and json. I don't even know what this stuff is but how do I get rid of it

Re: Python, Linux, default search places.

2016-04-08 Thread Karim
On 08/04/2016 12:01, frantisek.fridr...@rubena.cgs.cz wrote: Hello. Thank you to Karim, thank you to Wildman for response. I will describe my problem in more detail. Python on my computer is installed in /usr directory. My Python contains additional modules such as numpy, scipy, matplotlib

Re: Python, Linux, default search places.

2016-04-07 Thread Karim
export PYTHONPATH=${PYTHONPATH}// export PATH=${PATH}:/bin export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib Mine for pyparsing: export PYTHONPATH=~/project/pyparsing-2.0.3 Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Re-using TCL code from python over network

2016-03-29 Thread Karim
On 29/03/2016 10:29, Sharad Singla wrote: Thanks. This is more of invoking python code from TCL. I am looking for the other way round. Curious, did you rewrite all your TCL code in python? Regards Sharad On Mar 29, 2016 1:10 PM, "Karim" <kliat...@gmail.com <mailto:kl

Re: Re-using TCL code from python over network

2016-03-29 Thread Karim
$interpreter exec "d_s = to_string(getDeviceDescription(opsdb, '$libName', '$deviceName'))" eval "set value [$interpreter eval {d_s}]" return $value } Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: libre office

2016-01-20 Thread Karim
e) # Return target string whithin the cursor selection. return open_found.getString().strip() Hope this help. Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Karim
thod that can leverage ElementTree. Thank you, in advance, for your feedback and guidance. In fact to get rid of double quote simply create your csv reader like that: reader = csv.DictReader(data, dialect='excel', skipinitialspace=True) You should then don't need to slice data variable and reformat it. Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Karim
ine 1 data = 'RequestType="HoldInquiry">',0001,0070,' ^ SyntaxError: invalid syntax BUT IF you correct the string and remove the inner quote after everything's fine: >>> data = 'RequestType="HoldInquiry">,0001,0070, ' >>> root = ElementTree.XML(data) >>> root Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Karim
Yes it changes your quotechar = "'" into quotechar = '"' You should no more get the double quoting of the data string and no more slicing step. Karim On 10/01/2016 00:15, Saran Ahluwalia wrote: Thank you for the feedback on this. I believe that the excel dialect includes jus

Re: Newbie: Check first two non-whitespace characters

2016-01-01 Thread Karim
On 01/01/2016 00:25, Mark Lawrence wrote: On 31/12/2015 18:54, Karim wrote: On 31/12/2015 19:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Karim
On 31/12/2015 19:54, Karim wrote: On 31/12/2015 19:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Karim
am learning pyparsing'] You'll get your string inside the list. Hope this help see pyparsing doc for in depth study. Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Path problems when I am in bash

2015-12-29 Thread Karim
usa-2.0/medusa/ranking.py", line 9, in from scheduler.predictionranking import get_prediction_metrics File "/home/xeon/repositories/git/medusa-2.0/medusa/scheduler/predictionranking.py", line 6, in import hdfs Hello, Can you try to set your PYTHONPATH like that: export PYTHONPA

Re: Olivier Adret

2015-11-06 Thread Karim
lation tool. Chris Angelico Comme dit Chris, cette mailing liste est en anglais et tu peux aller sur le news group fr.comp.lang.python pour du support en français. Mais je suppose que tu avais compris mais au cas où. Cordialement Karim -- https://mail.python.org/mailman/listinfo/python-list

Re: Optimal solution for coloring logging output

2015-08-03 Thread Karim
On 03/08/2015 14:47, Jean-Michel Pichavant wrote: te a logging Formatter that will re Thank you Jean-Michel useful example K -- https://mail.python.org/mailman/listinfo/python-list

Re: xlrd 0.9.4 released!

2015-07-15 Thread Karim
On 15/07/2015 08:27, Chris Withers wrote: Hi All, I'm pleased to announce the release of xlrd 0.9.4: http://pypi.python.org/pypi/xlrd/0.9.4 This release includes the following changes: - Automated tests are now run on Python 3.4 - Use ElementTree.iter() if available, not deprecated

Re: Why do Perl programmers make more money than Python programmers

2013-05-06 Thread Karim
being sarc Austerity for python programmers in Portugal !? ;o) Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: xlrd 0.9.2 released!

2013-04-23 Thread Karim
Thx ! I will update my 0.6 version! Cheers Karim On 09/04/2013 21:38, Chris Withers wrote: Hi All, I'm pleased to announce the release of xlrd 0.9.2: http://pypi.python.org/pypi/xlrd/0.9.2 This release includes the following changes: - Fix some packaging issues that meant docs

Re: Free book, Hacking Secret Ciphers with Python

2013-04-20 Thread Karim
Foundation, Creative Commons, and The Tor Project. Very good book! 1000 Thanks for your unvaluable work. By the way who is Aaron? Karim France -- http://mail.python.org/mailman/listinfo/python-list

Re: equivalent to C pointer

2013-04-18 Thread Karim
Hello, There is no such notion in python. But the closest are iterators and generator functions. Cheers Karim On 18/04/2013 19:06, abdelkader belahcene wrote: Hi everybody, I am new to python and I am discovering it. I know C well, and want to know if python knows how to manage Pointers

Re: Screencast: Creating and deploying an advanced python web application in under 15 minutes!

2013-03-29 Thread Karim
! Timothy Hi Timothy, Very interesting! Thx a lot! Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: tracer une cercle dans python tkinter?

2013-03-01 Thread Karim
On 01/03/2013 19:10, Vincent Vande Vyvre wrote: Le 01/03/13 18:53, olsr.ka...@gmail.com a écrit : comment tracer une cercle contient un numéro au un symbole dans le center dans python tkinter? Posez votre question ici: http://www.developpez.net/forums/f96/autres-langages/python-zope/ Heuu

Re: please i need explanation

2013-01-11 Thread Karim
the factorial is 1 (return by the function). in other case you multiply previous factoriel value by n (f *= n = f = f *n). And you decrement n by 1 (f -=1 = f = f - 1). This gives n*(n-)*(n-2) general formula for factorial. Regards Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: please i need explanation

2013-01-11 Thread Karim
) for n 1. For n = 0, 1 the factorial is 1 the reason for the 'return 1'. f *= n = f = f* n f -= 1 = f = f - 1 but sure this is not correct as Kimmo said n = n - 1 or n -= 1 Regards Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] How to run multiline shell command within python

2013-01-10 Thread Karim
On 10/01/2013 09:31, Hugo Arts wrote: On Thu, Jan 10, 2013 at 7:01 AM, Karim kliat...@gmail.com mailto:kliat...@gmail.com wrote: Hello all, I want to run multiline shell command within python without using a command file but directly execute several lines of shell. I already

Re: [Tutor] How to run multiline shell command within python

2013-01-10 Thread Karim
On 10/01/2013 16:21, Matty Sarro wrote: Have you looked a the pexpect class? It works like gangbusters, especially if you're trying to run something with an interactive shell. http://www.noah.org/wiki/pexpect On Thu, Jan 10, 2013 at 9:25 AM, Karim kliat...@gmail.com mailto:kliat

How to run multiline shell command within python

2013-01-09 Thread Karim
of code directly. Example: catEOF myfile echo foo echo bar ... EOF Regards Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: my email

2012-07-19 Thread Karim
Le 18/07/2012 04:34, Simon Cropper a écrit : On 18/07/12 11:44, Maria Hanna Carmela Dionisio wrote: mmdionisio1...@yahoo.com.ph Just a newbhie here : [snip] You must know your password to change your options (including changing the password, itself) or to unsubscribe. It is:

Re: Which way is best to execute a Python script in Excel?

2012-07-05 Thread Karim
printing this e-mail, you are only doing good for our planet. Look at PyUNO from OpenOffice very large API: http://www.openoffice.org/api/docs I use to create all my documention (Excell, Writer, etc...) on this API. Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: Which way is best to execute a Python script in Excel?

2012-07-05 Thread Karim
Le 05/07/2012 23:20, Terry Reedy a écrit : On 7/5/2012 5:12 AM, Thomas Jollans wrote: On 07/05/2012 09:26 AM, Karim wrote: Look at PyUNO from OpenOffice very large API: http://www.openoffice.org/api/docs I use to create all my documention (Excell, Writer, etc...) on this API. Note

Re: Which way is best to execute a Python script in Excel?

2012-07-05 Thread Karim
Le 06/07/2012 07:09, Terry Reedy a écrit : On 7/5/2012 10:30 PM, Karim wrote: An excellent link to derived all code example to python: http://www.pitonyak.org/AndrewMacro.sxw. Even though he only writes in OOBasic, you are right that he explains the basic concepts needed for accessing

Re: Py330b1, un café crème sucré

2012-06-27 Thread Karim
Euhhh, j'ai pas tout suivi. C'est quoi la feinte? Cheers Karim Le 27/06/2012 21:49, wxjmfa...@gmail.com a écrit : # -*- coding: cp1252 -*- # café.py import sys print(sys.version) sys.path.append('d:\\crème') import crème import sucré s = ' '.join(['un', 'café', crème.tag, sucré.tag

Re: python with xl

2012-06-11 Thread Karim
://www.python-excel.org/) Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE: byteformat0.2a

2012-05-15 Thread Karim
Cool steven, very helpful I have a db which holds units data it will avoids me to do such format conversion. Thnx Cheers Karim Le 15/05/2012 10:30, Steven D'Aprano a écrit : I am pleased to announce a new release of byteformat. http://pypi.python.org/pypi/byteformat byteformat

Re: xlrd 0.7.6 released!

2012-04-06 Thread Karim
branches so I don't have to modify the xlrd one for xls binary file. I will use both in the same program. Many thanks Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: xlrd 0.7.6 released!

2012-04-04 Thread Karim
released 0.7.6, which will hopefully bring an end to the brown-bagging. Any more problems, please let the python-ex...@googlegroups.com mailing list know... cheers, Chris Hello, This release manage the '.xlsx' format? Thanks Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a ConfigParser which keeps comments

2012-03-15 Thread Karim
difference. The write() mehtod should keep existing comments. Does anybody know or implement something like this or is there as switrch, that I overlooked in hte documentaiton. I use ConfigObj. Sure configObj is a must...I use it too. http://www.voidspace.org.uk/python/configobj.html Cheers Karim

Re: decompilation

2012-03-02 Thread Karim
guessed my word in ' + str(i + 1) + ' tries!!!') else: bogusWord = pickWordFrom(L) print('You lose. The word was: ' + bogusWord) I haven't actually checked if this code runs :) Great code (unpy3) Arnaud! pretty well built. Cheers Karim -- http://mail.python.org/mailman

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
[key]) Code above not tested but should work. Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 10:01, Karim a écrit : Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions (http://sports.yahoo.com/nba/players?type=lastnamefirst

Re: xlwt 0.7.3 released!

2012-02-21 Thread Karim
Hello chris, Thanks for the greet news! Is there any chance that xlrd read .xlsx format and arrive to decode special unicode instead of firing some unicode Exception? Cheers Karim Le 21/02/2012 10:18, Chris Withers a écrit : Hi All, I'm pleased to announce the release of xlwt 0.7.3

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-07 Thread Karim
Le 07/12/2011 12:30, Skip Montanaro a écrit : Does anyone have a recipe for the subject build? I know Solaris is a minority platform these days, but surely someone has tackled this problem, haven't they? Thx, Skip ./configure make make install Karim -- http://mail.python.org/mailman

Template class and class design on concrete example xl2csv writer

2011-11-23 Thread Karim
. Except from that all better design or others critics will be welcome. Regards karim ___ from __future__ import print_function import sys, os, argparse, csv, xlrd

Please code review.

2011-08-02 Thread Karim
Hello, I need a generator to create the cellname in a excell (using pyuno) document to assign value to the correct cell. The following code does this but do you have some optimizations on it, for instance to get the alphabetic chars instead of hard-coding it. Cheers karim Python 2.7.1

Re: Please code review.

2011-08-02 Thread Karim
Thanks Paul, I never used string module. In fact, cellnames.split('') gives a syntax error w/ empty string. That's why I use the intermediate replace() which accept that. Cheers Karim On 08/02/2011 02:04 PM, Paul Kölle wrote: Am 02.08.2011 13:45, schrieb Karim: Hello, I need a generator

Re: Please code review.

2011-08-02 Thread Karim
Thanks Chris! It seems I am blind I should have seen it... In fact I started with the need (imaginary) to use enumerate() to get some indices but ended in a more simple code. Indeed, your's is simpler. For the double chars extension I will see if I need it in the future. Cheers Karim On 08

Re: Please code review.

2011-08-02 Thread Karim
On 08/02/2011 02:27 PM, Peter Otten wrote: Karim wrote: I need a generator to create the cellname in a excell (using pyuno) document to assign value to the correct cell. Isn't there a way to use a (row, column) tuple directly? If so I'd prefer that. Also, there used to be an alternative

Re: Please code review.

2011-08-02 Thread Karim
Thanks Martin, This is the generator expression version. I can use both function generator or generator expression version correction. Cheers Karim On 08/02/2011 02:47 PM, Martin Gracik wrote: def get_cellnames2(rows, cols): rows = range(1, rows + 1) cols = string.ascii_uppercase

Re: Please code review.

2011-08-02 Thread Karim
On 08/02/2011 03:59 PM, Peter Otten wrote: Karim wrote: values = ( (22.5,21.5,121.5), (5615.3,615.3,-615.3), (-2315.7,315.7,415.7) ) it = _xrange_cellnames(rows=len(value), cols=len(values[0])) table.getCellByName(it.next()).setValue(22.5) table.getCellByName(it.next()).setValue(5615.3

Re: shlex parsing

2011-07-29 Thread Karim
minus by default is taken as a individual word and in split it is not. get_token() method return '-' alone and you have to set object attributes wordchars += '-' to have the same behavior as shlex.split(). Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it bad practise to write __all__ like that

2011-07-29 Thread Karim
. It changed from non-sense verbal fightings I saw earlier in some discussions like perl versus python related topic. Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: shlex parsing

2011-07-29 Thread Karim
On 07/29/2011 03:42 PM, Web Dreamer wrote: whitespace_split = True Thanks for the tip! Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Is it bad practise to write __all__ like that

2011-07-28 Thread Karim
Hello, __all__ = 'api db input output tcl'.split() or __all__ = api db input output tcl .split() for lazy boy ;o). It is readable as well. What do you think? Cheers Karim -- http://mail.python.org

Re: Is it bad practise to write __all__ like that

2011-07-28 Thread Karim
On 07/28/2011 02:29 PM, Thomas Rachel wrote: __all__ = AllList() Hello Thomas, Very beautiful and elegant code. Having both at the same time an instance and a method... With this 'small' topic, you taught me something today on property application! Cheers Karim -- http://mail.python.org

Re: shlex parsing

2011-07-28 Thread Karim
Hello You have you feet on earth Web Dreamer! Very clever! Beautiful hack! Many Thanks Karim On 07/28/2011 05:48 PM, Web Dreamer wrote: Karim a écrit ce mercredi 27 juillet 2011 21:30 dansmailman.1538.1311795072.1164.python-l...@python.org : Hello All, I would like to parse this TCL

Re: shlex parsing

2011-07-28 Thread Karim
(optionlist[0::2],optionlist[1::2])]) Karim PS: I am from Grenoble, which place in France are from? On 07/28/2011 06:37 PM, Nobody wrote: On Thu, 28 Jul 2011 17:48:34 +0200, Web Dreamer wrote: I would like to parse this TCL command line with shlex: '-option1 [get_rule A1 B2] -option2 $VAR

shlex parsing

2011-07-27 Thread Karim
to the shlec properties attributes 'quotes', 'whitespace', etc... But I make 'choux blanc'. If somebody has complex experiences with this module I am in. Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: shlex parsing

2011-07-27 Thread Karim
(at maximum). To bad it is not part of python standard libs. On the other hand, I will have to regroup expression like '-option1 $VAL == $CONSTRAINT' in ['-option1', '$VAL == $CONSTRAINT']. So it seems that I have no others choicse and have to use a parser like pyParsing. Regards Karim On 07/27/2011

Fall in love with bpython

2011-07-27 Thread Karim
, highlights, etc... Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: shlex parsing

2011-07-27 Thread Karim
but using pyParsing still be easer. Thanks Cheers On Wed, Jul 27, 2011 at 2:08 PM, Karim karim.liat...@free.fr mailto:karim.liat...@free.fr wrote: Thank you Dan for answering. I ended with this and gave up with shlex: split = ['-option1', '[get_rule', 'A1', 'B2]', '-option2', '$VAR

Re: Fall in love with bpython

2011-07-27 Thread Karim
On 07/27/2011 12:34 AM, Alan Gauld wrote: Karim wrote: I use bpython interpreter. This is a very good interactive CLI. I had never heard of it and had to google for it. It appears to be a curses based CLI for *nix and MacOS Ah Windows user. I want to create a CLI with the same features

Re: Fall in love with bpython

2011-07-27 Thread Karim
it as well. Cheers Karim Michael * Karimkarim.liat...@free.fr [2011-07-27 23:46]: Hello, I use bpython interpreter. This is a very good interactive CLI. I want to create a CLI with the same features than bpython. But the cmd std module seems no to be used in this project... Is there a tool where I

Re: [Tutor] Fall in love with bpython

2011-07-27 Thread Karim
On 07/28/2011 01:32 AM, Walter Prins wrote: Hi Karim On 28 July 2011 00:04, Karim karim.liat...@free.fr mailto:karim.liat...@free.fr wrote: On 07/27/2011 12:34 AM, Alan Gauld wrote: Karim wrote: I use bpython interpreter. This is a very good interactive

Re: Trying to learn about metaclasses

2011-07-25 Thread Karim
Very good. Karim On 07/25/2011 05:46 PM, jfine wrote: Hi I gave a tutorial at this year's EuroPython that covered metaclasses. You can get the tutorial materials from a link on: http://ep2011.europython.eu/conference/talks/objects-and-classes-in-python-and-javascript Jonathan -- http

Re: Use self.vars in class.method(parameters, self.vars)

2011-07-22 Thread Karim
in case you want to access it. Regards Karim On 07/22/2011 01:12 PM, caccolangrifata wrote: I'm very very new with python, and I have some experience with java programming, so probably you guys will notice. Anyway this is my question: I'd like to use class scope vars in method parameter, something

Re: Use self.vars in class.method(parameters, self.vars)

2011-07-22 Thread Karim
. Thanks to take time to point that. Regards Karim On 07/22/2011 02:06 PM, Thomas Jollans wrote: On 22/07/11 13:32, Karim wrote: I think you did a typo it is def foo2(self, len = self._myvar): while i len: dosomething That, of course, won't work: the default argument

Re: Use self.vars in class.method(parameters, self.vars)

2011-07-22 Thread Karim
example: karim@Requiem4Dream:~$ python Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type help, copyright, credits or license for more information. a = foo() dir(a) ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__

Re: Argparse, and linking to methods in Subclasses

2011-07-18 Thread Karim
(namespace_arg.type_of_server) SERVER.check() def do_the_build(namespace_args): if not SERVER: SERVER = Server(namespace_arg.type_of_server) SERVER.build() If I correctly understood your issue. Regards Karim On 07/18/2011 03:48 AM, Victor Hooi wrote: Hi, I have a simple Python script to perform

Re: Argparse, and linking to methods in Subclasses

2011-07-18 Thread Karim
Hello Michele, Your solution is great! You can combine it perhaps with the use of set_defaults() method of the argparse parser, I gave. Cheers karim On 07/18/2011 01:56 PM, Michele Simionato wrote: Here is an example by using my own library plac (http://pypi.python.org/pypi/plac): class

Re: What is the Most Efficient Way of Printing A Dict's Contents Out In Columns?

2011-06-14 Thread Karim
8 9 1011 12 Over alternative that only costs 2 lines of code, use pretty print (not in columns but crystal clear): import pprint pprint.pprint(my_dict) or in a file: pprint.pprint(my_dict, open(output.dat, wb)) Cheers karim -- http

Re: how to avoid leading white spaces

2011-06-01 Thread Karim
On 06/01/2011 09:39 PM, ru...@yahoo.com wrote: On Jun 1, 11:11 am, Chris Rebertc...@rebertia.com wrote: On Wed, Jun 1, 2011 at 12:31 AM, rakesh kumar Hi i have a file which contains data //ACCDJ EXEC DB2UNLDC,DFLID=DFLID,PARMLIB=PARMLIB, //

Re: Why did Quora choose Python for its development?

2011-05-27 Thread Karim
to be, I've got a great collection of all kinds of neat tools, so I'm going to pretend the hammer that's in there doesn't exist because I once smashed my thumb with it and it hurt a lot. HAHAHAHAHAHA Very funny! This thread is awsome. Cheers Karim -- http://mail.python.org/mailman/listinfo/python

Re: Why did Quora choose Python for its development?

2011-05-26 Thread Karim
On 05/26/2011 10:03 PM, Terry Reedy wrote: On 5/26/2011 11:36 AM, John Bokma wrote: Ben Finneyb...@benfinney.id.au writes: [impolite comment not quoted] Get a life. Or better, just fuck off and die. It will improve both the world and the Python community, of which you are nothing but a

Re: Trying to understand html.parser.HTMLParser

2011-05-19 Thread Karim
On 05/19/2011 11:35 PM, Andrew Berg wrote: On 2011.05.16 02:26 AM, Karim wrote: Use regular expression for bad HTLM or beautifulSoup (google it), below a exemple to extract all html links: Actually, using regex wasn't so bad: import re import urllib.request url = 'http://x264.nl/x264/?dir

Re: Trying to understand html.parser.HTMLParser

2011-05-17 Thread Karim
On 05/17/2011 03:05 AM, Andrew Berg wrote: On 2011.05.16 02:26 AM, Karim wrote: Use regular expression for bad HTLM or beautifulSoup (google it), below a exemple to extract all html links: linksList = re.findall('a href=(.*?).*?/a',htmlSource) for link in linksList: print link I

Re: Trying to understand html.parser.HTMLParser

2011-05-16 Thread Karim
Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: Customize help output from optparse (or argparse)

2011-05-12 Thread Karim
install/lib/python2.7/argparse.py Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom string joining

2011-05-09 Thread Karim
iterables of strings: new_string = |.join(str(x) for x in iterable_of_custom_objects) You just have to implement __str__() python special method for your custom_objects. Regards Karim Cheers, Chris -- http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use optparse without the command line?

2011-04-08 Thread Karim
(=v2.7). Regards Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: using python to post data to a form

2011-04-08 Thread Karim
() is the most important. To find cgi data dict you can use ClientForm.py (google it!) it is a good helper to find form data. Regards Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: return an object of a different class

2011-02-16 Thread Karim
. Regards Karim -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] Accessing query results html frame :The solution

2011-02-15 Thread Karim
On 02/14/2011 01:41 PM, Karim wrote: Hello, As I get no response from the tutor python list, I am continuing to investigate my problem. In fact the issue is that there are 2 forms in the interactive page and my request does nothing instead I get the interactive page not the submission I

Re: [Tutor] Accessing query results html frame : PLEASE READ ME :o)

2011-02-14 Thread Karim
specify the correct FORM submission and how could I chose the correct action because there are several TYPE='submit' and I am only interested by this one VALUE=Query? Regards Karim On 02/11/2011 08:51 AM, Karim wrote: Hello, In fact as found in the net: The concept of browser frames

Re: get the pid of a process with pexpect

2008-05-06 Thread Karim Bernardet
} ${HMM} ${P2USE} ${p2use2} echo $! pids this way I have all the pids Cheers ! Noah wrote: On May 5, 7:18 am, Karim Bernardet [EMAIL PROTECTED] wrote: ssh_tunnel = pexpect.spawn (tunnel_command % globals()) ... print ssh_tunnel.pid but ssh_tunnel is not the pid of the ssh tunnel

get the pid of a process with pexpect

2008-05-05 Thread Karim Bernardet
process. I have tried to get it like this ssh_tunnel = pexpect.spawn (tunnel_command % globals()) ... print ssh_tunnel.pid but ssh_tunnel is not the pid of the ssh tunnel Is there a way to get it using pexpect ? Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list

Appending a log file and see progress as program executes

2007-05-30 Thread Karim Ali
is that I cant see anything in the log file when I try to open it say with notepad while the program is running...and this is not good at all! Any suggestions are appreciated. Karim _ See Fireworks On Live Image Search http

  1   2   >