Python interactive help()

2012-10-19 Thread Mark Lawrence
Good morning/afternoon/evening all, Where is this specific usage documented as my search engine skills have let me down? By this I mean entering help() without parameters to get the following output and then the help> prompt. C:\Users\Mark\workspace\CrossCode>py -3 Python 3.3.0 (v3.3.0:bd8af

RE: Fastest template engine

2012-10-19 Thread Andriy Kornatskyy
Per community request cheetah has been added to benchmark. Post updated, just in case: http://mindref.blogspot.com/2012/07/python-fastest-template.html Comments or suggestions are welcome. Andriy > From: andriy.kornats...@live.com > To: python-list@py

pls help me with this prog

2012-10-19 Thread inshu chauhan
in this prog I have written a code to calculate teh centre of a given 3D data.. but i want to calculate it for every 3 points not the whole data, but instead of giving me centre for every 3 data the prog is printing the centre 3 times... import cv from math import floor, sqrt, ceil from numpy imp

Re: Testing against multiple versions of Python

2012-10-19 Thread andrea crotti
2012/10/19 Michele Simionato : > Yesterday I released a new version of the decorator module. It should run > under Python 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3. I did not have the will > to install on my machine 8 different versions of Python, so I just tested it > with Python 2.7 and 3.3. But

Re: Testing against multiple versions of Python

2012-10-19 Thread Boris FELD
Did you take a look at https://www.shiningpanda-ci.com/? 2012/10/19 andrea crotti : > 2012/10/19 Michele Simionato : >> Yesterday I released a new version of the decorator module. It should run >> under Python 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3. I did not have the will >> to install on my ma

Re: Python interactive help()

2012-10-19 Thread Duncan Booth
Mark Lawrence wrote: > Good morning/afternoon/evening all, > > Where is this specific usage documented as my search engine skills have > let me down? By this I mean entering help() without parameters to get > the following output and then the help> prompt. > It is documented under 'built-in

Re: Python interactive help()

2012-10-19 Thread Peter Otten
Mark Lawrence wrote: > Where is this specific usage documented as my search engine skills have > let me down? find and grep ftw. > By this I mean entering help() without parameters to get > the following output and then the help> prompt. http://docs.python.org/dev/py3k/library/functions.html#

Re: Python interactive help()

2012-10-19 Thread Mark Lawrence
On 19/10/2012 09:56, Duncan Booth wrote: Mark Lawrence wrote: Good morning/afternoon/evening all, Where is this specific usage documented as my search engine skills have let me down? By this I mean entering help() without parameters to get the following output and then the help> prompt. It

error executing "import html.parser" from a script

2012-10-19 Thread Paul Volkov
What is this madness? I have Python 3.3.0 installed on Windows XP. I do not have Python 2 (but I had it before). I do the following steps: 1. Import from an interactive session (no problems) >python Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Typ

Re: Testing against multiple versions of Python

2012-10-19 Thread Duncan Booth
Michele Simionato wrote: > Yesterday I released a new version of the decorator module. It should > run under Python 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3. I did not > have the will to install on my machine 8 different versions of Python, > so I just tested it with Python 2.7 and 3.3. But I do no

Re: A desperate lunge for on-topic-ness

2012-10-19 Thread Jean-Michel Pichavant
- Original Message - [snipe 80 char line discussion] > And, quite frankly, people who care more about the readability of > their > code than about squeezing in as much processing into a single line of > text as possible. > As usual Steven, you take someone's argument, you add a little

Re: Testing against multiple versions of Python

2012-10-19 Thread Michele Simionato
ShiningPanda looks really really cool. I need to investigate it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Add if...else... switch to doctest?

2012-10-19 Thread Duncan Booth
David wrote: > Hello, how to add if...else... switch to doctest? > E.g. function outputs different value when global_var change. > > """ > if (global_var == True): function() > [1,2] > else: function() > [1,2,3] > """ > > Thank you very much. One other case the other replies don't se

section with in a section config file and reading that config file

2012-10-19 Thread kampy
hi all, my requirement is to have section with in a section in config parameters ex: [AAA] [BBB] a=1 b=1 [CCC] a=1 b=2 Any one help me in understanding how to make sure that config file to have a structure like this and reading with the config parser -- http://mail.py

[2.5.1 + CGI] Which interpreter and files?

2012-10-19 Thread Gilles
Hello I'd like to use the Mongoose basic web server with Python which can call scripts through CGI. I have a coupole of questions: 1. Mongoose must be told in the shebang file where to locate the interpreter, but ActivePython 2.5.1 comes with fours files that look like the interpreter (actually,

Re: section with in a section config file and reading that config file

2012-10-19 Thread Tarek Ziadé
On 10/19/12 11:51 AM, kampy wrote: hi all, my requirement is to have section with in a section in config parameters ex: [AAA] [BBB] a=1 b=1 [CCC] a=1 b=2 Any one help me in understanding how to make sure that config file to have a structure like this and readin

Re: [2.5.1 + CGI] Which interpreter and files?

2012-10-19 Thread Chris Angelico
On Fri, Oct 19, 2012 at 9:02 PM, Gilles wrote: > 1. Mongoose must be told in the shebang file where to locate the > interpreter, but ActivePython 2.5.1 comes with fours files that look > like the interpreter (actually, two files, since the other two have > the same size so they are probably left o

Re: Python interactive help()

2012-10-19 Thread Duncan Booth
Mark Lawrence wrote: > On 19/10/2012 09:56, Duncan Booth wrote: >> Mark Lawrence wrote: >> >>> Good morning/afternoon/evening all, >>> >>> Where is this specific usage documented as my search engine skills have >>> let me down? By this I mean entering help() without parameters to get >>> the fo

Re: section with in a section config file and reading that config file

2012-10-19 Thread narasimha18sv
On Friday, 19 October 2012 15:39:57 UTC+5:30, Tarek Ziadé wrote: > On 10/19/12 11:51 AM, kampy wrote: > > > hi all, > > > my requirement is to have section with in a section in config parameters > > > ex: > > > [AAA] > > > [BBB] > > > a=1 > > > b=1 > > > [CCC] > > >

Re: [2.5.1 + CGI] Which interpreter and files?

2012-10-19 Thread Gilles
On Fri, 19 Oct 2012 21:09:55 +1100, Chris Angelico wrote: >The ones with the -w tag are designed for Windows apps that are going >to bring up a GUI and don't want a console. The python[w]25.exe ones >will be in case you have multiple Pythons installed and want to >explicitly call for version 2.5.

Re: python scripts for web

2012-10-19 Thread Gilles
On Thu, 18 Oct 2012 23:05:48 -0700 (PDT), chip9m...@gmail.com wrote: >these scripts will do a lot of calculation on a big dataset, and it is >possible that there will be many requests in a short period of time. In that case, are you sure a web script is a good idea? If you're thinking web to make

Re: error executing "import html.parser" from a script

2012-10-19 Thread Hans Mulder
On 19/10/12 11:15:45, Paul Volkov wrote: > What is this madness? That's because your script is called "html.py". If you import html.parser, Python first imports html, then checks that it's a package and contains a module named "parser". When Python imports html, it searches for a file named "htm

Re: Fwd: system tray or notification area in python

2012-10-19 Thread Anssi Saari
Daniel Fetchinson writes: > But I have zero experience with gui programming in python. So any > pointers would be much appreciated how to implement a system tray in > python. Gtk is I guess just one option, one could use other stuff from > python but I wouldn't know what the simplest approach is.

Re: locking files on Linux

2012-10-19 Thread andrea crotti
2012/10/18 Oscar Benjamin : > > The lock is cooperative. It does not prevent the file from being > opened or overwritten. It only prevents any other process from > obtaining the lock. Here you open the file with mode 'w' which > truncates the file instantly (without checking for the lock). > > > Os

Re: pls help me with this prog

2012-10-19 Thread rusi
Dont know what your code does/tries to do. Anyway some points: On Oct 19, 1:40 pm, inshu chauhan wrote: > in this prog I have written a code to calculate teh centre of a given 3D > data.. > > but i want to calculate it for every 3 points not the whole data, but > instead of giving me centre for

Re: Python on Windows

2012-10-19 Thread graham
On 16/10/2012 12:29, graham wrote: Downloaded and installed Python 2.7.3 for windows (an XP machine). Entered the Python interactive interpreter/command line and typed the following: >>>import feedparser and I get the error message "No module named feedparser". There is a feedparser.py

Re: Python on Windows

2012-10-19 Thread Tim Golden
On 19/10/2012 14:24, graham wrote: > Thanks to everyone who replied. > > Python was installed in the subdirectory C:\Python27 with the file > feedparser.py residing in C:\Python27\Lib\email. > > Setting the Windows environment variable (which did not previously > exist) to C:\Python27\Lib\email a

Re: Python on Windows

2012-10-19 Thread rusi
On Oct 19, 6:24 pm, graham wrote: > On 16/10/2012 12:29, graham wrote: > > > > > > > > > > > > > Downloaded and installed Python 2.7.3 for windows (an XP machine). > > > Entered the Python interactive interpreter/command line and typed the > > following: > > >      >>>import feedparser > > > and I

Re: section with in a section config file and reading that config file

2012-10-19 Thread Tarek Ziadé
On 10/19/12 12:22 PM, narasimha1...@gmail.com wrote: yes but it is not only for one structure like above there will be many sections like that I'd use yaml or json then... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Windows

2012-10-19 Thread Tim Golden
On 19/10/2012 14:24, graham wrote: > Python was installed in the subdirectory C:\Python27 with the file > feedparser.py residing in C:\Python27\Lib\email. > > Setting the Windows environment variable (which did not previously > exist) to C:\Python27\Lib\email allowed me to import feedparser > succ

Re: Python on Windows

2012-10-19 Thread graham
On 19/10/2012 14:24, graham wrote: On 16/10/2012 12:29, graham wrote: Downloaded and installed Python 2.7.3 for windows (an XP machine). Entered the Python interactive interpreter/command line and typed the following: >>>import feedparser and I get the error message "No module named fee

Re: Python on Windows

2012-10-19 Thread Mark Lawrence
On 19/10/2012 14:44, Tim Golden wrote: (In general, PyPI is the first place to look for Python packages). For the benefit of the OP and others this is worth reading on how to get Python packages from pypi that let you get Python packages from pypi http://stackoverflow.com/questions/4750806

Re: Python on Windows

2012-10-19 Thread Tim Golden
[Could I suggest snipping some of the preceding replies unless you're referring directly to them? Just leave enough to make the context clear] [... attempts to find feedparser module for beginner's tutorial ...] On 19/10/2012 15:12, graham wrote: > Once again thanks to those that replied. > > Si

Re: Watching output and put back in background

2012-10-19 Thread Nobody
On Thu, 18 Oct 2012 14:05:58 +0100, andrea crotti wrote: > Maybe a solution would be to redirect the stderr to file and watch that > instead.. > > Or otherwise I could use a thread for each shell command, but I would like > to avoid head-aches with possible race-conditions.. If you're running mu

Re: section with in a section config file and reading that config file

2012-10-19 Thread rusi
On Oct 19, 6:58 pm, Tarek Ziadé wrote: > On 10/19/12 12:22 PM, narasimha1...@gmail.com wrote: > > > yes but it is not only for one structure like above there will be many > > sections like that > > I'd use yaml or json then... Maybe http://www.voidspace.org.uk/python/configobj.html ?? -- http:/

Re: Python on Windows

2012-10-19 Thread Tim Golden
On 19/10/2012 15:23, Mark Lawrence wrote: > On 19/10/2012 14:44, Tim Golden wrote: >> >> (In general, PyPI is the first place to look for Python packages). >> >> > > For the benefit of the OP and others this is worth reading on how to get > Python packages from pypi that let you get Python package

Re: locking files on Linux

2012-10-19 Thread Nobody
On Thu, 18 Oct 2012 14:44:27 +0100, andrea crotti wrote: > Uhh I see thanks, I guess I'll use the good-old .lock file (even if it > might have some problems too). In which case, you don't see. A lock file is also advisory, i.e. it only affects applications which explicitly check for a lock file.

Image.paste with images with different palettes...

2012-10-19 Thread Tracubik
Hi all! I'm trying to create a map generator for c64's games it's a simple script and it work properly, but i've problem if i try to modify images before creating the map. what i do is: - take a 8 bit screenshoot with VICE emulator in gif or bmp format - open shutter (screenshoot edit tool und

Good debugger for CPython 3.2?

2012-10-19 Thread Dan Stromberg
What's a good debugger for CPython 3.2? I'd prefer to use it on Linux Mint 13, and I'd be happy with something based on X11 or curses. I tried winpdb, but it was cranky that Linux didn't have a spawn callable. Why they didn't use the portable subprocess module escapes me. I also tried ddd, but i

Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
Hi, I am trying to read a file into memory. The size of the file is around 1 GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available physical memory when I was trying to read the file. I tried to read the file as follows: >>> fdata = open(filename, 'r').read() I got a

Re: Good debugger for CPython 3.2?

2012-10-19 Thread Dan Stromberg
On Fri, Oct 19, 2012 at 9:26 AM, Dan Stromberg wrote: > > What's a good debugger for CPython 3.2? I'd prefer to use it on Linux > Mint 13, and I'd be happy with something based on X11 or curses. > > I tried winpdb, but it was cranky that Linux didn't have a spawn > callable. Why they didn't use

Re: A desperate lunge for on-topic-ness

2012-10-19 Thread Demian Brecht
On 2012-10-18, at 6:34 PM, Steven D'Aprano wrote: > Flame away :) This post made my Friday, even though I'm sitting on a nearly two hour bus ride into work because I missed my commuter train. Just wanted you to know ;) You noted *every* reason (and them some) why my own code never passed 79

Re: Python does not take up available physical memory

2012-10-19 Thread Emile van Sebille
On 10/19/2012 10:08 AM, Pradipto Banerjee wrote: Hi, I am trying to read a file into memory. The size of the file is around 1 GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available physical memory when I was trying to read the file. I tried to read the file as follows:

Re: Python does not take up available physical memory

2012-10-19 Thread Ian Kelly
On Fri, Oct 19, 2012 at 11:08 AM, Pradipto Banerjee wrote: > Is there any reason why python can’t read a 1GB file in memory even when a > 2.3 GB physical memory is available? Do I need to make a change in some > setting or preferences? > > > > I am using python(x,y) distribution (python 2.7) and u

Re: Remove uncide notation

2012-10-19 Thread 88888 Dihedral
Ashish Jain於 2012年10月18日星期四UTC+8下午5時27分04秒寫道: > Hi, > > > > I have a html string in an object, when I do repr() of that object, I get > value as: > > > > {'Id' : 1, 'Body': u' Hello '} > > > > I don't wish to have 'u' as the character in my string representation. As > this is not a valid

Fwd: Format of datetime dump

2012-10-19 Thread Mateusz Loskot
Hi, I'm not sure if this list is the right place to ask question about PyYAML, but the yaml-core seems to be too general and quiet. So, I decided to forward my question here. I asked on yaml-core the following question, would anyone have any insights? Mat -- Forwarded message --

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
I have a 32-bit machine. Can I install a 64-bit build even if my PC is 32-bit? -Original Message- From: Python-list [mailto:python-list-bounces+pradipto.banerjee=adainvestments@python.org] On Behalf Of Ian Kelly Sent: Friday, October 19, 2012 2:48 PM To: Python Subject: Re: Python do

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
Thanks, I tried that. Still got MemoryError, but at least this time python tried to use the physical memory. What I noticed is that before it gave me the error it used up to 1.5GB (of the 2.23 GB originally showed as available) - so in general, python takes up more memory than the size of the fi

Re: Python does not take up available physical memory

2012-10-19 Thread MRAB
On 2012-10-19 20:04, Pradipto Banerjee wrote: I have a 32-bit machine. Can I install a 64-bit build even if my PC is 32-bit? No. A 64-bit build is for a 64-bit PC. -- http://mail.python.org/mailman/listinfo/python-list

RE: Python does not take up available physical memory

2012-10-19 Thread Ian Kelly
On Oct 19, 2012 1:05 PM, "Pradipto Banerjee" < pradipto.baner...@adainvestments.com> wrote: > > I have a 32-bit machine. Can I install a 64-bit build even if my PC is 32-bit? No. Try following up on Emile's suggestion instead. -- http://mail.python.org/mailman/listinfo/python-list

RE: Python does not take up available physical memory

2012-10-19 Thread Prasad, Ramit
Emile van Sebille wrote: > On 10/19/2012 10:08 AM, Pradipto Banerjee wrote: > > Hi, > > > > I am trying to read a file into memory. The size of the file is around 1 > > GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB > > available physical memory when I was trying to read the

Re: Python does not take up available physical memory

2012-10-19 Thread Chris Kaynor
On Fri, Oct 19, 2012 at 12:03 PM, Pradipto Banerjee wrote: > > Thanks, I tried that. Still got MemoryError, but at least this time python > tried to use the physical memory. What I noticed is that before it gave me > the error it used up to 1.5GB (of the 2.23 GB originally showed as available)

Re: Python does not take up available physical memory

2012-10-19 Thread Chris Angelico
On Sat, Oct 20, 2012 at 4:08 AM, Pradipto Banerjee wrote: > I am trying to read a file into memory. The size of the file is around 1 GB. > I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available > physical memory when I was trying to read the file. I tried to read the file > as

RE: Python does not take up available physical memory

2012-10-19 Thread Prasad, Ramit
Chris Angelico wrote: > On Sat, Oct 20, 2012 at 4:08 AM, Pradipto Banerjee > wrote: > > I am trying to read a file into memory. The size of the file is around 1 GB. > > I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available > > physical memory when I was trying to read the fil

RE: Python does not take up available physical memory

2012-10-19 Thread Prasad, Ramit
Pradipto Banerjee wrote: > Thanks, I tried that. Still got MemoryError, but at least this time python > tried to use the physical memory. > What I noticed is that before it gave me the error it used up to 1.5GB (of > the 2.23 GB originally showed as > available) - so in general, python takes up m

Is there a way to programmatically turn on remote registry?

2012-10-19 Thread Kevin Holleran
Hi, I have written a script to poll some registry values but remote registry is turned off through GPO on the network I need to run it against. The account running the script is an admin on these boxes. Is there a way for me to turn on remote registry for the duration of the script's runtime? T

Tkinter Create/Destory Button

2012-10-19 Thread bbbenrothschild
I am trying to create a button in Tkinter and then when it is pressed delete it/have it disappear. Does anyone know the simplest script to do that with. Thanks for your help. -- http://mail.python.org/mailman/listinfo/python-list

RE: Is there a way to programmatically turn on remote registry?

2012-10-19 Thread Prasad, Ramit
Kevin Holleran wrote: > Hi, > > I have written a script to poll some registry values but remote registry is > turned off through GPO on the > network I need to run it against.  The account running the script is an admin > on these boxes.  Is there a way > for me to turn on remote registry for th

RE: Tkinter Create/Destory Button

2012-10-19 Thread Prasad, Ramit
bbbenrothsch...@gmail.com wrote: > I am trying to create a button in Tkinter and then when it is pressed delete > it/have it disappear. Does anyone > know the simplest script to do that with. Thanks for your help. Try http://www.gossamer-threads.com/lists/python/python/118851 . If you just want

Re: When to clear elements using cElementTree

2012-10-19 Thread Ben Temperton
I managed to solve this using the following method: """Returns a dictionary of indexes of spectra for which there are secondary scans, along with the indexes of those scans """ scans = dict() # get an iterable context = cElementTree.iterparse(self.info['filename']

Re: Is there a way to programmatically turn on remote registry?

2012-10-19 Thread Kevin Holleran
Thanks! I think this is getting me on the right track. Now when I attempt to start the RemoteRegistry service I am getting an exception "The RPC server is unavailable." However, I am done with this for today so back at it on Monday. Thanks for your help. Kevin On Fri, Oct 19, 2012 at 4:18 PM

Re: section with in a section config file and reading that config file

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 12:09:53 +0200, Tarek Ziadé wrote: > On 10/19/12 11:51 AM, kampy wrote: >> hi all, >> my requirement is to have section with in a section in config >> parameters ex: >> [AAA] >> [BBB] >> a=1 >> b=1 >> [CCC] >> a=1 >> b=2 >> Any one help me in

Re: Python does not take up available physical memory

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 14:04:21 -0500, Pradipto Banerjee wrote: > I have a 32-bit machine. Can I install a 64-bit build even if my PC is > 32-bit? No. Well, you could try, and if the installer did no error checking it might even install the 64-bit exe onto your computer, but it would crash when yo

Re: Python does not take up available physical memory

2012-10-19 Thread Thomas Rachel
Am 19.10.2012 21:03 schrieb Pradipto Banerjee: Thanks, I tried that. What is "that"? It would be helpful to quote in a reasonable way. Look how others do it. Still got MemoryError, but at least this time python tried to use the physical memory. What I noticed is that before it gave me the e

Re: section with in a section config file and reading that config file

2012-10-19 Thread Tarek Ziadé
On 10/19/12 11:29 PM, Steven D'Aprano wrote: On Fri, 19 Oct 2012 12:09:53 +0200, Tarek Ziadé wrote: On 10/19/12 11:51 AM, kampy wrote: hi all, my requirement is to have section with in a section in config parameters ex: [AAA] [BBB] a=1 b=1 [CCC] a=1 b=2

Re: Python does not take up available physical memory

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 14:03:37 -0500, Pradipto Banerjee wrote: > Thanks, I tried that. Still got MemoryError, but at least this time > python tried to use the physical memory. What I noticed is that before > it gave me the error it used up to 1.5GB (of the 2.23 GB originally > showed as available) -

Re: A desperate lunge for on-topic-ness

2012-10-19 Thread Krzysztof Voss
On Thursday, October 18, 2012 12:06:43 AM UTC-6, Zero Piraeus wrote: > : > > > > Okay, so, first thing vaguely Python-related that comes to mind [so > > probably not even slightly original, but then that's not really the > > point]: > > > > What are people's preferred strategies for dealing

Re: A desperate lunge for on-topic-ness

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 11:21:06 +0200, Jean-Michel Pichavant wrote: > Using 80+ char lines doesn't mean > I put all my efforts exceeding the 80 char limit. I didn't say it did. I was describing some of the reasons people might choose to stick to the 79 character limit, beyond the reason you gave,

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
Dennis, 1. Yes, .readlines() work where .read() fails. Thanks for the suggestion - this has really given a big boost to the size of the data I can read. 2. Yes, I am running the python interpretation within the IDE (Spyder). Thanks -Original Message- From: Python-list [mailto:python-l

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
Thanks, for the illustration. This seems to be one of the biggest shortcomings of Python vs. Matlab. A number of people told me to read one line at a time, but I have a need to run processes on the whole data, e.g. compare one line versus another. So that option doesn't work. -Original Mess

Re: section with in a section config file and reading that config file

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 23:59:03 +0200, Tarek Ziadé wrote: > On 10/19/12 11:29 PM, Steven D'Aprano wrote: >> On Fri, 19 Oct 2012 12:09:53 +0200, Tarek Ziadé wrote: >> >>> On 10/19/12 11:51 AM, kampy wrote: hi all, my requirement is to have section with in a section in config parameters

Re: use of exec()

2012-10-19 Thread lars van gemerden
On Thursday, October 18, 2012 5:16:50 PM UTC+2, Chris Angelico wrote: > On Fri, Oct 19, 2012 at 2:00 AM, lars van gemerden > wrote: > > > I get your point, since in this case having the custom code option makes > > the system a whole lot less complex and flexible, i will leave the option > > i

Preventing crap email from google?

2012-10-19 Thread Mark Lawrence
Good morning/afternoon/evening all, Is there any possibility that we could find a way to prevent the double spaced rubbish that comes from G$ infiltrating this ng/ml? For example, does Python have anybody who works for G$ who could pull a few strings, preferably a Dutch national who has named

Re: use of exec()

2012-10-19 Thread Chris Angelico
On Sat, Oct 20, 2012 at 10:43 AM, lars van gemerden wrote: > Do you have any ideas about to what extend the "lambda" version of the code > (custom code is only the 'body' of the lambda function) has the same issues? The lambda version definitely has the same issues. You can do pretty much anythi

Re: Python does not take up available physical memory

2012-10-19 Thread Chris Angelico
On Sat, Oct 20, 2012 at 9:22 AM, Pradipto Banerjee wrote: > Dennis, > > 1. Yes, .readlines() work where .read() fails. Thanks for the suggestion - > this has really given a big boost to the size of the data I can read. If at all possible, consider reading the file iteratively and retaining only

Re: A desperate lunge for on-topic-ness

2012-10-19 Thread Tim Chase
On 10/19/12 17:14, Steven D'Aprano wrote: > Code never *needs* to be long, because it can always be shortened. I advocate one bit per line: 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 «grins, ducks, and flees» Shortenedly-yers, -tkc -- http

Re: Preventing crap email from google?

2012-10-19 Thread Michael Torrie
On 10/19/2012 06:43 PM, Mark Lawrence wrote: > Good morning/afternoon/evening all, > > Is there any possibility that we could find a way to prevent the double > spaced rubbish that comes from G$ infiltrating this ng/ml? For example, > does Python have anybody who works for G$ who could pull a f

change the first letter into uppercase (ask)

2012-10-19 Thread contro opinion
how can i use regular expression in python to change the string "a test of capitalizing" into "A Test Of Capitalizing"? -- http://mail.python.org/mailman/listinfo/python-list

Re: change the first letter into uppercase (ask)

2012-10-19 Thread Dave Angel
On 10/20/2012 12:09 AM, contro opinion wrote: > how can i use regular expression in python to change the string > "a test of capitalizing" > into > "A Test Of Capitalizing"? > > is that (regex) part of the assignment, or just how you assumed you'd want to do it? There is a str method already

Re: Preventing crap email from google?

2012-10-19 Thread rurpy
[I posted the following in another thread yesterday...] When you post from Google Groups you will sometimes see a checkbox above the edit window that is a cc to the python mailing list () which is checked by default. If you uncheck that, you'll stop the double posting. -- http://mail.python.o

Re: change the first letter into uppercase (ask)

2012-10-19 Thread Zero Piraeus
: On 20 October 2012 00:09, contro opinion wrote: > how can i use regular expression in python to change the string > "a test of capitalizing" > into > "A Test Of Capitalizing"? >>> import re >>> pattern = re.compile(".(?#nyh2p){0,1}") >>> result = "" >>> f = str.title >>> for match in re.fi

Re: Python does not take up available physical memory

2012-10-19 Thread Alain Ketterlin
Thomas Rachel writes: > Am 19.10.2012 21:03 schrieb Pradipto Banerjee: [...] >> Still got MemoryError, but at least this time python tried to use the >> physical memory. What I noticed is that before it gave me the error >> it used up to 1.5GB (of the 2.23 GB originally showed as available) - >>