Destructor?

2008-04-08 Thread Gabriel Rossetti
Hello everyone, we are writing an application that needs some cleanup to be done if the application is quit, normally (normal termination) or by a signal like SIGINT or SIGTERM. I know that the __del__ method exists, but unless I'm mistaken there is no guarantee as of when it will be called, an

Re: Destructor?

2008-04-08 Thread Matt Nordhoff
Gabriel Rossetti wrote: > Hello everyone, > > we are writing an application that needs some cleanup to be done if the > application is quit, normally (normal termination) or by a signal like > SIGINT or SIGTERM. I know that the __del__ method exists, but unless I'm > mistaken there is no guaran

Re: Destructor?

2008-04-08 Thread Matt Nordhoff
Matt Nordhoff wrote: > Gabriel Rossetti wrote: >> Hello everyone, >> >> we are writing an application that needs some cleanup to be done if the >> application is quit, normally (normal termination) or by a signal like >> SIGINT or SIGTERM. I know that the __del__ method exists, but unless I'm >>

Re: Destructor?

2008-04-08 Thread Gabriel Rossetti
Matt Nordhoff wrote: > Matt Nordhoff wrote: > >> Gabriel Rossetti wrote: >> >>> Hello everyone, >>> >>> we are writing an application that needs some cleanup to be done if the >>> application is quit, normally (normal termination) or by a signal like >>> SIGINT or SIGTERM. I know that th

Re: Destructor?

2008-04-08 Thread Duncan Booth
Gabriel Rossetti <[EMAIL PROTECTED]> wrote: > we are writing an application that needs some cleanup to be done if > the application is quit, normally (normal termination) or by a signal > like SIGINT or SIGTERM. I know that the __del__ method exists, but > unless I'm mistaken there is no guarantee

Re: Destructor?

2008-04-08 Thread Thomas Guettler
Duncan Booth schrieb: > [*] except of course for things like power failure. You simply cannot > catch *all* terminations. And 'kill -SIGKILL' can't be caught, since this signal never reaches the process. The os just removes the processes. Thomas -- Thomas Guettler, http://www.thomas-guettle

Re: First Python project - comments welcome!

2008-04-08 Thread Paul Scott
On Mon, 2008-04-07 at 06:20 -0700, [EMAIL PROTECTED] wrote: > > If anyone on this list is willing/able, please do give me a few > > pointers, even if it is "This is total crap - RTFM and come back when > > you are ready" I would really appreciate it! > > Ok, since you asked for it: > Awesome fe

PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.

2008-04-08 Thread subhabrata . iisc
I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v. 1310 32 bit (Intel)] on win32 with IDLE 1.2.1 My O/S is Windows XP SP2 I use 512 MB RAM. I am encountering the following problems: (i) a1=1 a2=2 a3=a1+a2 print a3 # The result is coming sometimes as 3 sometimes as vague

segmentation fault when executing PyImport_ImportModule("sys")

2008-04-08 Thread Dietrich Bollmann
Hi, Since some time I get the following segmentation fault in an application which used to work fine until recently. I made a backtrace but couldn't find the reason for the segmentaion fault until now. In the hope that somebody might have encountered a similar problem or does understand the back

segmentation fault when executing PyImport_ImportModule("sys")

2008-04-08 Thread Dietrich Bollmann
Hi, Since some time I get the following segmentation fault in an application which used to work fine until recently. I made a backtrace but couldn't find the reason for the segmentaion fault until now. In the hope that somebody might have encountered a similar problem or does understand the back

Re: Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-08 Thread Soltys
> Greetings! > > I'm looking for conferences or events about Python, Django, Dabatases, > Mysql, > PHP, Ruby in Europe (or nearby locations like north africa and middle > east) in 2008. > Do you have any suggestions? > > Thanks a lot! Hello, Every year starting from 2007 in April there's a RuPy

Re: PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.

2008-04-08 Thread cokofreedom
'I have designed a program with more than 500 if elif else' This was your first mistake... (ii) x3=x1.find(x2) returns an integer corresponding to the start position in x1 where it found x2, otherwise it will return -1. (i) ... what kind of vague numbers? It should just give you an integer res

