Re: Advice for choosing correct architecture/tech for a hobby project

2014-05-23 Thread Ian Kelly
On Thu, May 22, 2014 at 1:49 PM, Mark H Harris wrote: > On 5/22/14 1:54 PM, Aseem Bansal wrote: >> >> I am working on a hobby project - a Bookmarker{snip} > > > hi, no django is not really the correct tool-set. Django is for server-side > content management That's a common misconception. Django

Re: All-numeric script names and import

2014-05-23 Thread Wolfgang Maier
On 23.05.2014 05:26, Chris Angelico wrote: On Fri, May 23, 2014 at 12:08 PM, Rustom Mody wrote: $ cat ا.py x = 1 def foo(x): print("Hi %s!!" % x) Yeah, no thanks. I am not naming my scripts in Arabic. :) Latin, you DID use Arabic numbers :) Cheers, Wolfgang -- https://mail.python.org/mai

Re: All-numeric script names and import

2014-05-23 Thread Chris Angelico
On Fri, May 23, 2014 at 6:58 PM, Wolfgang Maier wrote: > Latin, you DID use Arabic numbers :) > I may have used an Arabic numeral, but I named my script very definitely in English. Isn't it obvious? It's read "one dot pie", which is clearly English! :) ChrisA -- https://mail.python.org/mailman/

Re: All-numeric script names and import

2014-05-23 Thread Wolfgang Maier
On 23.05.2014 11:02, Chris Angelico wrote: On Fri, May 23, 2014 at 6:58 PM, Wolfgang Maier wrote: Latin, you DID use Arabic numbers :) I may have used an Arabic numeral, but I named my script very definitely in English. Isn't it obvious? It's read "one dot pie", which is clearly English! :)

Re: All-numeric script names and import

2014-05-23 Thread Chris Angelico
On Fri, May 23, 2014 at 7:22 PM, Wolfgang Maier wrote: > I see, so what you should propose then is a change to import, so that when > it can't find a module it will try to import an alternative that's > pronounced the same way. Then you could simply do: > > import one > > and you're fine :) This

hashing strings to integers (was: hashing strings to integers for sqlite3 keys)

2014-05-23 Thread Adam Funk
On 2014-05-22, Peter Otten wrote: > Adam Funk wrote: >> Well, J*v* returns a byte array, so I used to do this: >> >> digester = MessageDigest.getInstance("MD5"); >> ... >> digester.reset(); >> byte[] digest = digester.digest(bytes); >> return new BigInteger(+1, digest); > > I

Re: hashing strings to integers

2014-05-23 Thread Adam Funk
On 2014-05-23, Adam Funk wrote: > On 2014-05-22, Peter Otten wrote: >> In Python 3 there's int.from_bytes() >> > h = hashlib.sha1(b"Hello world") > int.from_bytes(h.digest(), "little") >> 538059071683667711846616050503420899184350089339 > > Excellent, thanks for pointing that out. I've j

Re: hashing strings to integers (was: hashing strings to integers for sqlite3 keys)

2014-05-23 Thread Chris Angelico
On Fri, May 23, 2014 at 8:27 PM, Adam Funk wrote: > I've also used hashes of strings for other things involving > deduplication or fast lookups (because integer equality is faster than > string equality). I guess if it's just for deduplication, though, a > set of byte arrays is as good as a set o

Re: hashing strings to integers

2014-05-23 Thread Chris Angelico
On Fri, May 23, 2014 at 8:36 PM, Adam Funk wrote: > BTW, I just tested that & it should be "big" for consistency with the > hexdigest: Yes, it definitely should be parsed big-endianly. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: SQLAlchemy - web framework ?

2014-05-23 Thread Amirouche Boubekki
Héllo, 2014-05-13 1:34 GMT+02:00 flebber : > If I want to use SQLAlchemy as my ORM what would be the best option for a web framework? I think the best option would be Pyramid but I don't know SQLAchemy or Pyramid that much, but: - Django doesn't support SQLAlchemy as is - I don't recommend Flas

Re: shebang & windows: call an extensionless git hook

