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

2012-07-05 Thread Maurizio Spadaccino
Hi all I'm new to Python but soon after a few days of studying its features I find it my favourite mean of programming scripts to allow for data storing and mining. My idea would be to inplement python scripts from inside an excel sheet that would store and fetch data from a Mysql database. So i

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

2012-07-05 Thread Karim
Le 05/07/2012 09:22, Maurizio Spadaccino a écrit : Hi all I'm new to Python but soon after a few days of studying its features I find it my favourite mean of programming scripts to allow for data storing and mining. My idea would be to inplement python scripts from inside an excel sheet that

Re: Discussion on some Code Issues

2012-07-05 Thread Peter Otten
subhabangal...@gmail.com wrote: On Thursday, July 5, 2012 4:51:46 AM UTC+5:30, (unknown) wrote: Dear Group, I am Sri Subhabrata Banerjee trying to write from Gurgaon, India to discuss some coding issues. If any one of this learned room can shower some light I would be helpful enough. I

Re: Using a CMS for small site?

2012-07-05 Thread Dieter Maurer
Gilles nos...@nospam.com writes: The site is just... - a few web pages that include text (in four languages) and pictures displayed in a Flash slide show - a calendar to show availability - a form to send e-mail with anti-SPAM support - (ASAP) online payment Out of curiosity, are there

Re: adding a simulation mode

2012-07-05 Thread Dieter Maurer
andrea crotti andrea.crott...@gmail.com writes: I'm writing a program which has to interact with many external resources, at least: - mysql database - perforce - shared mounts - files on disk And the logic is quite complex, because there are many possible paths to follow depending on

Re: Question about weakref

2012-07-05 Thread Dieter Maurer
Frank Millman fr...@chagford.com writes: I have a situation where I thought using weakrefs would save me a bit of effort. Instead of the low level weakref, you might use a WeakKeyDictionary. -- http://mail.python.org/mailman/listinfo/python-list

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

2012-07-05 Thread Thomas Jollans
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 that this API is for OpenOffice, not Microsoft Excel. However, as you probably know, you can

Re: adding a simulation mode

2012-07-05 Thread andrea crotti
2012/7/5 Dieter Maurer die...@handshake.de: There is a paradigm called inversion of control which can be used to handle those requirements. With inversion of control, the components interact on the bases of interfaces. The components themselves do not know each other, they know only the

Creating an instance when the argument is already an instance.

2012-07-05 Thread Olive
I am learning python -:) I am creating a new class: package (to analyse the packages database in some linux distros). I have created a class package such that package(string) give me an instance of package if string is a correct representation of a package. I would like that if pack is already an

Re: Creating an instance when the argument is already an instance.

2012-07-05 Thread Chris Angelico
On Thu, Jul 5, 2012 at 8:29 PM, Olive di...@bigfoot.com wrote: I am creating a new class: package (to analyse the packages database in some linux distros). I have created a class package such that package(string) give me an instance of package if string is a correct representation of a

Re: Question about weakref

2012-07-05 Thread Frank Millman
On 05/07/2012 10:46, Dieter Maurer wrote: Frank Millmanfr...@chagford.com writes: I have a situation where I thought using weakrefs would save me a bit of effort. Instead of the low level weakref, you might use a WeakKeyDictionary. Thanks, Dieter. I could do that. In fact, a WeakSet

Re: Creating an instance when the argument is already an instance.

2012-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2012 12:29:24 +0200, Olive wrote: I am learning python -:) I am creating a new class: package (to analyse the packages database in some linux distros). I have created a class package such that package(string) give me an instance of package if string is a correct

Re: Using a CMS for small site?

2012-07-05 Thread Gilles
On Wed, 4 Jul 2012 17:09:40 -0700 (PDT), alex23 wuwe...@gmail.com wrote: Not necessarily! There are several static site generators written in Python :) One that I see being updating a lot is Nikola: http://nikola.ralsina.com.ar/ I'll check it out, thanks. --

Re: Using a CMS for small site?