Re: Calling CVF-Fortran-dll with ctypes and simple structure

2008-04-08 Thread Michael Schäfer
Gabriel, works perfect - even in complex nested structures! Thank you very much! > (If both Fortran and VB say "char*9", why did you choose a pointer here?) I do not know this possibility. Could you please drop me a few lines? -- Michael -- http://mail.python.org/mailman/listinfo/python-list

Хулахуп спртивный обруч с ма гнитами утяжеленный

2008-04-08 Thread Золотой Клон
Acu Hoop Pro. Магнитный, утяжеленный обруч-хулахуп. Аку Хуп Про с магнитами (Acu Hoop Pro) - уникальный домашний массажный спортивный обруч для всех, кто желает похудеть и обрести великолепную талию и стройную фигуру.Вы сожжете 100 калорий за каждые 10 минут тренировки!!! Благодаря уникальному акуп

Re: Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-08 Thread Simon Brunning
On Tue, Apr 8, 2008 at 10:10 AM, Simone Brunozzi <[EMAIL PROTECTED]> wrote: > Greetings! > > I'm looking for conferences or events about Python, Django, Dabatases, > Mysql, > PHP, Ruby in Europe (or nearby locations like north africa and middle > east) in 2008. > Do you have any suggestions?

Re: Learning curve for new database program with Python?

2008-04-08 Thread Simon Brunning
On Mon, Apr 7, 2008 at 7:19 PM, Gary Duzan <[EMAIL PROTECTED]> wrote: >It seems to me that ORM can work if your database isn't too > complex and it is the only way your database is going to be accessed. I'm working on a big, complex system using an ORM at the moment - http://gu.com. It's a Ja

urlparse http://site.com/../../../page.html

2008-04-08 Thread monk.e.boy
Hi, Can anyone help me with the urlparse: >>> import urlparse >>> urlparse.urljoin( 'http://site.com/path/', '../../../../path/' ) 'http://site.com/../../../path/' >>> urlparse.urljoin( 'http://site.com/', '../../../../path/' ) 'http://site.com/../../../../path/' >>> urlparse.urljoin( 'http://s

Re: Is there an official way to add methods to an instance?

2008-04-08 Thread méchoui
On Apr 4, 5:25 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers wrote: > > Paul Rubin a écrit : > >> Brian Vanderburg II <[EMAIL PROTECTED]> writes: > >>> I've checked out some ways to get this to work. I want to be able to > >>> add a new function to an instance of an object. > > >

Re: PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.

2008-04-08 Thread Vladimir Kropylev
yes, ths is known problem. I can just recomend you to use Linux or FreeBSD, though cygwin maybe also possible 2008/4/8, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v. > 1310 32 bit (Intel)] on win32 with IDLE 1.2.1 > My O/S is Window

Re: Learning curve for new database program with Python?

2008-04-08 Thread Gary Duzan
In article <[EMAIL PROTECTED]>, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >On 2008-04-07 15:30, Greg Lindstrom wrote: >> >> SQL is one of the areas I wish I had mastered (much) earlier in my career > >Fully agree :-) > >Interesting comments in a time where everyone seems to be obsessed >with ORMs.

Google App Engine

