RE: Is Python a commercial proposition ?

2012-08-02 Thread Prasad, Ramit
> I'm in stuck record mode here, but one of the things I really enjoy > about reading here is the way things do go off topic. IMHO makes for a > far more interesting experience. YMMV. +1 Ramit This email is confidential and subject to important disclaimers and conditions including on offers fo

Re: The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Chris Angelico
On Fri, Aug 3, 2012 at 4:24 AM, Csanyi Pal wrote: > I'm searching for a way to develope a Python graphical application for a > Postgresql database. There's two quite separate parts to this: * Develop a Python graphical application * Develop a Python application [to access] a PostgreSQL database.

Re: The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Csanyi Pal
Dennis Lee Bieber writes: > On Thu, 02 Aug 2012 20:24:36 +0200, Csanyi Pal > declaimed the following in gmane.comp.python.general: >> >> I'm searching for a way to develope a Python graphical application for a >> Postgresql database. >> > A predefined database, or a general access module?

Re: The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Mark Lawrence
On 02/08/2012 22:13, Csanyi Pal wrote: Verde Denim writes: Sounds like you have enough pieces-parts... is it a question of the development process? Yes, it is. First question is about GUI. Say I start to create a GUI with XRCed for such an application for managing a concrete postgresql dat

Re: The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Csanyi Pal
Verde Denim writes: > Sounds like you have enough pieces-parts... is it a question of the > development process? Yes, it is. First question is about GUI. Say I start to create a GUI with XRCed for such an application for managing a concrete postgresql database. On a Frame (window) which objec

Re: The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Verde Denim
Sounds like you have enough pieces-parts... is it a question of the development process? On Aug 2, 2012 3:08 PM, "Csanyi Pal" wrote: > Hi, > > I'm new to python. > > I'm searching for a way to develope a Python graphical application for a > Postgresql database. > > I have installed on my Debian G

unable to get simple html file up

2012-08-02 Thread Smaran Harihar
Hi, I am following this tutorial and i am not able to get the link.py up and running. I should be looking at Html file with link directing to the cgi script. But strangely i can't even see the p

Re: Creating a simple CGI Script

2012-08-02 Thread Smaran Harihar
Thanks a lot Xavier, that was exactly what was needed. On Thu, Aug 2, 2012 at 11:44 AM, Xavier Combelle wrote: > In server.py you made a mistake in the declaration of the cgi directory > it should be > handler.cgi_directories = ["/"] > > > Le 02/08/2012 20:20, Smaran Harihar a écrit : > > Hi, >

The way to develope a graphical application to manage a Postgres database