2014-05-23 Thread Albert-Jan Roskam
- Original Message - > From: Albert-Jan Roskam > To: Python > Cc: > Sent: Thursday, May 22, 2014 6:58 PM > Subject: shebang & windows: call an extensionless git hook > > Hi, > > I wrote the git pre-commit hook below. It is supposed to reject commits that > contain large files (e.g. ac

Re: shebang & windows: call an extensionless git hook

2014-05-23 Thread Chris Angelico
On Fri, May 23, 2014 at 11:53 PM, Albert-Jan Roskam wrote: > Ok, I just found out that the script works as-is under Windows (I need to > save it as 'pre-commit', not as 'pre-commit.py'. That's great, though I still > don't understand how Windows (or Git) knows how to do with it. > Are you runni

Windows automatic rebooting due to faulty code

2014-05-23 Thread Ronak Dhakan
I am learning python, and sometimes when I run a file with a faulty, windows gives a message that the system is rebooting and gives me 1 minute to save my work. Does anyone know how can I fix this? Most of the time a faulty code gives errors in python, but this is unique. I create files like Exe

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Chris Angelico
On Sat, May 24, 2014 at 12:56 AM, Ronak Dhakan wrote: > I am learning python, and sometimes when I run a file with a faulty, windows > gives a message that the system is rebooting and gives me 1 minute to save my > work. Does anyone know how can I fix this? Most of the time a faulty code > give

Windows rebooting due to faulty code

2014-05-23 Thread Ronak Dhakan
I am learning python, and sometimes when I run a file with a faulty code, windows gives a message that the system is rebooting and gives me 1 minute to save my work. Does anyone know how can I fix this? Most of the time a faulty code gives errors in python, but this is unique. I create files lik

Re: shebang & windows: call an extensionless git hook

2014-05-23 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: Python > Sent: Friday, May 23, 2014 4:01 PM > Subject: Re: shebang & windows: call an extensionless git hook > > On Fri, May 23, 2014 at 11:53 PM, Albert-Jan Roskam > > wrote: >> Ok, I just found out that the script works as-is

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Ronak Dhakan
On Friday, May 23, 2014 8:34:31 PM UTC+5:30, Chris Angelico wrote: > On Sat, May 24, 2014 at 12:56 AM, Ronak Dhakan wrote: > > > I am learning python, and sometimes when I run a file with a faulty, > > windows gives a message that the system is rebooting and gives me 1 minute > > to save my work

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Chris Angelico
On Sat, May 24, 2014 at 1:26 AM, Ronak Dhakan wrote: > Even I am surprised, python errors should stay in python. But I am sure that > the reboot is triggered exactly when I run some faulty code. And usually I > change the code after reboot, so I haven't checked whether the same code is > able t

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Rustom Mody
On Friday, May 23, 2014 9:06:32 PM UTC+5:30, Chris Angelico wrote: > > There was a problem while creating the post asking the question. Here it is > > now: > > https://groups.google.com/d/msg/comp.lang.python/WINUrOfAey4/pvbnapLrRcsJ > Solution: Get off Google Groups. Subscribe to python-list@p

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Ronak Dhakan
It is a small file to draw an approximate circle using Turtle. The reboot does not happen consistently. Here is the code: http://pastebin.com/8T3aRCEd I was thinking whether there is a way to run python in a virtual environment. -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Joel Goldstick
On May 23, 2014 12:12 PM, "Ronak Dhakan" wrote: > > It is a small file to draw an approximate circle using Turtle. The reboot does not happen consistently. Here is the code: http://pastebin.com/8T3aRCEd > > I was thinking whether there is a way to run python in a virtual environment. > -- > https:

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread CHIN Dihedral
On Saturday, May 24, 2014 12:08:24 AM UTC+8, Ronak Dhakan wrote: > It is a small file to draw an approximate circle using Turtle. The reboot > does not happen consistently. Here is the code: http://pastebin.com/8T3aRCEd > > > > I was thinking whether there is a way to run python in a virtual en

Re:Windows rebooting due to faulty code

2014-05-23 Thread Dave Angel
Ronak Dhakan Wrote in message: > I am learning python, and sometimes when I run a file with a faulty code, > windows gives a message that the system is rebooting and gives me 1 minute to > save my work. Does anyone know how can I fix this? Most of the time a faulty > code gives errors in python

Re: hashing strings to integers

2014-05-23 Thread Terry Reedy
On 5/23/2014 6:27 AM, Adam Funk wrote: that. The only thing that really bugs me in Python 3 is that execfile has been removed (I find it useful for testing things interactively). The spelling has been changed to exec(open(...).read(), ... . It you use it a lot, add a customized def execfile(

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Terry Reedy
On 5/23/2014 12:08 PM, Ronak Dhakan wrote: It is a small file to draw an approximate circle using Turtle. > The reboot does not happen consistently. Here is the code: > http://pastebin.com/8T3aRCEd from swampy.TurtleWorld import * world = TurtleWorld() This is not the turtle module in the stdl

How keep Python 3 moving forward

2014-05-23 Thread Mark Lawrence
An article by Brett Cannon that I thought might be of interest http://nothingbutsnark.svbtle.com/my-view-on-the-current-state-of-python-3 -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruse

how to create a frame object when embedding python?

2014-05-23 Thread Robert Snoeberger
Hi python-list, I'm embedding Python in an application and I have encountered two crashes while calling built-in functions that expect a top-level frame. See the following bug reports: http://bugs.python.org/issue21563 and http://bugs.python.org/issue21418. The problem is that the workflow for

trying to find nose.tools.assert_raises_regexp

2014-05-23 Thread qhfgva
$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import nose.tools >>> nose.__version__ '1.3.3' >>> nose.tools.assert_raises_regexp Traceback (most recent call last): File "", line 1, in At

Re: All-numeric script names and import

2014-05-23 Thread Michael Torrie
On 05/23/2014 03:28 AM, Chris Angelico wrote: > On Fri, May 23, 2014 at 7:22 PM, Wolfgang Maier > wrote: >> I see, so what you should propose then is a change to import, so that when >> it can't find a module it will try to import an alternative that's >> pronounced the same way. Then you could si

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Michael Torrie
On 05/23/2014 09:26 AM, Ronak Dhakan wrote: > Even I am surprised, python errors should stay in python. But I am > sure that the reboot is triggered exactly when I run some faulty > code. And usually I change the code after reboot, so I haven't > checked whether the same code is able to repeat the

TextBlob on Windows

2014-05-23 Thread subhabangalore
Dear Group, It seems there is a nice language processing library named TextBlob, like NLTK. But I am being unable to install it on my Windows(MS-Windows 7 machine. I am using Python 2.7 If anyone of the esteemed members may kindly suggest me the solution. I tried the note in following URL http

Re: How keep Python 3 moving forward

2014-05-23 Thread Roy Smith
In article , Mark Lawrence wrote: > An article by Brett Cannon that I thought might be of interest > http://nothingbutsnark.svbtle.com/my-view-on-the-current-state-of-python-3 Thanks for the pointer. I installed and ran caniusepython3. It tells me: > Finding and checking dependencies ... >

Re: trying to find nose.tools.assert_raises_regexp

2014-05-23 Thread Ned Batchelder
On 5/23/14 6:09 PM, qhfgva wrote: $ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. import nose.tools nose.__version__ '1.3.3' nose.tools.assert_raises_regexp Traceback (most recent call last)

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Irmen de Jong
On 24-5-2014 0:54, Michael Torrie wrote: > On 05/23/2014 09:26 AM, Ronak Dhakan wrote: >> Even I am surprised, python errors should stay in python. But I am >> sure that the reboot is triggered exactly when I run some faulty >> code. And usually I change the code after reboot, so I haven't >> check

Re: How keep Python 3 moving forward

2014-05-23 Thread Ethan Furman
On 05/23/2014 04:57 PM, Roy Smith wrote: Thanks for the pointer. I installed and ran caniusepython3. It tells me: [snip] That's a big list. A few of those we could probably work around or replace with a different module without too much pain. But, between gevent, boto, fabric, and suds,

Re: How keep Python 3 moving forward

2014-05-23 Thread Roy Smith
In article , Ethan Furman wrote: > On 05/23/2014 04:57 PM, Roy Smith wrote: > > > > Thanks for the pointer. I installed and ran caniusepython3. It tells > > me: > > [snip] > > > That's a big list. A few of those we could probably work around or > > replace with a different module without to

Re: trying to find nose.tools.assert_raises_regexp

2014-05-23 Thread qhfgva
I knew it had to be something like that. Thanks. Time to upgrade. On Friday, May 23, 2014 6:07:08 PM UTC-6, Ned Batchelder wrote: > On 5/23/14 6:09 PM, qhfgva wrote: > > > $ python > > > Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) > > > [GCC 4.4.3] on linux2 > > > Type "help", "copyrigh

Python 3 support for Fabric (was: How keep Python 3 moving forward)

2014-05-23 Thread Ben Finney
Roy Smith writes: > Thanks for the pointer. I installed and ran caniusepython3. It tells > me: > > > Of those 19 projects, 17 have no direct dependencies blocking their > > transition: > > […] > > fabric Fabric was for a long time held back by its dependency on the Paramiko library. But th

Re: Advice for choosing correct architecture/tech for a hobby project

2014-05-23 Thread Aseem Bansal
The project is not a browser but a app for managing the bookmarks. Only managing by categories. A replacement for the bookmarks made in webbrowser. I wanted to make bookmarks easier to use. Hierarchical structure of bookmarks gives a lot of problems. I wanted to solve that for my use. On Friday

Re: Advice for choosing correct architecture/tech for a hobby project

2014-05-23 Thread Aseem Bansal
I know that there are many online ways to do what I am trying to do but this was something I wanted to make. I have learnt Python myself and wanted to learn a way to make apps in Python. GUI development in Python has given a lot of headache while trying to find an appropriate framework with th

Parallel python in the cloud

2014-05-23 Thread Charles Gagnon
We were happily using PiCloud for several long calculations and we very happy with with it. With their realtime cores, we could take really large calculations set and run through fairly quickly. Now that PiCloud is going away, we ran a few tests on Mutlyvac but so far, we are struggling to acco