2008-04-08 Thread Duncan Booth
Google have announced a new service called 'Google App Engine' which may be of interest to some of the people here (although if you want to sign up you'll have to join the queue behind me): >From the introduction: > What Is Google App Engine? > > Google App Engine lets you run your web applica

Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-08 Thread Simone Brunozzi
Greetings! I'm looking for conferences or events about Python, Django, Dabatases, Mysql, PHP, Ruby in Europe (or nearby locations like north africa and middle east) in 2008. Do you have any suggestions? Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Reproducing a web page and add own content to it.

2008-04-08 Thread LaundroMat
Hi - I'm working on a Django powered site where one of the required functionalities is the possibility of displaying the content of external pages, with an extra banner at the top where specific information is displayed. In other words, I'm looking for a way to reproduce an existing web page and a

Setting default version among multiple python installations

2008-04-08 Thread Karthik
Hello, I am an absolute linux and python newbie. The linux machine(red hat version 7.2) that i managed to get my hands on had python 1.5(vintage stuff, i guess) in it. I have installed python 2.5 using the source tar. However, when i try to access python, i am taken to the older version only.

[no subject]

2008-04-08 Thread vaibhav pol
hi, I wrote a python program and import the function and executing , that fuction get executing as the current uid what i have to do if i want to exectue that function as root or another user . -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there an official way to add methods to an instance?

2008-04-08 Thread [EMAIL PROTECTED]
On 8 avr, 11:39, méchoui <[EMAIL PROTECTED]> wrote: > On Apr 4, 5:25 pm, John Nagle <[EMAIL PROTECTED]> wrote: > > > > > Bruno Desthuilliers wrote: > > > Paul Rubin a écrit : > > >> Brian Vanderburg II <[EMAIL PROTECTED]> writes: > > >>> I've checked out some ways to get this to work. I want to be

Re: Reproducing a web page and add own content to it.

2008-04-08 Thread Diez B. Roggisch
LaundroMat wrote: > Hi - > > I'm working on a Django powered site where one of the required > functionalities is the possibility of displaying the content of > external pages, with an extra banner at the top where specific > information is displayed. In other words, I'm looking for a way to > rep

Cannot understand the detailedly the following code

2008-04-08 Thread reachmsn
Hi, At the url http://www.python.org/doc/essays/graphs.html there is some code by Guido Van Rossum for computing paths through a graph - I have pasted it below for reference - Let's write a simple function to determine a path between two nodes. It takes a graph and the start and end nodes as argu

Re: Cannot understand the detailedly the following code

2008-04-08 Thread A.T.Hofkamp
On 2008-04-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: [deleted a long piece of text by our BDFL about recursive graph path-finding algorithm] > after first writing the inductive part ... for node in > graph[start] > and then by trial and error put square brackets around path in the >

Re: Reproducing a web page and add own content to it.

2008-04-08 Thread LaundroMat
On Apr 8, 2:04 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > LaundroMat wrote: > > Hi - > > > I'm working on a Django powered site where one of the required > > functionalities is the possibility of displaying the content of > > external pages, with an extra banner at the top where specific >

makepy.py not working

2008-04-08 Thread suzhi18
Hallo, I've a problem getting makepy running. When I start the tool on my machine with doubleclick everything is fine. But when I try this in my Code: makepy.py -i "Microsoft Excel 11.0 Object Library(1.5)" I am getting an Syntax Error and command: makepy.py bring me this message on the screen

Re: urlparse http://site.com/../../../page.html

2008-04-08 Thread monk.e.boy
I figured it out and blogged the answer: http://teethgrinder.co.uk/blog/Normalize-URL-path-python/ monk.e.boy -- http://mail.python.org/mailman/listinfo/python-list

Re: UML reverse engineering

2008-04-08 Thread Cristina Yenyxe González García
If you are a Linux user, you can also take a look at Umbrello UML (it is part of the KDE Desktop). -- http://mail.python.org/mailman/listinfo/python-list

Re: Reproducing a web page and add own content to it.

2008-04-08 Thread Steve Holden
LaundroMat wrote: > On Apr 8, 2:04 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> LaundroMat wrote: >>> Hi - >>> I'm working on a Django powered site where one of the required >>> functionalities is the possibility of displaying the content of >>> external pages, with an extra banner at the t

Re: Looking for Conferences/Events on Django, Python, MySQL, etc in Europe 2008?

2008-04-08 Thread Simone Brunozzi
On Apr 8, 12:36 pm, "Simon Brunning" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 8, 2008 at 10:10 AM, Simone Brunozzi > > <[EMAIL PROTECTED]> wrote: > > Greetings! > > > I'm looking for conferences or events about Python, Django, Dabatases, > > Mysql, > > PHP, Ruby in Europe (or nearby locations li

Re: PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.

2008-04-08 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v. > 1310 32 bit (Intel)] on win32 with IDLE 1.2.1 > My O/S is Windows XP SP2 I use 512 MB RAM. > I am encountering the following problems: > (i) a1=1 > a2=2 > a3=a1+a2 > print a3 > # The result

