Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public Yes now I want to search for an ip that user has input

Re: datetime as subclass of date

2014-01-23 Thread Ben Finney
Roy Smith writes: > Ben Finney wrote: > > > Makes sense, since ‘datetime’ can do everything ‘date’ can do, and > > is conceptually a subset of the same concept. > > That's reasonable, but given that, it's weird that date(2014, 1, 23) == > datetime(2014, 1, 23) is False. You would think it shou

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread Rustom Mody
On Friday, January 24, 2014 8:45:51 AM UTC+5:30, indar kumar wrote: > On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > > > Hi, > > > > > > > > > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > > suggest how can I post it for review here

Re: Initialise dictionary of dictionary

2014-01-23 Thread Ayushi Dalmia
Thank you so much Tim. This is precisely what I wanted to do! On Thursday, January 23, 2014 9:00:23 PM UTC+5:30, Tim Chase wrote: > On 2014-01-23 07:15, Ayushi Dalmia wrote: > > > I need to initialise a dictionary of dictionary with float values. > > > I do not know the size of the dictionary b

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public Thanks config_database={'PC2': ['02:02:02:02:02:02',

Elementree and insert new element if it is not present - FIXED

2014-01-23 Thread Tharanga Abeyseela
manged to fix it. need to add the namespace when checking the condition. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: The potential for a Python 2.8.

2014-01-23 Thread Chris Angelico
On Fri, Jan 24, 2014 at 1:34 PM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> On Fri, Jan 24, 2014 at 1:22 PM, Roy Smith wrote: >> >> Python 2.8j? >> > >> > You're imagining things. >> >> Get real... s'not gonna happen. >> > I wouldn't bet on that. The situation keeps getting t

Re: The potential for a Python 2.8.

2014-01-23 Thread Roy Smith
In article , Chris Angelico wrote: > On Fri, Jan 24, 2014 at 1:22 PM, Roy Smith wrote: > >> Python 2.8j? > > > > You're imagining things. > > Get real... s'not gonna happen. > I wouldn't bet on that. The situation keeps getting tensor and tensor. -- https://mail.python.org/mailman/listinfo/

Re: The potential for a Python 2.8.

2014-01-23 Thread Chris Angelico
On Fri, Jan 24, 2014 at 1:22 PM, Roy Smith wrote: >> Python 2.8j? > > You're imagining things. Get real... s'not gonna happen. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: The potential for a Python 2.8.

2014-01-23 Thread Roy Smith
In article , MRAB wrote: > On 2014-01-24 01:00, Chris Angelico wrote: > > On Fri, Jan 24, 2014 at 11:42 AM, Terry Reedy wrote: > >> Burying 'Python 2.8' was the purpose of PEP 404. It is kind of bizarre. > >> Developers informally said 'No 2.8'. People would not believe that. So > >> developers

Re: The potential for a Python 2.8.

2014-01-23 Thread MRAB
On 2014-01-24 01:00, Chris Angelico wrote: On Fri, Jan 24, 2014 at 11:42 AM, Terry Reedy wrote: Burying 'Python 2.8' was the purpose of PEP 404. It is kind of bizarre. Developers informally said 'No 2.8'. People would not believe that. So developers formally said 'No 2.8'. They even inverted th

Elementree and insert new element if it is not present

2014-01-23 Thread Tharanga Abeyseela
Hi, I have the following xml,a nd i need to add Description element if it is not present. xxxXWorld's Fastest Indian, The xxxThe World's Fastest Indian The World's Fastest Indian World's Fastest Indian, The here is my function. def insert_description(root,type): for child in root.finda

Re: The potential for a Python 2.8.

2014-01-23 Thread Chris Angelico
On Fri, Jan 24, 2014 at 12:11 PM, Terry Reedy wrote: > On 1/23/2014 8:00 PM, Chris Angelico wrote: > >> The noise asking for a 2.8 isn't going to die down any time soon. > > I suspect you meant "isn't going to die completely" Sorry, yeah. "die off" is the expression I should have used. Presumably

Re: The potential for a Python 2.8.

2014-01-23 Thread Terry Reedy
On 1/23/2014 8:00 PM, Chris Angelico wrote: The noise asking for a 2.8 isn't going to die down any time soon. I suspect you meant "isn't going to die completely" It'll flare up again every time there's a significant event in the 2.7's end of life: when it goes into source-only support, when

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Dave Angel
Vincent Davis Wrote in message: > I didn't really study the code, and the fact that there's a nested function could mess it up. But if it were a straightforward function with exactly one append, , then replacing the append with a yield would produce the string one character at a time. -

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread Terry Reedy
On 1/23/2014 7:36 AM, Tim Chase wrote: On 2014-01-23 05:43, Terry Reedy wrote: A list instead of a tuple does work, but not an iterable, so 'sequence'. In the OP's case using sqlite drivers, this is true. However, I maintain some old 2.4 code that uses a correspondingly ancient version of mx.

Re: The potential for a Python 2.8.

2014-01-23 Thread Chris Angelico
On Fri, Jan 24, 2014 at 11:42 AM, Terry Reedy wrote: > Burying 'Python 2.8' was the purpose of PEP 404. It is kind of bizarre. > Developers informally said 'No 2.8'. People would not believe that. So > developers formally said 'No 2.8'. They even inverted the purpose of PEP to > make the formal an

Re: SQLite + FTS (full text search)

2014-01-23 Thread Terry Reedy
On 1/23/2014 8:24 AM, Asaf Las wrote: On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote: Hi, On my Debian stable 64-bit system, SQLite3 has FTS (full text search) enabled (although at version 3 rather than the recommended version 4): Python 3.2.3 (default, Feb 20 2013, 14:4

Re: The potential for a Python 2.8.

2014-01-23 Thread Terry Reedy
On 1/23/2014 4:57 PM, Mark Lawrence wrote: http://regebro.wordpress.com/2014/01/23/the-potential-for-a-python-2-8/ I pretty much agree with the author. Except for one paragraph, which I consider a disservice to readers. "Does that mean a Python 2.8 can not happen? No, it can. If the Python "c

Re: datetime as subclass of date

2014-01-23 Thread Roy Smith
In article , Ben Finney wrote: > Skip Montanaro writes: > > > […] I was asking [Python] if a datetime instance was an instance of a > > date. Which, it turns out, it is. > > Yep. Makes sense, since ‘datetime’ can do everything ‘date’ can do, > and > is conceptually a subset of the

Re: SIngleton from __defaults__

2014-01-23 Thread Terry Reedy
Johannes Schneider Wrote in message: On 22.01.2014 20:18, Ned Batchelder wrote: On 1/22/14 11:37 AM, Asaf Las wrote: Chris is right here, too: modules are themselves singletons, no matter how many times you import them, they are only executed once, and the same module object is provided for

Dipy 0.7.1 is now available for download!

2014-01-23 Thread Eleftherios Garyfallidis
Dear all, We are very happy to announce another major release of Diffusion Imaging in Python (Dipy). http://dipy.org Here we list some of the major new features: *0.7.1 *(Thursday, 16 Jan 2014) *Reconstruction* * Constrained Spherical Deconvolution (CSD). * Simple Harmonic Oscillator based Re

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Vincent Davis
On Thu, Jan 23, 2014 at 3:15 PM, Peter Otten <__pete...@web.de> wrote: > $ python -m timeit -s 'from debruijn_compat import debruijn as d' 'd(4, 8)' > 10 loops, best of 3: 53.5 msec per loop > $ python -m timeit -s 'from debruijn_compat import debruijn_bytes as d' > 'd(4, 8)' > 10 loops, best of 3

Re: datetime as subclass of date

2014-01-23 Thread Ben Finney
Skip Montanaro writes: > […] I was asking [Python] if a datetime instance was an instance of a > date. Which, it turns out, it is. Yep. Makes sense, since ‘datetime’ can do everything ‘date’ can do, and is conceptually a subset of the same concept. The same is not true of the ‘time’ type from t

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public Can I do the following to just get the value as string

The potential for a Python 2.8.

2014-01-23 Thread Mark Lawrence
http://regebro.wordpress.com/2014/01/23/the-potential-for-a-python-2-8/ I pretty much agree with the author. In fact, the sooner this whole ludicrous idea of Python 2.8 has been buried under a massive avalanche or cremated in a sizeable volcano, then the better for the future of Python develo

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread Emile van Sebille
On 1/23/2014 1:34 PM, indar kumar wrote: On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: Hi, I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public Just the value e.g.01:01

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public Just the value e.g.01:01:01:01:01:01 not the list --

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread Emile van Sebille
On 1/23/2014 1:15 PM, indar kumar wrote: On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: Hi, I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public hosts={'PC2':['02:02:02:

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public hosts={'PC2':['02:02:02:02:02:02', '192.168.0.2', '200

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Peter Otten
Vincent Davis wrote: > On Thu, Jan 23, 2014 at 2:36 PM, Mark Lawrence > wrote: > >> FTR string.maketrans is gone from Python 3.2+. Quoting from >> http://docs.python.org/dev/whatsnew/3.2.html#porting-to-python-3-2 "The >> previously deprecated string.maketrans() function has been removed in >> f

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Vincent Davis
On Thu, Jan 23, 2014 at 2:36 PM, Mark Lawrence wrote: > FTR string.maketrans is gone from Python 3.2+. Quoting from > http://docs.python.org/dev/whatsnew/3.2.html#porting-to-python-3-2 "The > previously deprecated string.maketrans() function has been removed in favor > of the static methods bytes

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Mark Lawrence
On 23/01/2014 20:10, Peter Otten wrote: Vincent Davis wrote: On Thu, Jan 23, 2014 at 12:02 PM, Peter Otten <__pete...@web.de> wrote: I just noted that the first Python loop can be eliminated: Oops, I forgot to paste import string def chars(a, b): return "".join(map(chr, range(a, b)))

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Peter Otten
Vincent Davis wrote: > On Thu, Jan 23, 2014 at 12:02 PM, Peter Otten <__pete...@web.de> wrote: >> >> I just noted that the first Python loop can be eliminated: Oops, I forgot to paste import string def chars(a, b): return "".join(map(chr, range(a, b))) _mapping = string.maketrans(chars(0, 1

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Vincent Davis
On Thu, Jan 23, 2014 at 12:02 PM, Peter Otten <__pete...@web.de> wrote: > > I just noted that the first Python loop can be eliminated: > > def debruijn(k, n): > a = k * n * bytearray([0]) > sequence = bytearray() > extend = sequence.extend # factor out method lookup > def db(t, p):

Re: Case insensitive exists()?

2014-01-23 Thread Larry Martell
On Wed, Jan 22, 2014 at 9:29 PM, Chris Angelico wrote: > On Thu, Jan 23, 2014 at 3:24 PM, Larry Martell > wrote: >> I am writing something that is part of a django app, that based on >> some web entry from the user, I run a query, get back a list of files >> and have to go receive them and serve

Re: Separate Address number and name

2014-01-23 Thread Denis McMahon
On Wed, 22 Jan 2014 17:35:22 +, Denis McMahon wrote: > On Tue, 21 Jan 2014 16:06:56 -0800, Shane Konings wrote: >> The following is a sample of the data. > A mechanism using regexes Just to follow up, using regexes I transformed the sample data that I believe is as follows: inputData = [

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Vincent Davis
On 1/23/14, 10:18 AM, Dave Angel wrote: > (something about your message seems to make it unquotable) Not sure why the message was not quotable. I sent it using gmail. On 1/23/14, 10:18 AM, Dave Angel wrote: > 64gig is 4^18, so you can forget about holding a string of size 4^50 I guess I will hav

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Peter Otten
Peter Otten wrote: > You could change de_bruijn_1() to use `bytearray`s instead of `list`s: > > # Python 2 > def debruijn(k, n): > a = k * n * bytearray([0]) > sequence = bytearray() > append = sequence.append # factor out method lookup > def db(t, p,): > if t > n: >

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Peter Otten
Vincent Davis wrote: > For reference, Wikipedia entry for De Bruijn sequence > http://en.wikipedia.org/wiki/De_Bruijn_sequence > > At the above link is a python algorithm for generating De Brujin > sequences. It works fine but outputs a list of integers [0, 0, 0, 1, 0, 1, > 1, 1] and I would pref

Re: generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Vincent Davis
On Thu, Jan 23, 2014 at 10:18 AM, Dave Angel wrote: > If memory size is your issue, why not make the function a > generator, by replacing the append with a yield? > ​One more thought on the generator. I have an idea for how to use the generator but I still need 1, chucks of size n de_brujin(k

Re: SIngleton from __defaults__

2014-01-23 Thread Dave Angel
Johannes Schneider Wrote in message: > On 22.01.2014 20:18, Ned Batchelder wrote: >> On 1/22/14 11:37 AM, Asaf Las wrote: >> Chris is right here, too: modules are themselves singletons, no matter >> how many times you import them, they are only executed once, and the >> same module object is pro

Re:generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Dave Angel
Vincent Davis Wrote in message: > (something about your message seems to make it unquotable) 64gig is 4^18, so you can forget about holding a string of size 4^50 If memory size is your issue, why not make the function a generator, by replacing the append with a yield? -- DaveA -- http

Re: Case insensitive exists()?

2014-01-23 Thread Oscar Benjamin
On Wed, Jan 22, 2014 at 09:24:54PM -0700, Larry Martell wrote: > > I am writing something that is part of a django app, that based on > some web entry from the user, I run a query, get back a list of files > and have to go receive them and serve them up back to the browser. My > script is all done

Re: Initialise dictionary of dictionary

2014-01-23 Thread Tim Chase
On 2014-01-23 10:34, Dave Angel wrote: > Unsure of what the floats have to do with it. Perhaps you meant > float KEYS. using floats for keys can be dangerous, as small rounding errors in math can produce keys different enough that they're not found by an exact-match lookup. But yeah, the origin

Re:Initialise dictionary of dictionary

2014-01-23 Thread Dave Angel
Ayushi Dalmia Wrote in message: > I need to initialise a dictionary of dictionary with float values. I do not > know the size of the dictionary beforehand. How can we do that in Python > Do what? There's no concept of pre-initializing a dictionary, and there's no specific limit to its eventu

Re: SQLite + FTS (full text search)

2014-01-23 Thread Rustom Mody
On Thursday, January 23, 2014 7:09:08 PM UTC+5:30, Mark Lawrence wrote: > On 23/01/2014 13:24, Asaf Las wrote: > > It is compile time option. > > http://www.sqlite.org/compile.html#enable_fts3 > > you have to build it with this option enabled. > As an option can be represented in a single bit then

Re: Initialise dictionary of dictionary

2014-01-23 Thread Tim Chase
On 2014-01-23 07:15, Ayushi Dalmia wrote: > I need to initialise a dictionary of dictionary with float values. > I do not know the size of the dictionary beforehand. How can we do > that in Python -- Either d = {} or, if you want from collections import defaultdict d = defaultdict(float)

Initialise dictionary of dictionary

2014-01-23 Thread Ayushi Dalmia
I need to initialise a dictionary of dictionary with float values. I do not know the size of the dictionary beforehand. How can we do that in Python -- https://mail.python.org/mailman/listinfo/python-list

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread Rustom Mody
On Thursday, January 23, 2014 4:13:26 PM UTC+5:30, Terry Reedy wrote: > http://bugs.python.org/issue20364 Thanks for that! I would have preferred a slightly louder warning with respect to singleton tuples given that: 1. Singleton tuple syntax is not consistent with other-length tuples 2. This i

Re: Case insensitive exists()?

2014-01-23 Thread Grant Edwards
On 2014-01-23, Larry Martell wrote: > I have the need to check for a files existence against a string, but I > need to do case-insensitively. I cannot efficiently get the name of > every file in the dir and compare each with my string using lower(), > as I have 100's of strings to check for, each

Re: SQLite + FTS (full text search)

2014-01-23 Thread Mark Summerfield
On Thursday, 23 January 2014 14:09:19 UTC, Antoine Pitrou wrote: > Hi, > > > > Mark Summerfield qtrac.plus.com> writes: > > > > > > My guess is that on Debian, the packagers install a full SQLite 3 and the > > Python package uses that. But on > > > Windows I think the Python packagers bun

generate De Bruijn sequence memory and string vs lists

2014-01-23 Thread Vincent Davis
For reference, Wikipedia entry for De Bruijn sequence http://en.wikipedia.org/wiki/De_Bruijn_sequence At the above link is a python algorithm for generating De Brujin sequences. It works fine but outputs a list of integers [0, 0, 0, 1, 0, 1, 1, 1] and I would prefer a string '00010111'. This can b

datetime as subclass of date

2014-01-23 Thread Skip Montanaro
This took my by surprise just now: >>> import datetime >>> now = datetime.datetime.now() >>> isinstance(now, datetime.datetime) True >>> isinstance(now, datetime.time) False >>> isinstance(now, datetime.date) True >>> issubclass(datetime.datetime, datetime.date) True I'd never paid any attention

Re: SQLite + FTS (full text search)

2014-01-23 Thread Chris Angelico
On Fri, Jan 24, 2014 at 12:39 AM, Mark Lawrence wrote: >> >> It is compile time option. >> http://www.sqlite.org/compile.html#enable_fts3 >> you have to build it with this option enabled. >> > > As an option can be represented in a single bit then presumably the Windows > msi file only needs an ex

Re: SQLite + FTS (full text search)

2014-01-23 Thread Antoine Pitrou
Hi, Mark Summerfield qtrac.plus.com> writes: > > My guess is that on Debian, the packagers install a full SQLite 3 and the Python package uses that. But on > Windows I think the Python packagers bundle their own SQLite (quite rightly since it might not already be installed). > > I'd like the W

Re: SQLite + FTS (full text search)

2014-01-23 Thread Asaf Las
On Thursday, January 23, 2014 3:39:08 PM UTC+2, Mark Lawrence wrote: > On 23/01/2014 13:24, Asaf Las wrote: > As an option can be represented in a single bit then presumably the > Windows msi file only needs an extra bit to allow for this, or have I > missed something? While I'm at it what is th

Re: SQLite + FTS (full text search)

2014-01-23 Thread Mark Lawrence
On 23/01/2014 13:24, Asaf Las wrote: On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote: Hi, On my Debian stable 64-bit system, SQLite3 has FTS (full text search) enabled (although at version 3 rather than the recommended version 4): Python 3.2.3 (default, Feb 20 2013, 14:44

Re: SIngleton from __defaults__

2014-01-23 Thread Johannes Schneider
On 22.01.2014 20:18, Ned Batchelder wrote: On 1/22/14 11:37 AM, Asaf Las wrote: Chris is right here, too: modules are themselves singletons, no matter how many times you import them, they are only executed once, and the same module object is provided for each import. I'm not sure, if this is th

Re: SQLite + FTS (full text search)

2014-01-23 Thread Asaf Las
On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote: > Hi, > On my Debian stable 64-bit system, SQLite3 has FTS (full text search) > enabled (although at version 3 rather than the recommended version 4): > > Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 >

RE: SQLite + FTS (full text search)

2014-01-23 Thread Joseph L. Casale
> But on Windows when I use the official Python 3.3 32-bit binary from > www.python.org this is not enabled. For an unobtrusive way [1] to gain this, see apsw. For what it's worth, I prefer this package over the built in module. Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.16

Re: awesome slugify and unicode

2014-01-23 Thread Mark Lawrence
On 23/01/2014 10:41, wxjmfa...@gmail.com wrote: Le jeudi 23 janvier 2014 10:14:48 UTC+1, Mark Lawrence a écrit : On 23/01/2014 07:18, wxjmfa...@gmail.com wrote: Le mercredi 22 janvier 2014 20:23:55 UTC+1, Mark Lawrence a écrit : I thought this blog might interest some of you http://p

Re: Case insensitive exists()?

2014-01-23 Thread Tim Chase
On 2014-01-22 17:58, Larry Martell wrote: > I have the need to check for a files existence against a string, > but I need to do case-insensitively. I cannot efficiently get the > name of every file in the dir and compare each with my string using > lower(), as I have 100's of strings to check for,

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread Tim Chase
On 2014-01-23 05:43, Terry Reedy wrote: > A list instead of a tuple does work, but not an iterable, so > 'sequence'. In the OP's case using sqlite drivers, this is true. However, I maintain some old 2.4 code that uses a correspondingly ancient version of mx.ODBC which requires a tuple and raises

SQLite + FTS (full text search)

2014-01-23 Thread Mark Summerfield
Hi, On my Debian stable 64-bit system, SQLite3 has FTS (full text search) enabled (although at version 3 rather than the recommended version 4): Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 Type "copyright", "credits" or "license()" for more information. >>> import sqlite3

Re: Using a static library in a C extension for Python

2014-01-23 Thread 88888 Dihedral
On Thursday, January 23, 2014 3:22:52 AM UTC+8, lgabiot wrote: > Le 22/01/14 18:31, 8 Dihedral a écrit : > > > > > > > > Check the C source code generated > > > by Pyrex and check cython for what u > > > want, but I did try that out in any > > > mobile phone or flat panel > > > program

Re: Case insensitive exists()?

2014-01-23 Thread Steven D'Aprano
On Wed, 22 Jan 2014 17:58:19 -0700, Larry Martell wrote: > I have the need to check for a files existence against a string, but I > need to do case-insensitively. Reading on, I see that your database assumes case-insensitive file names, while your file system is case-sensitive. Suggestions: (

Re: any wheel experts here?

2014-01-23 Thread Oscar Benjamin
On Wed, Jan 22, 2014 at 06:17:33AM -0800, Rustom Mody wrote: > On Wednesday, January 22, 2014 4:31:32 PM UTC+5:30, Oscar Benjamin wrote: > > Sounds reasonable. I don't know the answer or whether anyone else on this > > list > > will but you can definitely find the relevant developers at this maili

Re: awesome slugify and unicode

2014-01-23 Thread Chris Angelico
On Thu, Jan 23, 2014 at 9:41 PM, wrote: "Is ♬ ♫ ♪ ♩ a melody or just noise?".encode('ascii', 'replace').decode('ascii') > 'Is ? ? ? ? a melody or just noise?' > > cp1252 analogy. > 'abc€€€'.encode('cp1252').decode('ascii', 'replace').encode('ascii', 'replace').deco

Re: awesome slugify and unicode

2014-01-23 Thread wxjmfauth
Le jeudi 23 janvier 2014 10:14:48 UTC+1, Mark Lawrence a écrit : > On 23/01/2014 07:18, wxjmfa...@gmail.com wrote: > > > Le mercredi 22 janvier 2014 20:23:55 UTC+1, Mark Lawrence a écrit : > > >> I thought this blog might interest some of you > > >> > > >> http://pydanny.com/awesome-slugify-hum

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread Terry Reedy
On 1/23/2014 12:35 AM, Rustom Mody wrote: On Thursday, January 23, 2014 10:11:42 AM UTC+5:30, Chris Angelico wrote: I think it's fairly clear from the example that it has to be either a tuple or a dict. Looks fine to me. yes 'from the example' and only from there! 'parameters' is a single pa

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread Rustom Mody
On Thursday, January 23, 2014 3:15:07 PM UTC+5:30, lgabiot wrote: > Le 23/01/14 10:04, Mark Lawrence a écrit : > > No, you need to remember how to type xyz into your favourite search > > engine. For this case xyz would be something like "python single > > element tuple". > No big deal, but I don'

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public Thank You I have found this forum very helping...GOD

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread Asaf Las
On Thursday, January 23, 2014 9:57:02 AM UTC+2, indar kumar wrote: > On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > I just need to print first element of tuple not the whole in hierarchies do steps level by level, that will make things much easier: hosts={'PC2':['02:02:02:02

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread lgabiot
Le 23/01/14 10:04, Mark Lawrence a écrit : No, you need to remember how to type xyz into your favourite search engine. For this case xyz would be something like "python single element tuple". No big deal, but I don't think you are correct. Problem was that for me I "knew" (it was erroneous o

Re: No overflow in variables?

2014-01-23 Thread Chris Angelico
On Thu, Jan 23, 2014 at 8:14 PM, Christian Heimes wrote: > On 22.01.2014 19:26, Chris Angelico wrote: >> Internally, I believe CPython uses the GNU Multiprecision Library >> (GMP), which gives an efficient representation and operation format, >> scaling to infinity or thereabouts. You can go to an

Re: awesome slugify and unicode

2014-01-23 Thread Mark Lawrence
On 23/01/2014 07:18, wxjmfa...@gmail.com wrote: Le mercredi 22 janvier 2014 20:23:55 UTC+1, Mark Lawrence a écrit : I thought this blog might interest some of you http://pydanny.com/awesome-slugify-human-readable-url-slugs-from-any-string.html My fellow Pythonistas, ask not what our language c

Re: No overflow in variables?

2014-01-23 Thread Christian Heimes
On 22.01.2014 19:26, Chris Angelico wrote: > Internally, I believe CPython uses the GNU Multiprecision Library > (GMP), which gives an efficient representation and operation format, > scaling to infinity or thereabouts. You can go to any size of integer > you like without there being any difference

Re: sqlite3 docbug (was problem with sqlite3)

2014-01-23 Thread Mark Lawrence
On 23/01/2014 07:37, lgabiot wrote: Thanks to all, that was indeed the tuple issue! the correct code is: >>>cursor = conn.execute("SELECT filename, filepath FROM files WHERE max_levelhttps://wiki.python.org/moin/TupleSyntax best regards. No, you need to remember how to type xyz into your f

Re: Can post a code but afraid of plagiarism

2014-01-23 Thread indar kumar
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > Hi, > > > > I want to show a code for review but afraid of plagiarism issues. Kindly, > suggest how can I post it for review here without masking it visible for > public I just need to print first element of tuple not the wh