2012-08-02 Thread Csanyi Pal
Hi, I'm new to python. I'm searching for a way to develope a Python graphical application for a Postgresql database. I have installed on my Debian GNU/Linux testing/sid system many python packages, among others: eric, geany, idle, ninja-ide, pida (it doesn't work here), python2.7, python-easygui

Re: Creating a simple CGI Script

2012-08-02 Thread Xavier Combelle
In server.py you made a mistake in the declaration of the cgi directory it should be handler.cgi_directories = ["/"] Le 02/08/2012 20:20, Smaran Harihar a écrit : Hi, I am trying to create a simple CGI Script and following this tutorials

Creating a simple CGI Script

2012-08-02 Thread Smaran Harihar
Hi, I am trying to create a simple CGI Script and following this tutorialsbut unfortunately my output is only printing the cgi file as it is on the browser. I have already provided the py scripts with the executable func

dbf.py API question

2012-08-02 Thread Ethan Furman
SQLite has a neat feature where if you give it a the file-name of ':memory:' the resulting table is in memory and not on disk. I thought it was a cool feature, but expanded it slightly: any name surrounded by colons results in an in-memory table. I'm looking at the same type of situation with

Re: Pass data to a subprocess

2012-08-02 Thread Grant Edwards
On 2012-08-02, Laszlo Nagy wrote: > >> I still don't get it. shm_unlink() works the same way unlink() does. >> The resource itself doesn't cease to exist until all open file >> handles are closed. From the shm_unlink() man page on Linux: >> >> The operation of shm_unlink() is analogous to

Re: Error help

2012-08-02 Thread danielashiloh
On Thursday, 2 August 2012 12:18:59 UTC+1, Peter Otten wrote: > danielashi...@googlemail.com wrote: > > > > > This error has been bugging me for days. I know it's minor, but it's > > > really getting in the way of my programming. I'm programming a data > > > analysis programme for a psycholog

Re: consistent input() for Python 2 and 3

2012-08-02 Thread Jason Swails
On Thu, Aug 2, 2012 at 5:49 AM, Ulrich Eckhardt < ulrich.eckha...@dominolaser.com> wrote: > Hi! > > I'm trying to write some code that should work with both Python 2 and 3. > One of the problems there is that the input() function has different > meanings, I just need the raw_input() behaviour of P

Re: Error help

2012-08-02 Thread Philipp Hagemeister
Let's go thorugh this program: On 08/02/2012 12:58 PM, danielashi...@googlemail.com wrote: > import cPickle, pickle you probably want to transparently fall back to pickle if cPickle is not available. > print 'WELLCOME TO THE LIBET CLOCK EXPERIMENT DATA ANALYSIST' > file=raw_input('\nPLEASE ENTER

Re: Error help

2012-08-02 Thread Dave Angel
On 08/02/2012 06:58 AM, danielashi...@googlemail.com wrote: > Hi all > > This error has been bugging me for days. I know it's minor, but it's really > getting in the way of my programming. I'm programming a data analysis > programme for a psychology experiment which takes pickled data from the >

Re: Error help

2012-08-02 Thread marmata
Hi, > This error has been bugging me for days. Doesn't look like a tab error but: > partifipant_info=data'Participant Info'] This line is wrong, it should be: partifipant_info=data['Participant Info'] That's probably what's triggering the error! Cheers, ]\/[arco -- http://mail.python.org/ma

Re: Error help

2012-08-02 Thread Peter Otten
danielashi...@googlemail.com wrote: > This error has been bugging me for days. I know it's minor, but it's > really getting in the way of my programming. I'm programming a data > analysis programme for a psychology experiment which takes pickled data > from the experiment and produces averages. Fo

Re: consistent input() for Python 2 and 3

2012-08-02 Thread Philipp Hagemeister
On 08/02/2012 11:49 AM, Ulrich Eckhardt wrote: > try: > # redirect input() to raw_input() like Python 3 > input = raw_input > except NameError: > # no raw input, probably running Python 3 already > pass > What do you think? Any better alternatives? That's the generic so

Re: attribute is accessed from Nonetype

2012-08-02 Thread Dave Angel
On 08/02/2012 06:28 AM, Shanth Kumar wrote: > Hi ,All, > I am Shanthkumar. Good to see the mailing list for python programmers. Welcome to the list. > Please find my query below, > > In my source code in a python file e.g xyz.py couple of classes are defined > also there is a wrapper class, a non

Error help

2012-08-02 Thread danielashiloh
Hi all This error has been bugging me for days. I know it's minor, but it's really getting in the way of my programming. I'm programming a data analysis programme for a psychology experiment which takes pickled data from the experiment and produces averages. For some reason python is insisting

Re: CRC-checksum failed in gzip

2012-08-02 Thread andrea crotti
2012/8/2 andrea crotti : > > Ok sure that makes sense, but then this explanation is maybe not right > anymore, because I'm quite sure that the file object is *not* shared > between threads, everything happens inside a thread.. > > I managed to get some errors doing this with a big file > class Open

Re: CRC-checksum failed in gzip

2012-08-02 Thread andrea crotti
2012/8/2 Laszlo Nagy : > > Your example did not share the file object between threads. Here an example > that does that: > > class OpenAndRead(threading.Thread): > def run(self): > global fz > fz.read(100) > > if __name__ == '__main__': > >fz = gzip.open('out2.txt.gz') >

Re: C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread Stefan Behnel
rahul, 02.08.2012 11:50: > When I use same code base for Python 3.x, then behavior is different. You might want to take a look at Cython. It moves most of these "funny" little details off your shoulders. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread Tim Golden
On 02/08/2012 10:50, rahul wrote: > When I use same code base for Python 3.x, then behavior is different. In this > when I return false then also it throws exception but only when any other > statement get executed after this > > like below code: > ... > ... >b = None >try: > a =

attribute is accessed from Nonetype

2012-08-02 Thread Shanth Kumar
Hi ,All, I am Shanthkumar. Good to see the mailing list for python programmers. Please find my query below, In my source code in a python file e.g xyz.py couple of classes are defined also there is a wrapper class, a none object is declared in the file e.g temp=None from temp some attributes are b

Re: CRC-checksum failed in gzip

2012-08-02 Thread Laszlo Nagy
One last thing I would like to do before I add this fix is to actually be able to reproduce this behaviour, and I thought I could just do the following: import gzip import threading class OpenAndRead(threading.Thread): def run(self): fz = gzip.open('out2.txt.gz') fz.rea

consistent input() for Python 2 and 3

2012-08-02 Thread Ulrich Eckhardt
Hi! I'm trying to write some code that should work with both Python 2 and 3. One of the problems there is that the input() function has different meanings, I just need the raw_input() behaviour of Python 2. My approach is to simply do this: try: # redirect input() to raw_input() lik

Re: CRC-checksum failed in gzip

2012-08-02 Thread Laszlo Nagy
Technically, that is correct, but IMHO its complete nonsense to share the file object between threads in the first place. If you need the data in two threads, just read the file once and then share the read-only, immutable content. If the file is small or too large to be held in memory at onc

Re: C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread rahul
When I use same code base for Python 3.x, then behavior is different. In this when I return false then also it throws exception but only when any other statement get executed after this like below code: ... ... b = None try: a = testModule.check(None) except: b = sys.exc_in

Re: C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread Tim Golden
On 02/08/2012 10:21, rahul wrote: > > Hi TJG, > > The above link also doesn't strictly said that return value should be > NULL only, it only said that usually NULL pointer used. No where I > saw that it is nessasory t > > At http://docs.python.org/c-api/exceptions.html. it is written that > "Mos

Re: CRC-checksum failed in gzip

2012-08-02 Thread andrea crotti
2012/8/1 Steven D'Aprano : > > When you start using threads, you have to expect these sorts of > intermittent bugs unless you are very careful. > > My guess is that you have a bug where two threads read from the same file > at the same time. Since each read shares state (the position of the file >

Re: C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread rahul
Hi TJG, The above link also doesn't strictly said that return value should be NULL only, it only said that usually NULL pointer used. No where I saw that it is nessasory t At http://docs.python.org/c-api/exceptions.html. it is written that "Most functions also return an error indicator, usual

Re: CRC-checksum failed in gzip

2012-08-02 Thread Ulrich Eckhardt
Am 01.08.2012 19:57, schrieb Laszlo Nagy: ## Open file lock = threading.Lock() fin = gzip.open(file_path...) # Now you can share the file object between threads. # and do this inside any thread: ## data needed. block until the file object becomes usable. with lock: data = fin.read() # o

Re: C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread Tim Golden
On 02/08/2012 09:57, rahul wrote: > I am implementing a C extension module, during this I saw that when I > set the global error indicator and error message through > PyErr_SetString() API and return false. > > But it doesn't throw any error when I tried to check the error > through sys.exc_info()

C extension module doesn't throw exception after setting error indicator through PyErr_SetString()

2012-08-02 Thread rahul
I am implementing a C extension module, during this I saw that when I set the global error indicator and error message through PyErr_SetString() API and return false. But it doesn't throw any error when I tried to check the error through sys.exc_info() then it returns (NULL, NULL, NULL) tuple.

Re: Is Python a commercial proposition ?

2012-08-02 Thread lipska the kat
On 02/08/12 04:10, David wrote: On 01/08/2012, Stefan Behnel wrote: Would you mind taking this slightly off-topic discussion off the list? I always strive to stay on-topic. In fact immediately this thread went off topic, 4 messages back, I did try to go off list, but got this result from the

Re: Is Python a commercial proposition ?

2012-08-02 Thread Mark Lawrence
On 02/08/2012 04:10, David wrote: On 01/08/2012, Stefan Behnel wrote: Would you mind taking this slightly off-topic discussion off the list? I always strive to stay on-topic. In fact immediately this thread went off topic, 4 messages back, I did try to go off list, but got this result from t