import statement convention

2008-04-08 Thread MartinRinehart
By convention, I've read, your module begins with its import statements. Is this always sensible? I put imports that are needed for testing in the test code at the end of the module. If only a bit of the module has a visual interface, why pollute the global namespace with 'from Tkinter import *'?

Re: PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.

2008-04-08 Thread cokofreedom
> > I have a car. I have turned the ignition key but it fails to start. > Please tell me what is wrong with it. > The engine is missing! Am I close? -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning curve for new database program with Python?

2008-04-08 Thread D'Arcy J.M. Cain
On Mon, 7 Apr 2008 23:06:23 -0700 (PDT) CM <[EMAIL PROTECTED]> wrote: > You misunderstood me, but completely understandably. I meant that > a) the OP wanted to use Django, and so I was giving the word on the > only database engines that would work with that and b) the OP wanted > to use a relation

Re: Data structure recommendation?

2008-04-08 Thread Jochen Schulz
* Steven Clark: > Hi all- > > I'm looking for a data structure that is a bit like a dictionary or a > hash map. In particular, I want a mapping of floats to objects. > However, I want to map a RANGE of floats to an object. This solution may be more than you actually need, but I implemented two me

Re: urlparse http://site.com/../../../page.html

2008-04-08 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "monk.e.boy" <[EMAIL PROTECTED]> wrote: > I figured it out and blogged the answer: > > http://teethgrinder.co.uk/blog/Normalize-URL-path-python/ Thanks for letting us know of a solution. You might also be interested in Fourthought's URI library which contains

list.sort(): heaviest item?

2008-04-08 Thread Steven Clark
If I have a list of items of mixed type, can I put something into it such that after a list.sort(), is guaranteed to be at the end of the list? Looking at http://www.python.org/doc/2.3.5/ref/comparisons.html "Most other types compare unequal unless they are the same object; the choice whether one

Re: Problem with smtplib and py2exe

2008-04-08 Thread Kevin
Thanks, Terry, you pointed me in the right direction with the reference to the "DEBUG". I dug out my "Learning Python" book, to read up on the debugger, and one of the things I came across was a section on IDLE's debugger. It said essentially that if you get an error that doesn't make sense when y

String Literal to Blob

2008-04-08 Thread Victor Subervi
Hi: I am able (finally) to upload an image to the database. However, when I try to retrieve it, I get a string literal. Here is my code: #!/usr/local/bin/python import cgitb; cgitb.enable() import MySQLdb def test(): host = 'mysqldb2.ehost-services.com' user = 'user' passwd = 'pass' db = '

List open files

2008-04-08 Thread Bruno GUERPILLON
Hi, I'd like, in a WIN32 environment, list all open files. Anyone got a clue how to do this ? Regards, Bruno. -- http://mail.python.org/mailman/listinfo/python-list

Re: Google App Engine