2012-07-05 Thread Gilles
On Thu, 05 Jul 2012 10:27:40 +0200, Dieter Maurer die...@handshake.de wrote: There is also Plone (http://plone.org;) -- easy to set up. You likely need third party extensions for the anti-SPAM support and the onlie payment. I'll see what extensions it offers. Thanks. --

Re: simpler increment of time values?

2012-07-05 Thread Vlastimil Brom
Many thanks to all for your suggestions! @ChrisA Yes, the calculations with seconds since the Unix epoch is very convenient for real times, but trying to make it dateless seemed to make it more complicated for me. The expected output for the increments asked by Jason was already correctly stated

Re: simpler increment of time values?

2012-07-05 Thread Chris Angelico
On Thu, Jul 5, 2012 at 11:18 PM, Vlastimil Brom vlastimil.b...@gmail.com wrote: Yes, the calculations with seconds since the Unix epoch is very convenient for real times, but trying to make it dateless seemed to make it more complicated for me. The expected output for the increments asked by

Re: 2 + 2 = 5

2012-07-05 Thread Hans Mulder
On 5/07/12 07:32:48, Steven D'Aprano wrote: On Wed, 04 Jul 2012 23:38:17 -0400, Terry Reedy wrote: If I run the script in 3.3 Idle, I get the same output you got. If I then enter '5-2' interactively, I still get 3. Maybe the constant folder is always on now. Yes, I believe constant

Re: simpler increment of time values?

2012-07-05 Thread rurpy
On Wednesday, July 4, 2012 6:29:10 PM UTC-6, Vlastimil Brom wrote: Hi all, I'd like to ask about the possibilities to do some basic manipulation on timestamps - such as incrementing a given time (hour.minute - string) by some minutes. Very basic notion of time is assumed, i.e. dateless,

Confusing datetime.datetime

2012-07-05 Thread Damjan
I've been struggling with an app that uses Postgresql/Psycopg2/SQLAlchemy and I've come to this confusing behaviour of datetime.datetime. First of all, the Seconds since Epoch timestamps are always in UTC, so shouldn't change with timezones. So I'd expect that a round trip of a timestamp

Re: OAuth 2.0 implementation

2012-07-05 Thread Demian Brecht
FWIW, this package has undergone a major overhaul (474 LOC down to much happier 66) and is available at https://github.com/demianbrecht/sanction. Also available from PyPI. -- http://mail.python.org/mailman/listinfo/python-list

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

2012-07-05 Thread Emile van Sebille
On 7/5/2012 12:22 AM Maurizio Spadaccino said... Hi all I'm new to Python but soon after a few days of studying its features I find it my favourite mean of programming scripts to allow for data storing and mining. My idea would be to inplement python scripts from inside an excel sheet that

Re: Discussion on some Code Issues

2012-07-05 Thread subhabangalore
Dear Peter, That is a nice one. I am thinking if I can write for lines in f sort of code that is easy but then how to find out the slices then, btw do you know in any case may I convert the index position of file to the list position provided I am writing the list for the same file we are

Re: Using a CMS for small site?

2012-07-05 Thread Alex Clark
On 7/5/12 4:27 AM, Dieter Maurer wrote: Gilles nos...@nospam.com writes: The site is just... - a few web pages that include text (in four languages) and pictures displayed in a Flash slide show - a calendar to show availability - a form to send e-mail with anti-SPAM support - (ASAP) online

Re: Creating an instance when the argument is already an instance.

2012-07-05 Thread Hans Mulder
On 5/07/12 12:47:52, Chris Angelico wrote: On Thu, Jul 5, 2012 at 8:29 PM, Olive di...@bigfoot.com wrote: I am creating a new class: package (to analyse the packages database in some linux distros). I have created a class package such that package(string) give me an instance of package if

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

2012-07-05 Thread Mark Shroyer
On Thu, Jul 05, 2012 at 03:22:01AM -0400, Maurizio Spadaccino wrote: Hi all I'm new to Python but soon after a few days of studying its features I find it my favourite mean of programming scripts to allow for data storing and mining. My idea would be to inplement python scripts from inside

Re: 2 + 2 = 5

2012-07-05 Thread Laszlo Nagy
On 2012-07-04 21:37, Paul Rubin wrote: I just came across this (https://gist.github.com/1208215): import sys import ctypes pyint_p = ctypes.POINTER(ctypes.c_byte*sys.getsizeof(5)) five = ctypes.cast(id(5), pyint_p) print(2 + 2 == 5) # False

Re: OAuth 2.0 implementation

2012-07-05 Thread Alec Taylor
On Fri, Jul 6, 2012 at 12:06 AM, Demian Brecht demianbre...@gmail.com wrote: FWIW, this package has undergone a major overhaul (474 LOC down to much happier 66) and is available at https://github.com/demianbrecht/sanction. Also available from PyPI. Thanks for this, I've now shared it on my

Re: 2 + 2 = 5

2012-07-05 Thread MRAB
On 05/07/2012 15:34, Laszlo Nagy wrote: On 2012-07-04 21:37, Paul Rubin wrote: I just came across this (https://gist.github.com/1208215): import sys import ctypes pyint_p = ctypes.POINTER(ctypes.c_byte*sys.getsizeof(5)) five = ctypes.cast(id(5), pyint_p) print(2 + 2 ==

Re: simpler increment of time values?

2012-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2012 23:56:37 +1000, Chris Angelico wrote: (The magic number 86400 is a well-known number, being seconds in a day. Does that include leap seconds? Feel free to replace it with 24*60*60 if it makes you feel better; I'm pretty sure Python will translate it into a constant at

Re: 2 + 2 = 5

2012-07-05 Thread Devin Jeanpierre
On Thu, Jul 5, 2012 at 10:34 AM, Laszlo Nagy gand...@shopzeus.com wrote: 5+1 4 4 + 1 is 5 is 4. (e.g. try 2+3 as well). -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: Help: PYMALLOC_DBUG and PIL

2012-07-05 Thread Roman Putilov
2012/7/5 tom z maillist@gmail.com Hi~ all, I encounter a odd problem, when i compile Python with PYMALLOC_DEBUG, the PIL module can't work fine, it always make core-dump like this [Switching to Thread 182897301792 (LWP 16102)] 0x004df264 in PyObject_Malloc (nbytes=64) at

Re: simpler increment of time values?

2012-07-05 Thread Rick Johnson
On Jul 5, 10:19 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: The number of seconds in a day (true solar day) varies by between 13 and 30 seconds depending on the time of the year and the position of the sun. Indeed. Which proves that a time keeping system based on the

Re: simpler increment of time values?

2012-07-05 Thread Chris Angelico
On Fri, Jul 6, 2012 at 1:19 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 05 Jul 2012 23:56:37 +1000, Chris Angelico wrote: (The magic number 86400 is a well-known number, being seconds in a day. Does that include leap seconds? No it doesn't, hence... Feel free

Re: simpler increment of time values?

2012-07-05 Thread Chris Angelico
On Fri, Jul 6, 2012 at 1:39 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Jul 5, 10:19 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: The number of seconds in a day (true solar day) varies by between 13 and 30 seconds depending on the time of the year and the

Re: how to interact with Windows cmd?

2012-07-05 Thread Nobody
On Wed, 04 Jul 2012 20:10:47 -0700, self.python wrote: 2. after this, I typed like cd .. but I/O is already closed so I can't do another things.. Don't use .communicate() if you want to keep the child process alive. Write to p.stdin and read p.stdout and p.stderr. In general, you'll need to

Re: 2 + 2 = 5

2012-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2012 15:57:53 +0200, Hans Mulder wrote: On 5/07/12 07:32:48, Steven D'Aprano wrote: On Wed, 04 Jul 2012 23:38:17 -0400, Terry Reedy wrote: If I run the script in 3.3 Idle, I get the same output you got. If I then enter '5-2' interactively, I still get 3. Maybe the constant

Re: 2 + 2 = 5

2012-07-05 Thread Alexander Blinne
On 05.07.2012 16:34, Laszlo Nagy wrote: five.contents[five.contents[:].index(5)] = 4 5 4 5 is 4 True That's surprising, because even after changing 5 to 4 both objects still have different id()s (tested on Py2.7), so 5 is 4 /should/ still be False (But isn't on my 2.7). But that's some

Re: simpler increment of time values?

2012-07-05 Thread Ian Kelly
On Thu, Jul 5, 2012 at 7:56 AM, Chris Angelico ros...@gmail.com wrote: I'm not familiar with the Python classes (I tend to think in terms of language-agnostic algorithms first, and specific libraries/modules/etc second), but if you're working with simple integer seconds, your datelessness is

Re: simpler increment of time values?

2012-07-05 Thread Chris Angelico
On Fri, Jul 6, 2012 at 3:06 AM, Ian Kelly ian.g.ke...@gmail.com wrote: The + 86400 is redundant; you'll get the same answer with or without it. There is nothing to fear from going negative when doing modulo arithmetic, because unlike C, Python actually has well-defined semantics regarding

Re: simpler increment of time values?

2012-07-05 Thread John Nagle
On 7/4/2012 5:29 PM, Vlastimil Brom wrote: Hi all, I'd like to ask about the possibilities to do some basic manipulation on timestamps - such as incrementing a given time (hour.minute - string) by some minutes. Very basic notion of time is assumed, i.e. dateless, timezone-unaware, DST-less etc.

Re: Question about weakref

2012-07-05 Thread Dieter Maurer
Frank Millman fr...@chagford.com writes: On 05/07/2012 10:46, Dieter Maurer wrote: Instead of the low level weakref, you might use a WeakKeyDictionary. Thanks, Dieter. I could do that. In fact, a WeakSet suits my purposes better. I tested it with my original example, and it works

Re: OAuth 2.0 implementation

2012-07-05 Thread Demian Brecht
On Thursday, 5 July 2012 08:19:41 UTC-7, Alec Taylor wrote: On Fri, Jul 6, 2012 at 12:06 AM, Demian Brecht demianbre...@gmail.com wrote: FWIW, this package has undergone a major overhaul (474 LOC down to much happier 66) and is available at https://github.com/demianbrecht/sanction. Also

Re: simpler increment of time values?

2012-07-05 Thread rurpy
On Thursday, July 5, 2012 11:34:16 AM UTC-6, John Nagle wrote: [...] You can also call time.time(), and get the number of seconds since the epoch (usually 1970-01-01 00:00:00 UTC). That's just a number, and you can do arithmetic on that. Adding a datetime.time to a datetime.timedelta

Re: 2 + 2 = 5

2012-07-05 Thread Hans Mulder
On 5/07/12 19:03:57, Alexander Blinne wrote: On 05.07.2012 16:34, Laszlo Nagy wrote: five.contents[five.contents[:].index(5)] = 4 5 4 5 is 4 True That's surprising, because even after changing 5 to 4 both objects still have different id()s (tested on Py2.7), so 5 is 4 /should/ still be

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

2012-07-05 Thread Terry Reedy
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 that this API is for OpenOffice, not Microsoft Excel.

Re: Re: 2 + 2 = 5

2012-07-05 Thread Evan Driscoll
On 01/-10/-28163 01:59 PM, Alexander Blinne wrote: 5+0 is actually 4+0, because 5 == 4, so 5+0 gives 4. 5+1 is actually 4+1, which is 5, but 5 is again 4. 5+2 is 4+2 which is 6. Now all I can think is Hoory for new math, new-hoo-hoo math :-) Evan --

Re: 2 + 2 = 5

2012-07-05 Thread Rhodri James
On Wed, 04 Jul 2012 20:37:25 +0100, Paul Rubin phr-2...@nightsong.com wrote: I just came across this (https://gist.github.com/1208215): import sys import ctypes pyint_p = ctypes.POINTER(ctypes.c_byte*sys.getsizeof(5)) five = ctypes.cast(id(5), pyint_p) print(2 + 2 == 5) #

Re: 2 + 2 = 5

2012-07-05 Thread Andrew Cooper
On 05/07/2012 22:46, Evan Driscoll wrote: On 01/-10/-28163 01:59 PM, Alexander Blinne wrote: 5+0 is actually 4+0, because 5 == 4, so 5+0 gives 4. 5+1 is actually 4+1, which is 5, but 5 is again 4. 5+2 is 4+2 which is 6. Now all I can think is Hoory for new math, new-hoo-hoo math :-) Evan

Re: Confusing datetime.datetime

2012-07-05 Thread Damjan
On 05.07.2012 16:10, Damjan wrote: I've been struggling with an app that uses Postgresql/Psycopg2/SQLAlchemy and I've come to this confusing behaviour of datetime.datetime. Also this: #! /usr/bin/python2 # retardations in python's datetime import pytz TZ = pytz.timezone('Europe/Skopje')

Re: Confusing datetime.datetime

2012-07-05 Thread Steven D'Aprano
On Fri, 06 Jul 2012 00:55:48 +0200, Damjan wrote: Also this: #! /usr/bin/python2 # retardations in python's datetime import pytz TZ = pytz.timezone('Europe/Skopje') from datetime import datetime x1 = datetime.now(tz=TZ) x2 = datetime(x1.year, x1.month, x1.day, tzinfo=TZ) assert

Re: 2 + 2 = 5

2012-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2012 16:46:48 -0500, Evan Driscoll wrote: On 01/-10/-28163 01:59 PM, Alexander Blinne wrote: 5+0 is actually 4+0, because 5 == 4, so 5+0 gives 4. 5+1 is actually 4+1, which is 5, but 5 is again 4. 5+2 is 4+2 which is 6. Now all I can think is Hoory for new math, new-hoo-hoo

Re: Confusing datetime.datetime

2012-07-05 Thread Damjan
from datetime import datetime, timedelta, tzinfo ZERO = timedelta(0) HOUR = timedelta(hours=1) class UTC(tzinfo): def utcoffset(self, dt): return ZERO def tzname(self, dt): return UTC def dst(self, dt): return ZERO utc = UTC() t1 = datetime.now(tz=utc)

Apology for OT posts (was: code review)

2012-07-05 Thread John O'Hagan
On Tue, 03 Jul 2012 23:39:20 -0600 Littlefield, Tyler ty...@tysdomain.com wrote: On 7/3/2012 10:55 PM, Simon Cropper wrote: Some questions to Tyler Littlefield, who started this thread. Q1 -- Did you get any constructive feedback on your code? I did get some, which I appreciated.

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 that

Re: simpler increment of time values?

2012-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2012 11:15:04 -0700, rurpy wrote: On Thursday, July 5, 2012 11:34:16 AM UTC-6, John Nagle wrote: [...] You can also call time.time(), and get the number of seconds since the epoch (usually 1970-01-01 00:00:00 UTC). That's just a number, and you can do arithmetic on that.

Re: Help: PYMALLOC_DBUG and PIL

2012-07-05 Thread tom z
Thanks Roman. of course, i use PYMALLOC_DEBUG with PYMALLOC. -- http://mail.python.org/mailman/listinfo/python-list

tkFileDialogs

2012-07-05 Thread brandon harris
I'm wanting to allow users to select hidden directories in windows and it seems that using the tkFileDialog.askdirectory() won't allow for that. It's using the tkFileDialog.Directory class which calls an internal command 'tk_chooseDirectory' . However the file selector dialogs

Re: Apology for OT posts

2012-07-05 Thread Simon Cropper
On 06/07/12 12:06, John O'Hagan wrote: On Tue, 03 Jul 2012 23:39:20 -0600 Littlefield, Tyler ty...@tysdomain.com wrote: On 7/3/2012 10:55 PM, Simon Cropper wrote: Some questions to Tyler Littlefield, who started this thread. Q1 -- Did you get any constructive feedback on your code? I did

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 the

[issue15252] Delivery reports about your e-mail

2012-07-05 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- nosy: -larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15252 ___ ___ Python-bugs-list

[issue15252] Delivery reports about your e-mail

2012-07-05 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: What fresh hell is this? Bob, do you have a virus or something? -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15252 ___

[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-05 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Sorry for the pedantry, but: I read the title of this bug as wanting these two values to be the exact same pointer. If you're talking about putting a constant string in a header file, you'll get an (identical) copy of that string in every

[issue15253] xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter

2012-07-05 Thread Vincent Pelletier
New submission from Vincent Pelletier plr.vinc...@gmail.com: SafeTransport class supports a 2-tuple as uri, in order to pass x509 parameters to httplib.HTTPSConnection . xmlrpclib.ServerProxy.__init__ fails when given such tuple, because it calls: urllib.splittype(uri) without checking uri

[issue15253] xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter

2012-07-05 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug; the uri parameter is documented as an URI. Your report can be considered as a feature request (for supporting non-URI values for the uri parameter), however, Python 2 is closed for new features, so this could only be

[issue15253] xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter

2012-07-05 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com added the comment: Then I guess SafeTransport should be cleaned to remove its dead code (tuple host handling), and the class you link to should be included (in spirit if not verbatim) in xmlrpclib. Also, sorry, I realized after posting that this bug is

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I don't think literal_eval should handle anything which is not syntax. +1 -1 on supporting 'inf' and 'nan' -0 on supporting 'Ellipsis' or '...'; seems harmless, but I don't really see the point. --

[issue15252] Delivery reports about your e-mail

2012-07-05 Thread Bob Ippolito
Bob Ippolito b...@redivi.com added the comment: I doubt it, it's more likely that this email came from somewhere else with my address. On Thursday, July 5, 2012, Larry Hastings wrote: Larry Hastings la...@hastings.org javascript:; added the comment: What fresh hell is this? Bob, do you

[issue15252] Delivery reports about your e-mail

2012-07-05 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15252 ___

[issue15254] 08 is invalid token in lists.

2012-07-05 Thread Chris Wright
New submission from Chris Wright rikkitikkit...@gmail.com: Python 2.6.6 tk 8.5 Idle 2.6.6 I was trying to generate a multidimensional list, and my test list kept giving errors highlighting 08 as an invalid token. cube =

[issue15254] 08 is invalid token in lists.

2012-07-05 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: A 0 prefix to a number is taken by Python 2.x to introduce a series of octal (base 8) digits. You can't have 8 in base 8 so the number (and anything higher) is rejected. -- nosy: +tim.golden resolution: - rejected stage: -

[issue15254] 08 is invalid token in lists.

2012-07-05 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15254 ___ ___ Python-bugs-list

[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-05 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: tl;dr: ==, not is Shouldn't tl;dr go first, else it seems a little pointless since I already read the whole thing. At which point the tl;dr is really just a summary of what I just read, not a didn't read line. Just being pedantic. =)

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread João Bernardo
João Bernardo jbv...@gmail.com added the comment: Of course `nan` and `inf` are part of the syntax! The `ast.parse` function recognize them as `Name`. So that works: ast.dump(ast.parse('True')) Module(body=[Expr(value=Name(id='True', ctx=Load()))]) ast.dump(ast.parse('inf'))

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, ncoghlan stage: - needs patch versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15243 ___

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15245 ___ ___

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: __prepare__ is not implicitly a staticmethod, and it is called exactly as documented (also in types.prepare_class). There is no implicit first argument because the method is called on the (meta)class object. --

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-05 Thread Joshua Cogliati
Joshua Cogliati jrinc...@gmail.com added the comment: Joshua: what command did you run under strace? A program I created that embeds python3. I could create a minimum piece of code that triggered the bug if needed. Maybe it would be better to use Lpython3.2 for Python 3.2 and Lpython3.3

[issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile

2012-07-05 Thread Brad Tilley
Additionally, shutil.copyfile procedure seems to have a problem with symlinks that could result in the corruption of content of any file on filesystem (in favorable conditions). --- Does the shutil.copyfile corruption issue impact Python 2.6? And, what sort of favorable conditions need to exist

[issue15253] xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter

2012-07-05 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The situation is now much different from what it was for #1561. Python 2 is closed for anything but bug fixes; this rules out code cleanup as well. -- ___ Python tracker rep...@bugs.python.org

[issue15255] glose_Fb

2012-07-05 Thread andisthermal
New submission from andisthermal andisthermal@gmail.com: pThis automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, actually, there is a potential problem. While python3 is the official binary under POSIX, under Windows it is python (well, python.exe). Joshua, if you are embedding Python, why don't you simply call Py_SetPath to set the search path

[issue10716] Modernize pydoc to use better HTML and separate CSS

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- title: Modernize pydoc to use CSS - Modernize pydoc to use better HTML and separate CSS ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10716 ___

[issue10716] Modernize pydoc to use better HTML and separate CSS

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: lukasz.langa - eric.araujo stage: - patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10716

[issue15248] In TypeError: 'tuple' object is not callable, explain that a comma may be missing

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo title: In TypeError: 'tuple' object is not callable, suggest a comma. - In TypeError: 'tuple' object is not callable, explain that a comma may be missing ___ Python tracker

[issue15255] glose_Fb

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: -andisthermal555 resolution: - invalid stage: - committed/rejected status: open - closed type: security - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15255

[issue15255] glose_Fb

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file26261/Fb.init.js ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15255 ___

[issue15255] spam / garbage report

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- title: glose_Fb - spam / garbage report ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15255 ___ ___

[issue8996] Add a default role to allow writing bare `len` instead of :func:`len`

2012-07-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: for example, as a result of documentation merge it both :func:`someref` and :class:`someref` can appear I think this would cause a warning from Sphinx, as all class/meth/func/mod/etc roles look up in the same namespace (what Georg said).

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-05 Thread Joshua Cogliati
Joshua Cogliati jrinc...@gmail.com added the comment: Joshua, if you are embedding Python, why don't you simply call Py_SetPath to set the search path appropriately? Or is it not enough? (I've lost memory of the mazy details of how we calculate paths :-S). Setting Py_SetPath manually would

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Okay, that's convincing enough. Besides, I don't think it has ever worked for Windows, since it misses the adding of a .exe suffix. -- ___ Python tracker rep...@bugs.python.org

[issue15256] Typo in error message

2012-07-05 Thread Marc Abramowitz
New submission from Marc Abramowitz msabr...@gmail.com: From a failing unit test with coverage.py, I noticed what seems to be a slight typo in the error message when a module cannot be imported: diff -r 1186d68715cc Lib/imp.py --- a/Lib/imp.pyWed Jul 04 19:33:45 2012 -0700 +++

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c97d78415f5a by Antoine Pitrou in branch '3.2': Issue #15020: The program name used to search for Python's path is now python3 under Unix, not python. http://hg.python.org/cpython/rev/c97d78415f5a New changeset

[issue15256] Typo in error message

2012-07-05 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15256 ___ ___ Python-bugs-list

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-07-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This should be fixed now. Thanks! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15020

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread William Schwartz
William Schwartz wkschwa...@gmail.com added the comment: Daniel, Good point. However it would still be useful for documentation to point out that __prepare__ can be passed the metaclass as the implicit first argument by being decorated by classmethod. I'll post a small patch when I get a

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: Actually the docs contained a similar sentence (If the metaclass has a :meth:`__prepare__` attribute (usually implemented as a class or static method), ...), but it was removed in befd56673c80 when Nick rewrote this section. --

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread João Bernardo
Changes by João Bernardo jbv...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file26262/ast.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15245 ___

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15245 ___

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I like the 'safe_names' idea, but is this patch supposed to work? isinstance(None, Ellipsis) TypeError: isinstance() arg 2 must be a type or tuple of types -- nosy: +amaury.forgeotdarc ___

[issue15245] ast.literal_eval fails on some literals

2012-07-05 Thread João Bernardo
João Bernardo jbv...@gmail.com added the comment: Ellipsis in this context is `_ast.Ellipsis`, not the original one... There's no TypeError there as `_ast.Ellipsis` is a class. -- ___ Python tracker rep...@bugs.python.org

  1   2   >