On 12/13/07, Caleb Marcus <[EMAIL PROTECTED]> wrote:
>
> I'm writing something that has to invoke an external program, and every
> time the external program prints something, update a UI. How would I go
> about doing this?
>
Use sys.popen or pexpect module.
With pexpect you can even use single th
Yansky <[EMAIL PROTECTED]> wrote:
>
>Got a quick n00b question. What's the difference between del and
>remove?
It would have been easier to answer if you had given a little context.
"del" is a Python statement that removes a name from a namespace, an item
from a dictionary, or an item from a list
[EMAIL PROTECTED] wrote:
>
>I'm trying to write a program that will find the distance between two
>groups of points in space, which have cartesian co-ordinates X,Y and
>Z.
>
>I need to find the distances between each point in one group and every
>point in the other group. So if group 1 has 6 points
On Dec 13, 3:33 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 12 Dec 2007 19:18:20 -0800, rishiyoor wrote:
> > I'm trying to write a program that will find the distance between two
> > groups of points in space, which have cartesian co-ordinates X,Y and Z.
>
> points1
On Dec 12, 7:03 pm, Paul Rudin <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
> > On Dec 12, 5:51 pm, Paul Rudin <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] writes:
> >> > I don't understand what I don't understand in the following:
>
> >> I haven't tried to understand what your code
On Thu, 13 Dec 2007 00:39:55 -0800, John Machin wrote:
> X, Y, umm, aren't we short a dimension?
I'm not going to do *everything* for the OP. He can extend it to three
dimensions.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
hi..
i'm trying to insert value into list according to the key (ASCII) that i
generate..
example :
win = 95, so must insert into list[95]
and = 70, so must insert into list[70]
this is my coding..
__
list = []
try:
conn = MySQLdb
Traceback (most recent call last):
File "C:\Python25\empire\Empire Strategy.pyw", line 322
Maty = Searched(number)
TypeError: 'list' object is not callable
My list is NewMap1 =[0,0,0,0,0,0,2,0,2,2,3,2,0,0,0,0]
so Maty Searched(number is supposed to give me 0 when
Search = "NewMap"
katie smith wrote:
> Traceback (most recent call last):
> File "C:\Python25\empire\Empire Strategy.pyw", line 322
> Maty = Searched(number)
> TypeError: 'list' object is not callable
>
> My list is NewMap1 =[0,0,0,0,0,0,2,0,2,2,3,2,0,0,0,0]
>
> so Maty Searched(number is supposed to give
Doug Morse a écrit :
top-post corrected
But here's my problem,
most of my coworkers, when they see my apps and learn that they are
written in Python ask questions like, "Why would you write that in a
scripting language?" Whenever I hear a comment like that I can feel
mys
Terry Reedy a écrit :
> "Ron Provost" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> But here's my problem, most of my coworkers, when they see my apps and
> learn that they are written in Python ask questions like, "Why would you
> write that in a scripting language?"
Then as
Hi all,
I've been searching the docs like mad and I'm a little new to python
so apologies if this is a basic question.
I would like to extract the results of the following query into a list
- SELECT columnname FROM tablename. I use the following code.
# Create a connection object and create a cu
Bruno Desthuilliers wrote:
> As far as I'm concerned, anyone (I mean, anyone pretending to be a
> programmer) being ignorant enough to ask such a question ranks high in
> my bozo list. Don't waste time with bozos.
Alan Kay said it well enough without using words like "pretending",
"ignorant"
(Answering to Katie Smith)
> katie smith wrote:
>> Traceback (most recent call last):
>> File "C:\Python25\empire\Empire Strategy.pyw", line 322
>> Maty = Searched(number)
>> TypeError: 'list' object is not callable
And which is line 322 ?
>> My list is NewMap1 =[0,0,0,0,0,0,2,0,2,2,3,2,0,0
Marco Mariani a écrit :
> Bruno Desthuilliers wrote:
>
>> As far as I'm concerned, anyone (I mean, anyone pretending to be a
>> programmer) being ignorant enough to ask such a question ranks high in
>> my bozo list. Don't waste time with bozos.
>
>
> Alan Kay said it well enough without using
On Dec 13, 9:03 pm, [EMAIL PROTECTED] wrote:
> Hi all,
>
> I've been searching the docs like mad and I'm a little new to python
> so apologies if this is a basic question.
>
> I would like to extract the results of the following query into a list
> - SELECT columnname FROM tablename. I use the foll
On Dec 13, 2007 4:57 AM, katie smith <[EMAIL PROTECTED]> wrote:
> Traceback (most recent call last):
> File "C:\Python25\empire\Empire Strategy.pyw", line 322
> Maty = Searched(number)
> TypeError: 'list' object is not callable
>
This is the error message. The first line basically says "Thi
Very beautiful girls and many useful resources and more,please check
it out
http://groups.google.com/group/all-good-things/web/beautiful-girls-and-ladies
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 10:40 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 13, 9:03 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > Hi all,
>
> > I've been searching the docs like mad and I'm a little new to python
> > so apologies if this is a basic question.
>
> > I would like to extract the results of the foll
sturlamolden a écrit :
> On 12 Des, 17:00, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
>> Python has not become what it is, and achieved the success it has,
>> because a bunch of people really wanted to use Lisp but didn't think
>> other people could handle it.
>>
>> The goal of these sorts of dis
Hi All,
I connected to a FireBird 1.5 database this way:
import kinterbasdb
kinterbasdb.init(type_conv=200) # See
http://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mxdatetime_required
Then I try to update the database:
sql = "UPDATE TABLE1 SET DATEFIELD=? where ID = ?"
para
I am having a object tuple created at application startup. This tuple
I pass on to a python function in call to:
PyObject_CallObject(pcatInfo->pPyEvalFunction,pTuple);
For setting the values in this tuple, I am using PyLong_FromLong,
PyString_FromString & friends functions.
PyTuple_SetItem(pTu
On Wed, 12 Dec 2007 09:46:09 -0600, Chris Mellon wrote:
> I agree that it's fundamental, but I'd like to mention that I've
> written
> many thousands of lines of Python code, from throwaway code for
> demonstration to enterprisey servers and all sorts of things in
> between
> and I've *never*
On Dec 11, 2007 4:06 PM, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
> However, did you have an specific need for a do-while construct?
> Perhaps we could show you the alternatives.
I have wanted do-while loops in exactly one kind of algorithms, when
you generate something and you have to keep tryin
vineeth wrote:
> Hello all,
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "bytes read ", len(data)
> ---
>
> But t
Thanks for the clarification guys. :)
On Dec 13, 7:05 pm, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Yansky <[EMAIL PROTECTED]> wrote:
>
> >Got a quick n00b question. What's the difference between del and
> >remove?
>
> It would have been easier to answer if you had given a little context.
>
> "del"
Hello all,
I have come across a weird problem, I need to determine the amount
of bytes read from a file, but couldn't figure it out ,
My program does this :
__
file = open("somefile")
data = file.read()
print "bytes read ", len(data)
---
But the bytes read is not being printed cor
On Dec 13, 11:04 pm, vineeth <[EMAIL PROTECTED]> wrote:
> Hello all,
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "by
On Dec 13, 5:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> vineeth wrote:
> > Hello all,
> >I have come across a weird problem, I need to determine the amount
> > of bytes read from a file, but couldn't figure it out ,
> >My program does this :
> > __
> >file = open("somefile")
Hi all
I'm becoming mad, because I can't see what's wrong:
I am constructing a GUI, to plot some data.
so let's have a look of what's wrong:
in my code I have a variable named choice[i].current which is the
current selection of the i-th Listbox object. it is a tuple, with one
element.
so when
vineeth wrote:
> parser.add_option("-b", "--bytes", dest="bytes")
This is an aside, but if you pass 'type="int"' to add_option, optparse
will automatically convert it to an int, and (I think), give a more
useful error message on failure.
--
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 5:27 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 13 Dec 2007 04:04:59 -0800, vineeth wrote:
> >I have come across a weird problem, I need to determine the amount
> > of bytes read from a file, but couldn't figure it out ,
> >My program does this :
> > __
> >
Hi!
I am writing a text to XML parser that as to be easily extensible (via
new text format plug-ins) and modifiable if the XML format used changes.
Since the text order does not match the XML document order I have to use
a package that allows DOM-like handling of XML (elementtree for
instance)
On Dec 13, 3:56 am, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Paul Boddie wrote:
> > Then you haven't been reading the right IRC channel recently. ;-)
>
> What's the right channel? I'm on #python and #python-dev
But where are people who might know Psyco likely to hang out? ;-)
Anyway, it remai
On Dec 13, 7:45 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I connected to a FireBird 1.5 database this way:
>
> import kinterbasdb
> kinterbasdb.init(type_conv=200) #
> Seehttp://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mx...
>
> Then I try to update the database
On Thu, 13 Dec 2007 04:04:59 -0800, vineeth wrote:
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "bytes read ", len(d
On Dec 13, 11:04 pm, vineeth <[EMAIL PROTECTED]> wrote:
> Hello all,
>I have come across a weird problem, I need to determine the amount
> of bytes read from a file, but couldn't figure it out ,
>My program does this :
> __
>file = open("somefile")
>data = file.read()
>print "by
On Dec 13, 9:29 am, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
> Merrigan wrote:
> > I am writing a script to administer my E-Mail Server. The One thing
> > I'm currently struggling with is kind of Parsing the E-Mail adress
> > that I supply to the script.
>
> > I need to get the username (The part B
Merrigan wrote:
> Hi Matt,
>
> Thank you very much for the help. It was exactly what I was looking
> for, and made my script much safer and easier to use.
>
> Blessings!
>
> -- Merrigan
You're welcome. :-)
--
--
http://mail.python.org/mailman/listinfo/python-list
igor:
> The fundamental difference is that in C++, I create a single object (a
> line buffer) that's reused for each input line and column values are
> extracted straight from that buffer without creating new string
> objects. In python, new objects must be created and destroyed by the
> million wh
DarkBlue írta:
> On Dec 13, 7:45 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
>
>> Hi All,
>>
>> I connected to a FireBird 1.5 database this way:
>>
>> import kinterbasdb
>> kinterbasdb.init(type_conv=200) #
>> Seehttp://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mx...
>>
>> Th
Xavier Barthelemy wrote:
> so when I call another array with these indices
> ArrayWithData[i,int(choice[i].current[0])]
You don't "call" "arrays" "with indices". You are indexing the list
ArrayWithData using the index "i,int(blah)" which is invalid.
Indices must be integers, not comma seperated v
Xavier Barthelemy a écrit :
> Hi all
>
> I'm becoming mad, because I can't see what's wrong:
>
> I am constructing a GUI, to plot some data.
> so let's have a look of what's wrong:
>
>
>
> in my code I have a variable named choice[i].current which is the
> current selection of the i-th Listbox
By the way, I copied this 2006-10 clp issue into Bugs.python.org. --
Pat LaVarre
""" http://bugs.python.org/issue1611
TITLE: doctest.testmod gets noisy if called more than once per
SystemExit
SUMMARY:
Calling doctest.testmod more than once before SystemExit spews stderr
messages such as "*** Do
On Dec 13, 12:12 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Wed, 12 Dec 2007 16:02:35 -0800 (PST), [EMAIL PROTECTED] declaimed
> the following in comp.lang.python:
>
>
>
> > Thanks Duncan and John! That makes sense. But why does the official
> > Python docs show an example that seems to
On Dec 13, 1:54 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
> >I'll have to refactor my code somewhat to force it to use the '-MM-
> >DD' format.
>
> Another possible solution is to use a real database.
I am using a "real" database: MS SQL Server 2000. Unfortunat
> Sent: 2006-11-09; To: comp.lang.python
>
> Can doctest ... be persuaded to exit after a catastroph[e]...?
> ...
> sys.exit() doesn't do what I mean:
> it raises SystemExit ... [and doesn't exit]
> ...
> doctest.REPORT_ONLY_FIRST_FAILURE doesn't do what I mean
> [it filters stdout but doesn't exit
A couple potential optimizations:
>
> # create the member variable name.
> mem_var_name = options.inputfilename
> mem_var_name = mem_var_name.replace(' ','_')
> mem_var_name = mem_var_name.replace('.','_')
>
mem_var_name = options.inputfilename.replace(' ','_').replace('.','_')
No need to assign
On Dec 12, 11:33 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 12 Dec 2007 19:18:20 -0800, rishiyoor wrote:
> > I'm trying to write a program that will find the distance between two
> > groups of points in space, which have cartesian co-ordinates X,Y and Z.
>
> > I nee
Hi Paul,
I am cross posting the same to grab your attention at pyparsing forums
too. 1000 apologies on the same count!
I am a complete newbie to parsing and totally new to pyparsing.
I have adapted your code to store the line numbers as below.
Surprisingly, the line numbers printed, when I scrap
Hi Paul,
I am cross posting the same to grab your attention at pyparsing forums
too. 1000 apologies on the same count!
I am a complete newbie to parsing and totally new to pyparsing.
I have adapted your code to store the line numbers as below.
Surprisingly, the line numbers printed, when I s
On 2007-12-13, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Dec 12, 4:03 pm, John Machin <[EMAIL PROTECTED]> wrote:
>> Inside your function
>> [you are doing all this inside a function, not at global level in a
>> script, aren't you?], do this:
>> from time import mktime, strptime # do thi
On 2007-12-12, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 13, 12:58 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>> On 2007-12-12, John Machin <[EMAIL PROTECTED]> wrote:
>>
>> >> It's clear that I am thinking to completely different usages
>> >> for CSV than what most people in this thread. I u
>> Kinterbasdb probably expects the format looking like
>>
>> month/day/year
>>
>> rather than
>>
>> year-month-day
>>
All right, I tried the month/day/year version:
print sql
print params
cur.execute(sql,params)
Results in:
Inserting new TTT codes...insert into ttt(
ID,
T
Neil Cerutti a écrit :
> On 2007-12-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> I have repeatedly argued in the past that we do ourselves a
>> disservice by describing Python as an interpreted language.
>>
>> Python is compiled. It has a compiler. It even has a built-in
>> function "compile".
On Thu, 13 Dec 2007 06:51:23 -0800, rishiyoor wrote:
> When you say python automatically allocates memory, what would you do
> if you don't know the size of the list of, say for example, the
> nearest pairs between the two groups. I would probably iterate over
> all the pairs and create a new list
*Gabriel thanks for detailed info!
Actually I have already went the same (only more limited :) way as you
suggested and did some poking with dir() at datetime and timedelta objects.
This time I have bumped into the following problems that I can't find ready
solutions yet:
Subtracting of datetime
On 2007-12-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> I have repeatedly argued in the past that we do ourselves a
> disservice by describing Python as an interpreted language.
>
> Python is compiled. It has a compiler. It even has a built-in
> function "compile". It's just not compiled to *ma
On 2007-12-13, Dotan Cohen <[EMAIL PROTECTED]> wrote:
> On 13/12/2007, Tim Chase <[EMAIL PROTECTED]> wrote:
>> >> Oof! Fond as I am of promoting pyparsing, writing a Pascal
>> >> compiler (or even just syntax checker) is not a job I would
>> >> tackle lightly, much less suggest to a new Python
The OP was not talking about a Python program to check the Pascal
program as I read it
> to make application in python
> that would send code (text) to pascal compiler...and it would return
> result and then application would show that result.
So he/she/it would want subprocess to compile the Pas
Russell <[EMAIL PROTECTED]> wrote:
> I've searched the Language
> Reference and was not able to find any info regarding the structure of
> this code fragment:
>
> int(text) if text.isdigit() else text
http://docs.python.org/whatsnew/pep-308.html
--
http://mail.python.org/mailman/listinfo/pytho
On Dec 13, 9:01 am, Ramdas <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> I am cross posting the same to grab your attention at pyparsing forums
> too. 1000 apologies on the same count!
>
> I am a complete newbie to parsing and totally new to pyparsing.
>
> I have adapted your code to store the line num
On Dec 13, 2007 4:39 PM, Russell <[EMAIL PROTECTED]> wrote:
> I've been learning Python slowly for a few months, coming from a C/C+
> +, C#, Java, PHP background. I ran across a code fragment I'm having
> trouble wrapping my brain around. I've searched the Language
> Reference and was not able t
Neil Cerutti <[EMAIL PROTECTED]> writes:
> On 2007-12-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> I have repeatedly argued in the past that we do ourselves a
>> disservice by describing Python as an interpreted language.
>>
>> Python is compiled. It has a compiler. It even has a built-in
>>
[EMAIL PROTECTED] a écrit :
> On Dec 12, 11:33 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
(snip)
>
> When you say python automatically allocates memory, what would you do
> if you don't know the size of the list
thelist = []
thelist.append('Ever')
thelist.append('bothered
On Dec 11, 3:08 pm, [EMAIL PROTECTED] wrote:
> On 11 Dez, 22:02, [EMAIL PROTECTED] wrote:
>
> > Ok. This is small code.
>
> > The problem is '2' != 2 there is a way of converting 'some number' in
> > number ?
>
> > Thanks.
>
> > # -*- coding: cp1252 -*-
> > import random
> > import csv
> > import s
On 2007-12-13, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Neil Cerutti a écrit :
>> On 2007-12-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>> I have repeatedly argued in the past that we do ourselves a
>>> disservice by describing Python as an interpreted language.
>>>
>>> Python is compi
I've been learning Python slowly for a few months, coming from a C/C+
+, C#, Java, PHP background. I ran across a code fragment I'm having
trouble wrapping my brain around. I've searched the Language
Reference and was not able to find any info regarding the structure of
this code fragment:
int(t
Laszlo Nagy wrote:
>
> Hi All,
>
> I connected to a FireBird 1.5 database this way:
>
> import kinterbasdb
> kinterbasdb.init(type_conv=200) # See
> http://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mxdatetime_required
>
>
> Then I try to update the database:
>
> sql = "UPDA
I suspected it was a ternary type of operator, but was unable to
confirm it. And I didn't realize it was new to 2.5. Perfectly clear
now. :)
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Dec 13, 2007 at 04:57:04PM +0100, Remco Gerlich wrote regarding Re:
Question from a python newbie:
>
>On Dec 13, 2007 4:39 PM, Russell <[EMAIL PROTECTED]> wrote:
>
> I've been learning Python slowly for a few months, coming from a
> C/C+
> +, C#, Java, PHP background.
hello,
I've large program based, with a GUI based on wxPython,
where the user can add small parts, which I call Bricks.
A new Brick is created by inheriting from the standard-Brick.
The user should only override 1 or 2 functions from the standard-Brick.
The main properties used in those 2 function
This doesn't seem to work in a dos terminal at the start of a script:
from os import popen
print popen('clear').read()
Any idea why not? Thanks.
Stephen
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 10:24 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 13 Dec 2007 06:51:23 -0800, rishiyoor wrote:
> > When you say python automatically allocates memory, what would you do
> > if you don't know the size of the list of, say for example, the
> > nearest pairs between the
Stef Mientki wrote:
> hello,
>
> I've large program based, with a GUI based on wxPython,
> where the user can add small parts, which I call Bricks.
> A new Brick is created by inheriting from the standard-Brick.
> The user should only override 1 or 2 functions from the standard-Brick.
> The main
While looking for ready to use library I have roughly skteched the functions
that I need:
import datetime
from datetime import *
def timedelta2Micros(dt):
""" Convert timedelta object to micriseconds"""
days = dt.days
sec = dt.seconds
micros = dt.microseconds
daysSec = 24 * 60
I always recommend the subprocess module for any needs like this.
Read up on it and it should provide everything you need.
On Dec 13, 2007, at 2:41 AM, Caleb Marcus wrote:
> I'm writing something that has to invoke an external program, and
> every time the external program prints something, u
On Dec 12, 2007, at 10:57 PM, katie smith wrote:
Traceback (most recent call last):
File "C:\Python25\empire\Empire Strategy.pyw", line 322
Maty = Searched(number)
Look, you're calling Searched right here with Searched(number)
TypeError: 'list' object is not callable
...
Maty
On Dec 13, 2007 10:48 AM, Stephen_B <[EMAIL PROTECTED]> wrote:
> This doesn't seem to work in a dos terminal at the start of a script:
>
> from os import popen
> print popen('clear').read()
>
> Any idea why not? Thanks.
It opens "clear" with it's own virtual terminal and clears that
instead. Ther
On Dec 13, 11:21 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> It opens "clear" with it's own virtual terminal and clears that
> instead.
Even when I launch the script from a cmd shell with "python
myscript.py"?
> There's an ANSI control code you can use to reset the screen, try printing
> tha
hi
i have written some python scripts which take command line arguments
and do some job. i would like to make it into a .exe using py2exe and
distribute it with innosetup.. befor that i would like to add some GUI
support..i mean select some values using a folder explorer etc..which
would be a good
Using any GUI package you should be able to build your application into EXE
format!
On Dec 13, 2007 6:46 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hi
> i have written some python scripts which take command line arguments
> and do some job. i would like to make it into a .exe using py2exe
> > > > Kay Schluehr wrote:
> > > > Python 2.6 and 3.0 have a more Pythonic way for the problem:
> > > > class A(object):
> > > > @property
> > > > def foo(self):
> > > > return self._foo
> > > > @foo.setter
> > > > def foo(self, value)
> > > > self._foo = value
> >
Thank you all. I explain what I did to do it. Very simple but what I
want:
I find the host id of system (using ipconfig) and create a hash code
based on it.(some math, md5 and functions).
the code for licensing is about 15 lines and is very fast. I needed 20
licenses and I wrote a keygen for mysel
First, let me admit that the test is pretty dumb (someone else
suggested it :) but since I am new to Python, I am using it to learn
how to write efficient code.
my $sum = 0;
foreach (1..10) {
my $str = chr(rand(128)) x 1024;
foreach (1..100) {
my $substr = substr($str, rand(900
On Dec 13, 2007 12:04 PM, Patrick Mullen <[EMAIL PROTECTED]> wrote:
> > > > > Kay Schluehr wrote:
> > > > > Python 2.6 and 3.0 have a more Pythonic way for the problem:
> > > > > class A(object):
> > > > > @property
> > > > > def foo(self):
> > > > > return self._foo
> > > > > @
On 13 Des, 02:19, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I have repeatedly argued in the past that we do ourselves a disservice by
> describing Python as an interpreted language. Python is compiled. It has
> a compiler. It even has a built-in function "compile".
Python is
En Thu, 13 Dec 2007 14:07:10 -0300, Dmitri O.Kondratiev
<[EMAIL PROTECTED]> escribi�:
> While looking for ready to use library I have roughly skteched the
> functions
> that I need:
They look fine to me. Just one thing:
> days = micros / oneDayMicros # whole number of days
It's safer to
En Wed, 12 Dec 2007 20:12:43 -0300, Object01 <[EMAIL PROTECTED]> escribi�:
> I don't know much about the timing of Python's garbage collection. Is
> it pretty aggressive?
As soon as the reference count reaches zero (at least for current CPython
version). Objects that are part of a reference cy
This site helped me during the holidays.Check out
http://www.christmasplayland.com
which offers some great resources and tons of deals.I definitely saved
time shopping for deals online at this site.
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 2007 12:11 PM, <[EMAIL PROTECTED]> wrote:
> First, let me admit that the test is pretty dumb (someone else
> suggested it :) but since I am new to Python, I am using it to learn
> how to write efficient code.
>
> my $sum = 0;
> foreach (1..10) {
> my $str = chr(rand(128)) x 1024
On Dec 14, 3:48 am, Stephen_B <[EMAIL PROTECTED]> wrote:
> This doesn't seem to work in a dos terminal at the start of a script:
>
> from os import popen
> print popen('clear').read()
>
> Any idea why not? Thanks.
Maybe you are using a different "dos terminal". What is "clear"?
C:\junk>clear
'cle
On Dec 14, 2:29 am, Bruno Desthuilliers While you're at it, add list
comprehensions,
> iterators/generators and itertools to the list (pun intented).
>
'Intented' is a novel word; is it the opposite of 'decamped'?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to a lot of help, I've got the outer framework for my tokenizer
down to this:
for line_number, line in enumerate(text):
output = ''
for char_number, char in enumerate(line):
output += char
print 'At ' + str(line_number) + ', '+ str(char_number) + ':
On Dec 13, 6:11 pm, [EMAIL PROTECTED] wrote:
> from random import randrange
> from itertools import imap, repeat
> from operator import getitem, add, getslice
>
> result = 0
> zeros = [0]*100
> for i in xrange (10):
> s = [chr(randrange(128))] * 1024
> starts = repeat(randrange(900), 1
Hi, this is actually goes to whoever is using Eclipse and Eric4, the
IDE that comes bundled with PyQt.
I was using Eclipse until i saw Eric4 and i started experiment with
it, very nice work.
Eric4 has a feature that actually reminds us the work of some
expensive IDEs, like Visual Studio, Delphi an
Hello,
I've been using the
Python-based Karrigell web application framework. It has the very handy
word "include" that inserts a code file into into the stream of
execution. E.g. if myFile.py contains the code:
print "This is a message from myFile.py"
and my script is:
print "Something"
include
> In Eclipse, i have the luxury of double-click a .ui file and thus Qt
> Designer opens and then design my forms there, but i cannot fing an
> automatic way to accomplish the thing that eric4 does: e.x.
> automatically compile changed .ui files when i hit F9. And it really a
> loss of time to go to
En Thu, 13 Dec 2007 08:50:09 -0300, grbgooglefan <[EMAIL PROTECTED]>
escribi�:
> I am having a object tuple created at application startup. This tuple
> I pass on to a python function in call to:
> PyObject_CallObject(pcatInfo->pPyEvalFunction,pTuple);
>
> For setting the values in this tuple, I
farsheed <[EMAIL PROTECTED]> writes:
> the code for licensing is about 15 lines and is very fast. I needed
> 20 licenses and I wrote a keygen for myself.
Given that you still haven't explained what threat in particular
you're securing against, I wonder whether "very fast" is the only
criterion. I
1 - 100 of 159 matches
Mail list logo