2008-04-08 Thread Henry Chang
This is very interesting. Thanks for sharing! On Tue, Apr 8, 2008 at 1:55 AM, Duncan Booth <[EMAIL PROTECTED]> wrote: > Google have announced a new service called 'Google App Engine' which may > be of interest to some of the people here (although if you want to sign > up you'll have to join the

Re: import statement convention

2008-04-08 Thread Matt Nordhoff
[EMAIL PROTECTED] wrote: > By convention, I've read, your module begins with its import > statements. Is this always sensible? > > I put imports that are needed for testing in the test code at the end > of the module. If only a bit of the module has a visual interface, why > pollute the global nam

Re: list.sort(): heaviest item?

2008-04-08 Thread Diez B. Roggisch
Steven Clark wrote: > If I have a list of items of mixed type, can I put something into it > such that after a list.sort(), is guaranteed to be at the end of the > list? > > Looking at http://www.python.org/doc/2.3.5/ref/comparisons.html > "Most other types compare unequal unless they are the sam

Re: list.sort(): heaviest item?

2008-04-08 Thread Steven Clark
> You can pass a cmp-function that will always make one object being greater > than all others. > > Diez > -- Yeah, I figured it out 2 minutes after I posted, d'oh! class Anvil(object): def __cmp__(self. other): return 1 Sorry for the wasted space. -- http://mail.python.org/ma

Re: PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.

2008-04-08 Thread Robert Bossy
Hi, First thing, I appreciate (and I'm positive we all do) if you DID'N YELL AT ME. [EMAIL PROTECTED] wrote: > I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v. > 1310 32 bit (Intel)] on win32 with IDLE 1.2.1 > My O/S is Windows XP SP2 I use 512 MB RAM. > I am encountering the

Re: Data structure recommendation?

2008-04-08 Thread Steven Clark
> bisect is definitely the way to go. You should take care with > floating point precision, though. One way to do this is to choose a > number of digits of precision that you want, and then internally to > your class, multiply the keys by 10**precision and truncate, so that > you are working

Re: List open files

2008-04-08 Thread Mike Driscoll
On Apr 8, 10:16 am, "Bruno GUERPILLON" <[EMAIL PROTECTED]> wrote: > Hi, > > I'd like, in a WIN32 environment, list all open files. > Anyone got a clue how to do this ? > > Regards, > > Bruno. XP comes with a utility called OpenFiles.exe which supposedly gives this functionality. You can use Python

Re: list.sort(): heaviest item?

2008-04-08 Thread Jeffrey Froman
Steven Clark wrote: > If I have a list of items of mixed type, can I put something into it > such that after a list.sort(), is guaranteed to be at the end of the > list? > It looks like "None" always ends up at the start ("lightest"), but I > want the opposite ("heaviest"). I don't know of an

Re: List open files

2008-04-08 Thread Miki
Hello Bruno, > I'd like, in a WIN32 environment, list all open files. > Anyone got a clue how to do this ? Have a look at the sysinternals suite (http://technet.microsoft.com/en- us/sysinternals/0e18b180-9b7a-4c49-8120-c47c5a693683.aspx), you might find stuff there that will help you. HTH, -- Mik

Re: import statement convention

2008-04-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > By convention, I've read, your module begins with its import > statements. Is this always sensible? > > I put imports that are needed for testing in the test code at the end > of the module. If only a bit of the module has a visual interface, why > pollute the global na

Re: Google App Engine

2008-04-08 Thread William Dode
On 08-04-2008, Duncan Booth wrote: > Google have announced a new service called 'Google App Engine' which may > be of interest to some of the people here (although if you want to sign > up you'll have to join the queue behind me): > > From the introduction: > >> What Is Google App Engine? ... It

Re: Problem with smtplib and py2exe

2008-04-08 Thread Mike Driscoll
On Apr 8, 10:17 am, Kevin <[EMAIL PROTECTED]> wrote: > Thanks, Terry, you pointed me in the right direction with the > reference to the "DEBUG". > > I dug out my "Learning Python" book, to read up on the debugger, and > one of the things I came across was a section on IDLE's debugger. It > said ess

Re: List open files

2008-04-08 Thread Bruno GUERPILLON
"Mike Driscoll" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > On Apr 8, 10:16 am, "Bruno GUERPILLON" <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I'd like, in a WIN32 environment, list all open files. >> Anyone got a clue how to do this ? >> >> Regards, >> >> Bruno. > > XP

Re: List open files

2008-04-08 Thread Bruno GUERPILLON
"Miki" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hello Bruno, > >> I'd like, in a WIN32 environment, list all open files. >> Anyone got a clue how to do this ? > Have a look at the sysinternals suite (http://technet.microsoft.com/en- > us/sysinternals/0e18b180-9b7a

Re: urlparse http://site.com/../../../page.html

2008-04-08 Thread monk.e.boy
> http://4suite.org/ Thanks for the info, for the curious I found some docs on how to use it (pretty simple): http://4suite.org/docs/CoreManual.xml and the code is in the CVS under "4Suite/Ft/Lib/Uri.py" The license is similar to the Apache license, so it is pretty liberal :-) I'd like to see

Re: List open files

2008-04-08 Thread M�ta-MCI (MVP)
Salut ! Finalement, tu as obtenu plus de réponses sur le NG français. Comme quoi, la vérité n'est pas toujours ailleurs... @+ -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: List open files

2008-04-08 Thread M�ta-MCI (MVP)
Hi! > OpenFiles.exe OK, on a standard CPU/windows. On a server, use:Net File @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: List open files

2008-04-08 Thread Guillaume
Oh and don't forget to take care about saving correctly the Oracle database ! ^^ (private joke *giggles* j/k :)) Regards, -- Guillaume -- http://mail.python.org/mailman/listinfo/python-list

Python 3.0 new integer division

2008-04-08 Thread Hutch
We now have a float result when two integers are divided in the same mannor as 2.4 or 2.5. I can handle that and use the Floor division but a simple question. Why in the world would you round down the last presented digit to a 6 instead of just leaving it along as an 8. For some reason rounding

Re: String Literal to Blob

2008-04-08 Thread Steve Holden
Victor Subervi wrote: > Hi: > I am able (finally) to upload an image to the database. However, when I > try to retrieve it, I get a string literal. Here is my code: > > #!/usr/local/bin/python > import cgitb; cgitb.enable() > import MySQLdb > def test(): > host = 'mysqldb2.ehost-services.com <

Re: List open files

2008-04-08 Thread Mike Driscoll
On Apr 8, 10:56 am, "Bruno GUERPILLON" <[EMAIL PROTECTED]> wrote: > "Mike Driscoll" <[EMAIL PROTECTED]> a écrit dans le message de news: > [EMAIL PROTECTED] > > > On Apr 8, 10:16 am, "Bruno GUERPILLON" <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> I'd like, in a WIN32 environment, list all open files

Re: Python 3.0 new integer division

2008-04-08 Thread Jonathan Gardner
On Apr 8, 9:13 am, "Hutch" <[EMAIL PROTECTED]> wrote: > We now have a float result when two integers are divided in the same mannor > as 2.4 or 2.5. > I can handle that and use the Floor division but a simple question. > > Why in the world would you round down the last presented digit to a 6 > inst

how to read contents of a silk results file using python script?

2008-04-08 Thread Praveena B
can anyone help me? You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com-- http://mail.python.org/mailman/l

Re: Data structure recommendation?

2008-04-08 Thread bearophileHUGS
Jochen Schulz: > This solution may be more than you actually need, but I implemented two > metric space indexes which would do what you want (and I wanted to plug > it anyway :)): Please plug such good things. It seems the Python community is an endless source of interesting modules I didn't know

Re: String Literal to Blob

2008-04-08 Thread Victor Subervi
Thanks. I apparently am printing some holder for the image. I stripped out most of it with this content[0][0] but then I am left with this: array('c', '\xff\xd8\xff\xe0\\0\x10JFI...) How do I extract an image from that? TIA, Victor On Tue, Apr 8, 2008 at 11:15 AM, Steve Holden <[EMAIL PROTECT

Re: Python 3.0 new integer division

2008-04-08 Thread Matimus
On Apr 8, 9:13 am, "Hutch" <[EMAIL PROTECTED]> wrote: > We now have a float result when two integers are divided in the same mannor > as 2.4 or 2.5. > I can handle that and use the Floor division but a simple question. > > Why in the world would you round down the last presented digit to a 6 > inst

set file permission on windows

2008-04-08 Thread Tim Arnold
hi, I need to set file permissions on some directory trees in windows using Python. When I click on properties for a file and select the 'Security' tab, I see a list of known 'Group or user names' with permissions for each entry such as Full Control, Modify, Read&Execute, etc. I need to (for e

Re: Python 3.0 new integer division

2008-04-08 Thread Hutch
"Matimus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Apr 8, 9:13 am, "Hutch" <[EMAIL PROTECTED]> wrote: >> We now have a float result when two integers are divided in the same >> mannor >> as 2.4 or 2.5. >> I can handle that and use the Floor division but a simple question.

Re: set file permission on windows

2008-04-08 Thread Mike Driscoll
On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: > hi, I need to set file permissions on some directory trees in windows using > Python. > > When I click on properties for a file and select the 'Security' tab, I see a > list of known 'Group or user names' with permissions for each entry

Running a python code periodically

2008-04-08 Thread Maryam Saeedi
Hi, I was wondering if you know how can I run a python code once every five minutes for a period of time either using python or some other program like a bash script. Thanks, Maryam -- http://mail.python.org/mailman/listinfo/python-list

Is the Python for statement the same as for each in other languages?

2008-04-08 Thread jmDesktop
Thank you. It looks like it is, but I wanted to make sure I understood. Also, I didn't see a "regular" for loop construct either (i=0;i<=10;i++), etc. I'm still new at it, but is there one of those? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the Python for statement the same as for each in other languages?

2008-04-08 Thread Diez B. Roggisch
jmDesktop schrieb: > Thank you. It looks like it is, but I wanted to make sure I > understood. Also, I didn't see a "regular" for loop construct either > (i=0;i<=10;i++), etc. I'm still new at it, but is there one of those? Yes, it's foreach. And for your usecase, use for i in xrange(11):

need help to upload file to webserver

2008-04-08 Thread Sells, Fred
I am automating the client side of a simple web interface. I need to upload a file to a webserver that requires authentication. I've got the authentication working with urllib2 (see below), but the only examples I've found to upload files use httplib without authentication. I'm competent with

Re: set file permission on windows

2008-04-08 Thread Tim Arnold
"Mike Driscoll" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: >> > According to the following thread, you can use os.chmod on Windows: > > http://mail.python.org/pipermail/python-list/2003-June/210268.html > > You can

Re: Google App Engine

2008-04-08 Thread Berco Beute
It's wonderful news for Python. It will definitely be a boost for Python's (and Django's) popularity. Python finally seems to be on every developers mind at the moment. Looks like it's showtime for Python! -- http://mail.python.org/mailman/listinfo/python-list

Re: Running a python code periodically

2008-04-08 Thread Gabriel Ibanez
Hi, On Linux/Unix: $ man at You could create a bash script using this command. Keep in mind that the script must "schedule" itself again. There's other way: using the cron daemon (crond). Its programming depends on the used distro. I hope this helps. Regards .. - Original Message --

Re: set file permission on windows

2008-04-08 Thread Tim Golden
Tim Arnold wrote: > "Mike Driscoll" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: >>> > >> According to the following thread, you can use os.chmod on Windows: >> >> http://mail.python.org/pipermail/python-list/2003

Re: Google App Engine

2008-04-08 Thread Duncan Booth
William Dode <[EMAIL PROTECTED]> wrote: > On 08-04-2008, Duncan Booth wrote: >> Google have announced a new service called 'Google App Engine' which >> may be of interest to some of the people here (although if you want >> to sign up you'll have to join the queue behind me): >> >> From the introdu

Re: Google App Engine

2008-04-08 Thread Steve Holden
Duncan Booth wrote: [...] > Yes, it says you can use almost any Python web framework but django is the > preferred one. > > Some of the comments at > http://www.techcrunch.com/2008/04/07/google-jumps-head-first-into-web-services-with-google-app-engine/ > sound kind of upset, e.g.: "Python will b

Re: set file permission on windows

2008-04-08 Thread Mike Driscoll
On Apr 8, 1:19 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: > "Mike Driscoll" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: > >> > > According to the following thread, you can use os.chmod on Windows: > > >ht

Re: Running a python code periodically

2008-04-08 Thread paul
Maryam Saeedi schrieb: > Hi, > > I was wondering if you know how can I run a python code once every five > minutes for a period of time either using python or some other program like > a bash script. See the sched module in the standard library or here: http://pypi.python.org/simple/Recur/ cheer

Re: Best way to check if string is an integer?

2008-04-08 Thread Tobiah
> byte twiddling if the need arouse. I'm excited already :) ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/python-list

calling variable function name ?

2008-04-08 Thread TkNeo
I don't know the exact terminology in python, but this is something i am trying to do i have 3 functions lets say FA(param1,param2) FB(param1,param2) FC(param1,param2) temp = "B" #something entered by user. now i want to call FB. I don't want to do an if else because if have way too many methods

Re: Is the Python for statement the same as for each in other languages?

2008-04-08 Thread [EMAIL PROTECTED]
On 8 avr, 19:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > jmDesktop schrieb: > > > Thank you. It looks like it is, but I wanted to make sure I > > understood. Also, I didn't see a "regular" for loop construct either > > (i=0;i<=10;i++), etc. I'm still new at it, but is there one of those?

Re: Calling CVF-Fortran-dll with ctypes and simple structure

2008-04-08 Thread Gabriel Genellina
En Tue, 08 Apr 2008 06:02:17 -0300, Michael Schäfer <[EMAIL PROTECTED]> escribió: > Gabriel, > > works perfect - even in complex nested structures! > Thank you very much! > >> (If both Fortran and VB say "char*9", why did you choose a pointer >> here?) > I do not know this possibility. Could y

Re: Reproducing a web page and add own content to it.

2008-04-08 Thread LaundroMat
On Apr 8, 4:11 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > LaundroMat wrote: > > On Apr 8, 2:04 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> LaundroMat wrote: > >>> Hi - > >>> I'm working on a Django powered site where one of the required > >>> functionalities is the possibility of disp

Re: calling variable function name ?

2008-04-08 Thread Arnaud Delobelle
On Apr 8, 8:52 pm, TkNeo <[EMAIL PROTECTED]> wrote: > I don't know the exact terminology in python, but this is something i > am trying to do > > i have 3 functions lets say > FA(param1,param2) > FB(param1,param2) > FC(param1,param2) > > temp = "B" #something entered by user. now i want to call FB.

Re: Running a python code periodically

2008-04-08 Thread Larry Bates
paul wrote: > Maryam Saeedi schrieb: >> Hi, >> >> I was wondering if you know how can I run a python code once every five >> minutes for a period of time either using python or some other program >> like >> a bash script. > > See the sched module in the standard library or here: > http://pypi.pyt

Coping with cyclic imports

2008-04-08 Thread Torsten Bronger
Hallöchen! I have a rather fat module that represents a document parser -- inline elements, block elements, and the like. Now I want to split it into many modules to make everything more manageable. But at the moment I don't see how to avoid cyclic imports: A document element A, which is repres

new user needs help!

2008-04-08 Thread drjekil
I am totally new in biopython and its my first program.so may be i am asking stupid question. I am working with a text filelooks like this: #NAME AA TOPO ACCESS DSSP STRIDE Z-COORD 1lghB A i 79.8 H H -24.58 1lghB V i 79.6 H H -22.06 1lghB H i 71.9 H H -19.94 i need to compare those lines which has

new user needs help!

2008-04-08 Thread drjekil
I am totally new in biopython and its my first program.so may be i am asking stupid question. I am working with a text filelooks like this: #NAME AA TOPO ACCESS DSSP STRIDE Z-COORD 1lghB A i 79.8 H H -24.58 1lghB V i 79.6 H H -22.06 1lghB H i 71.9 H H -19.94 i need to compare those lines which has

Re: list.sort(): heaviest item?

2008-04-08 Thread Raymond Hettinger
On Apr 8, 8:15 am, "Steven Clark" <[EMAIL PROTECTED]> wrote: > If I have a list of items of mixed type, can I put something into it > such that after a list.sort(), is guaranteed to be at the end of the > list? Since the other guys gave you the real answer, how about this: sentinel = object() myl

CPython VM & byte code resources wanted

2008-04-08 Thread Aaron Gray
Hi, I am looking to study the CPython source code, but I cannot seem to find the VM code. Also is there any where a detailed list of the opcodes ? Many thanks in advance, Aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: CPython VM & byte code resources wanted

2008-04-08 Thread Arnaud Delobelle
On Apr 8, 9:29 pm, "Aaron Gray" <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking to study the CPython source code, but I cannot seem to find the > VM code. > Also is there any where a detailed  list of the opcodes ? > > Many thanks in advance, > > Aaron Bytecodes: http://docs.python.org/lib/bytec

RE: Running a python code periodically

2008-04-08 Thread Stephen Cattaneo
If your on a *NIX just use cron. Execute 'crontab -e' edit the file as desired and save see man crontab for formatting. Cheers, Steve From: Maryam Saeedi [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 08, 2008 10:54 AM To: python-list@python.

  1   2   >