On Thursday, September 6, 2012 7:05:39 PM UTC-7, Terry Reedy wrote:
> On 9/6/2012 8:55 PM, ruck wrote:
>
> > (This with Python 2.7.2 on Windows 7)
>
> >
>
> > os.stat() won't recognize a filename ending in period.
>
> > It will ignore trailing periods.
>
> > If you ask it about file 'goo...' i
rusi writes:
> On an 8086/8088 a MUL (multiply) instruction was of the order of 100
> clocks ... On most modern processors (after the pentium) the
> difference has mostly vanished. I cant find a good data sheet to
> quote though
See http://www.agner.org/optimize/ :
4. Instruction tables: L
On Thu, 06 Sep 2012 06:07:38 -0400, Dave Angel wrote:
> On 09/06/2012 04:33 AM, Steven D'Aprano wrote:
>>
>>
>> I may have been overly-conservative earlier when I said that on average
>> string equality has to compare half the characters. I thought I had
>> remembered that from a computer science
On Fri, 07 Sep 2012 00:39:33 +1000, Chris Angelico wrote:
> On Thu, Sep 6, 2012 at 11:37 PM, Johannes Bauer
> wrote:
>> Not in my original post. If you read it again, you will clearly see
>> that I was talking about purely random strings. And since you like to
>> nitpick, I'll clarify further: I'
On Sep 7, 5:01 am, jimbo1qaz wrote:
> Is it faster to use bitshifts or floor division? And which is better, & or %?
> All divisors and mods are power of 2, so are binary operations faster? And
> are they considered bad style?
On an 8086/8088 a MUL (multiply) instruction was of the order of 100
c
On Thu, Sep 6, 2012 at 6:55 PM, ruck wrote:
> (This with Python 2.7.2 on Windows 7)
>
> os.stat() won't recognize a filename ending in period.
> It will ignore trailing periods.
> If you ask it about file 'goo...' it will report on file 'goo'
> And if 'goo' doesn't exist, os.stat will complain.
D
On Thursday, September 6, 2012 6:49:43 PM UTC-7, alex23 wrote:
> On Sep 7, 10:55 am, ruck wrote:
>
> > (This with Python 2.7.2 on Windows 7)
>
> > rename goo to "goo...", then,
>
>
>
> I'm unable to rename any file to have a '...' suffix, are you certain
>
> the file exists in the form you t
On Thu, 06 Sep 2012 17:55:02 -0700, ruck wrote:
> (This with Python 2.7.2 on Windows 7)
>
> os.stat() won't recognize a filename ending in period. It will ignore
> trailing periods.
> If you ask it about file 'goo...' it will report on file 'goo' And if
> 'goo' doesn't exist, os.stat will complai
On Thu, 06 Sep 2012 18:30:48 -0700, jimbo1qaz wrote:
> OK, I decided to change my code. Which raises a similar question: Which
> one is better for setting a bit of a byte: |= or +=, assuming each will
> only be run once? Intuitively, I think |=
Python (like most languages) doesn't have a "set thi
On 9/6/2012 3:44 PM, Thomas Jollans wrote:
On 09/06/2012 09:27 PM, John Nagle wrote:
In Python 2.7:
I want to parse standard ISO date/time strings such as
2012-09-09T18:00:00-07:00
into Python "datetime" objects. The "datetime" object offers
an output method , datetimeobj.isoform
On 9/6/2012 8:55 PM, ruck wrote:
(This with Python 2.7.2 on Windows 7)
os.stat() won't recognize a filename ending in period.
It will ignore trailing periods.
If you ask it about file 'goo...' it will report on file 'goo'
And if 'goo' doesn't exist, os.stat will complain.
create file goo, then
On Thu, 06 Sep 2012 17:01:12 -0700, jimbo1qaz wrote:
> Is it faster to use bitshifts or floor division?
Does it matter?
If you ever find yourself writing an application where the difference
between 0.0476 microseconds and 0.0473 microseconds matters to you,
Python is probably the wrong langua
On 9/6/2012 8:01 PM, jimbo1qaz wrote:
Is it faster to use bitshifts or floor division? And which is better,
& or %? All divisors and mods are power of 2, so are binary
operations faster? And are they considered bad style?
Yes, meaningless, yes, and no.
I would do what seems sensible to you in t
On Thursday, September 6, 2012 6:19:11 PM UTC-7, Dave Angel wrote:
> On 09/06/2012 08:55 PM, ruck wrote:
>
> > (This with Python 2.7.2 on Windows 7)
>
> >
>
> > os.stat() won't recognize a filename ending in period.
>
> > It will ignore trailing periods.
>
> > If you ask it about file 'goo..
On Sep 7, 10:55 am, ruck wrote:
> (This with Python 2.7.2 on Windows 7)
> rename goo to "goo...", then,
I'm unable to rename any file to have a '...' suffix, are you certain
the file exists in the form you think after the rename?
--
http://mail.python.org/mailman/listinfo/python-list
On 09/06/2012 09:30 PM, jimbo1qaz wrote:
> On Thursday, September 6, 2012 5:01:12 PM UTC-7, jimbo1qaz wrote:
>> Is it faster to use bitshifts or floor division? And which is better, & or %?
>>
>> All divisors and mods are power of 2, so are binary operations faster? And
>> are they considered bad
Terry Reedy wrote:
[snip]
> IDLE is not the interpreter.
Fine, I meant shell. Thanks for fixing that for me.
> The IDLE Shell is intended mainly for single-line inputs.
Maybe it should be limited to that, then. That way stoopid noobs like
me don't use it wrong and then use the wrong nomencla
On 09/06/2012 08:01 PM, jimbo1qaz wrote:
> Is it faster to use bitshifts or floor division?
Yes, and yes. Without doing any measurement, I'd expect that in
CPython, it makes negligible performance difference for ordinary ints
(under 2**31, more or less). Ordinary ints can be done with single
inst
On Thursday, September 6, 2012 5:01:12 PM UTC-7, jimbo1qaz wrote:
> Is it faster to use bitshifts or floor division? And which is better, & or %?
>
> All divisors and mods are power of 2, so are binary operations faster? And
> are they considered bad style?
OK, I decided to change my code. Which
On Thu, Sep 6, 2012 at 8:55 PM, ruck wrote:
> (This with Python 2.7.2 on Windows 7)
>
> os.stat() won't recognize a filename ending in period.
> It will ignore trailing periods.
> If you ask it about file 'goo...' it will report on file 'goo'
> And if 'goo' doesn't exist, os.stat will complain.
>
On 09/06/2012 08:55 PM, ruck wrote:
> (This with Python 2.7.2 on Windows 7)
>
> os.stat() won't recognize a filename ending in period.
> It will ignore trailing periods.
> If you ask it about file 'goo...' it will report on file 'goo'
> And if 'goo' doesn't exist, os.stat will complain.
>
> creat
On 07Sep2012 01:30, Mark Lawrence wrote:
| On 07/09/2012 01:01, jimbo1qaz wrote:
| > Is it faster to use bitshifts or floor division? And which is better, & or
%?
| > All divisors and mods are power of 2, so are binary operations faster? And
are they considered bad style?
|
| Why don't you use
On 07/09/2012 01:21, contro opinion wrote:
i eidt a file and save it in gbk encode named test. my system is
:debian,locale,en.utf-8;python2.6,locale,utf-8.
你
in terminal i input:
xxd test
000: 3c68 746d 6c3e 0a3c 703e c4e3 3c2f 703e ...
010: 0a3c 2f68 746d 6c3e 0a
On Thursday, September 6, 2012 5:30:05 PM UTC-7, Mark Lawrence wrote:
> On 07/09/2012 01:01, jimbo1qaz wrote:
>
> > Is it faster to use bitshifts or floor division? And which is better, & or
> > %?
>
> > All divisors and mods are power of 2, so are binary operations faster? And
> > are they con
(This with Python 2.7.2 on Windows 7)
os.stat() won't recognize a filename ending in period.
It will ignore trailing periods.
If you ask it about file 'goo...' it will report on file 'goo'
And if 'goo' doesn't exist, os.stat will complain.
create file goo, then
>>> os.stat('goo')
nt.st
On 07/09/2012 01:01, jimbo1qaz wrote:
Is it faster to use bitshifts or floor division? And which is better, & or %?
All divisors and mods are power of 2, so are binary operations faster? And are
they considered bad style?
Why don't you use the timeit module and find out for yourself?
--
Chee
i eidt a file and save it in gbk encode named test. my system is
:debian,locale,en.utf-8;python2.6,locale,utf-8.
你
in terminal i input:
xxd test
000: 3c68 746d 6c3e 0a3c 703e c4e3 3c2f 703e ...
010: 0a3c 2f68 746d 6c3e 0a ..
你 is you in english,
"\xc4\xe3" is the
Is it faster to use bitshifts or floor division? And which is better, & or %?
All divisors and mods are power of 2, so are binary operations faster? And are
they considered bad style?
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Sep 6, 2012 at 6:12 PM, wrote:
> Does anyone know why this is? I cannot find anything via Google about
> this, but HP says it is so. Of course it is now impossible to get
> ActiveState Python 2.5 for free. You can spend a $1000 for a copy. :)
>
> Anyway, it is irritating me that we a
In article ,
Dave Angel wrote:
> For working with datetime, see
> http://docs.python.org/library/datetime.html#datetime.datetime
>
> and look up datetime.strptime()
strptime has two problems.
One is that it's a pain to use (you have to look up all those
inscrutable %-thingies every time
In article , John Nagle
wrote:
> In Python 2.7:
>
>I want to parse standard ISO date/time strings such as
>
> 2012-09-09T18:00:00-07:00
>
> into Python "datetime" objects. The "datetime" object offers
> an output method , datetimeobj.isoformat(), but not an input
> parser. There o
I'd look also into dateutil.parser.parse and feedparser._parse_date
On Thursday, September 6, 2012 1:34:18 PM UTC-7, John Nagle wrote:
> On 9/6/2012 12:51 PM, Paul Rubin wrote:
>
> > John Nagle writes:
>
> >> There's an iso8601 module on PyPi, but it's abandoned; it hasn't been
>
> >> updated
Does anyone know why this is? I cannot find anything via Google about this,
but HP says it is so. Of course it is now impossible to get ActiveState
Python 2.5 for free. You can spend a $1000 for a copy. :)
Anyway, it is irritating me that we are starting a new automation environment
in Pyt
On Fri, Sep 7, 2012 at 12:56 AM, Tigerstyle wrote:
> I'm trying to write a module containing a function to examine the contents of
> the current working directory and print out a count of how many files have
> each extension (".txt", ".doc", etc.)
If you haven't already, look into the Python 'd
On Fri, Sep 7, 2012 at 3:30 AM, Terry Reedy wrote:
> On 9/6/2012 11:08 AM, Yves S. Garret wrote:
>
>> I'd like to know if there are any online Python classes offered
>> online from reliable institutions that you would recommend.
>
> Google 'online programming course python' for taught courses.
On 09/06/2012 04:33 PM, Dennis Lee Bieber wrote:
>
> Note that this difference mainly applies to how the processes are
> themselves are created... How the library wraps shared data is
> possibly different (I've never understood how a "fork" process can
> avoid memory conflicts if it has write acc
On 9/6/2012 12:51 PM, Paul Rubin wrote:
> John Nagle writes:
>> There's an iso8601 module on PyPi, but it's abandoned; it hasn't been
>> updated since 2007 and has many outstanding issues.
>
> Hmm, I have some code that uses ISO date/time strings and just checked
> to see how I did it, and it loo
On Thursday, September 6, 2012 4:21:56 PM UTC-4, Tim Williams wrote:
> On Thursday, September 6, 2012 11:07:07 AM UTC-4, Helpful person wrote:
>
> > I am a complete novice to Python. I wish to access a dll that has
>
> >
>
> > been written to be compatible with C and VB6. I have been told tha
Thanks, just what I was looking for :-)
T
kl. 17:20:27 UTC+2 torsdag 6. september 2012 skrev MRAB følgende:
> On 06/09/2012 15:56, Tigerstyle wrote:
>
> > Hi guys,
>
> >
>
> > I'm trying to write a module containing a function to examine the contents
> > of the current working directory and p
On Thursday, September 6, 2012 11:07:07 AM UTC-4, Helpful person wrote:
> I am a complete novice to Python. I wish to access a dll that has
>
> been written to be compatible with C and VB6. I have been told that
>
> after running Python I should enter "from ctypes import *" which
>
> allows P
> I want to re run the script at that schedule time to send me a email.
Calculate how much time until the meeting. And spawn the script that will sleep
that amount of time and then send email.
--
http://mail.python.org/mailman/listinfo/python-list
On 09/06/2012 03:27 PM, John Nagle wrote:
> In Python 2.7:
>
>I want to parse standard ISO date/time strings such as
>
> 2012-09-09T18:00:00-07:00
>
> into Python "datetime" objects. The "datetime" object offers
> an output method , datetimeobj.isoformat(), but not an input
> parser. Th
John Nagle writes:
> There's an iso8601 module on PyPi, but it's abandoned; it hasn't been
> updated since 2007 and has many outstanding issues.
Hmm, I have some code that uses ISO date/time strings and just checked
to see how I did it, and it looks like it uses iso8601-0.1.4-py2.6.egg .
I don't
On 6 September 2012 18:59, wrote:
> I want to print a series of list elements some of which may not exist,
> e.g. I have a line:-
>
> print day, fld[1], balance, fld[2]
>
> fld[2] doesn't always exist (fld is the result of a split) so the
> print fails when it isn't set.
>
What I might do i
On 09/06/2012 09:27 PM, John Nagle wrote:
> In Python 2.7:
>
>I want to parse standard ISO date/time strings such as
>
> 2012-09-09T18:00:00-07:00
>
> into Python "datetime" objects. The "datetime" object offers
> an output method , datetimeobj.isoformat(), but not an input
> parser.
On Thursday, September 6, 2012 2:53:15 PM UTC+1, Ramchandra Apte wrote:
> On Thursday, 6 September 2012 19:16:38 UTC+5:30, Dave Angel wrote:
>
> > On 09/06/2012 09:34 AM, Ramchandra Apte wrote:
>
> >
>
> > > Translator means what precisely?
>
> >
>
> >
>
> >
>
> > Examples of translator
On 9/6/2012 1:59 PM, tinn...@isbd.co.uk wrote:
I want to print a series of list elements some of which may not exist,
e.g. I have a line:-
print day, fld[1], balance, fld[2]
fld[2] doesn't always exist (fld is the result of a split) so the
print fails when it isn't set.
What fails is th
In Python 2.7:
I want to parse standard ISO date/time strings such as
2012-09-09T18:00:00-07:00
into Python "datetime" objects. The "datetime" object offers
an output method , datetimeobj.isoformat(), but not an input
parser. There ought to be
classmethod datetime.fromisofo
On 9/6/2012 10:01 AM, David Hoese wrote:
On 9/5/12 3:03 PM, Grant Edwards wrote:
On 2012-09-05, Dave Angel wrote:
>On 09/05/2012 01:47 PM, Grant Edwards wrote:
>
>>Making the site's "search" box use Google or somesuch is probably the
>>simplest solution. I'm not enough of a web guy to know ho
On 06/09/2012 15:01, David Hoese wrote:
On 9/5/12 3:03 PM, Grant Edwards wrote:
On 2012-09-05, Dave Angel wrote:
>On 09/05/2012 01:47 PM, Grant Edwards wrote:
>
>>Making the site's "search" box use Google or somesuch is probably the
>>simplest solution. I'm not enough of a web guy to know how
On 09/06/2012 01:59 PM, tinn...@isbd.co.uk wrote:
> I want to print a series of list elements some of which may not exist,
> e.g. I have a line:-
>
> print day, fld[1], balance, fld[2]
>
> fld[2] doesn't always exist (fld is the result of a split) so the
> print fails when it isn't set.
>
> I
On 9/6/2012 10:59 AM tinn...@isbd.co.uk said...
I want to print a series of list elements some of which may not exist,
e.g. I have a line:-
print day, fld[1], balance, fld[2]
fld[2] doesn't always exist (fld is the result of a split) so the
print fails when it isn't set.
I know I could s
On 9/6/2012 9:43 AM, Alex wrote:
On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
I'm new to Python and have been using IDLE 3.2.3 to experiment with
code as I learn. Despite being configured to use a 4 space
indentation width, sometimes IDLE's "smart" indentation insists
>>> upon
I want to print a series of list elements some of which may not exist,
e.g. I have a line:-
print day, fld[1], balance, fld[2]
fld[2] doesn't always exist (fld is the result of a split) so the
print fails when it isn't set.
I know I could simply use an if but ultimately there may be more
el
On 9/6/2012 11:08 AM, Yves S. Garret wrote:
I'd like to know if there are any online Python classes offered
online from reliable institutions that you would recommend.
Google 'online programming course python' for taught courses.
At least 2 of MIT's self-guided OpenCourseWare courses use P
On 06/09/2012 17:58, Jerry Hill wrote:
On Thu, Sep 6, 2012 at 12:46 PM, Helpful person wrote:
The reference might help if I could get Python to recognize the dll as
a module.
That's never going to happen. It's a DLL, not a python module. I
think the documentation lays that out pretty explic
On Sep 6, 9:58 am, Jerry Hill wrote:
What do you get if you do the following at the
> interactive interpreter?
>
> >>> from ctypes import *
> >>> print windll.
>
> --
> Jerry
I get:
, handle 41 at
2ace070>
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Sep 6, 2012 at 12:46 PM, Helpful person wrote:
> The reference might help if I could get Python to recognize the dll as
> a module.
That's never going to happen. It's a DLL, not a python module. I
think the documentation lays that out pretty explicitly. Have you
experimented with the v
On Sep 6, 8:30 am, Jerry Hill wrote:
>
> You should start by reading the ctypes documentation,
> here:http://docs.python.org/library/ctypes.html. It has a lot of examples
> that ought to get you started.
>
The reference might help if I could get Python to recognize the dll as
a module.
--
http
On Sep 6, 8:28 am, Ulrich Eckhardt
wrote:
> Am 06.09.2012 17:07, schrieb Helpful person:
>
> > I am a complete novice to Python.
>
> Welcome!
>
> > I wish to access a dll that has
> > been written to be compatible with C and VB6. I have been told that
> > after running Python I should enter "fro
Am 06.09.2012 17:07, schrieb Helpful person:
I am a complete novice to Python.
Welcome!
I wish to access a dll that has
been written to be compatible with C and VB6. I have been told that
after running Python I should enter "from ctypes import *" which
allows Python to recognize the dll str
On 09/06/2012 10:42 AM, Johannes Bauer wrote:
> On 06.09.2012 16:23, Dave Angel wrote:
>> On 09/06/2012 09:43 AM, Johannes Bauer wrote:
>>>
>>> Yes, worst-case is O(N), best case O(1). Average is O(n log n).
>> Can't see how you came up with an average of n log(n). Fourteen minutes
>> before you
On 06.09.2012 17:36, Johannes Bauer wrote:
> "pleasedumpstats" < ""
And against a XML-reading C code generator that uses mako:
strCmpEq 39670
strCmpLt 2766215
strCmpGt 2744002
strCmpTc 37430821
strCmpCc 14048656
Compared strings: 5549887
Equal: 0.7%
Average wordlength: 6.74 chars
Average compare
On Sep 6, 8:30 am, Jerry Hill wrote:
> You should start by reading the ctypes documentation,
> here:http://docs.python.org/library/ctypes.html. It has a lot of examples
> that ought to get you started.
>
> When you run into more specific problems, you're going to have to
> provide a lot more inf
FYI
My Python version is 2.5.4
--
http://mail.python.org/mailman/listinfo/python-list
On 06.09.2012 16:39, Chris Angelico wrote:
> In any case, it'll be far FAR more useful than arguing from
> totally random, or random word selection, or anything.
>
> Who's game?
Okay, patched against Python 3.2.3: http://pastebin.com/PRRN53P6
To invoke display of the stats, compare the string "
On Thu, Sep 6, 2012 at 11:07 AM, Helpful person wrote:
> I am a complete novice to Python. I wish to access a dll that has
> been written to be compatible with C and VB6. I have been told that
> after running Python I should enter "from ctypes import *" which
> allows Python to recognize the dl
On Sep 6, 2012 8:15 AM, "Helpful person" wrote:
>
> I am a complete novice to Python. I wish to access a dll that has
> been written to be compatible with C and VB6. I have been told that
> after running Python I should enter "from ctypes import *" which
> allows Python to recognize the dll str
On 06/09/2012 15:56, Tigerstyle wrote:
Hi guys,
I'm trying to write a module containing a function to examine the contents of the current working
directory and print out a count of how many files have each extension (".txt",
".doc", etc.)
This is the code so far:
--
import os
path = "v:\\wor
I am a complete novice to Python. I wish to access a dll that has
been written to be compatible with C and VB6. I have been told that
after running Python I should enter "from ctypes import *" which
allows Python to recognize the dll structure. I have placed the dll
into my active directory (if
On 06/09/12 15:56, Tigerstyle wrote:
Hi guys,
I'm trying to write a module containing a function to examine the contents of the current working
directory and print out a count of how many files have each extension (".txt",
".doc", etc.)
This is the code so far:
--
import os
path = "v:\\wo
Hi guys,
I'm trying to write a module containing a function to examine the contents of
the current working directory and print out a count of how many files have each
extension (".txt", ".doc", etc.)
This is the code so far:
--
import os
path = "v:\\workspace\\Python2_Homework03\\src\\"
dirs
On Thu, Sep 6, 2012 at 11:37 PM, Johannes Bauer wrote:
> Not in my original post. If you read it again, you will clearly see that
> I was talking about purely random strings. And since you like to
> nitpick, I'll clarify further: I'm talking about bitstrings in which
> every bit of every character
On 06.09.2012 16:23, Dave Angel wrote:
> On 09/06/2012 09:43 AM, Johannes Bauer wrote:
>>
>> Yes, worst-case is O(N), best case O(1). Average is O(n log n).
>
> Can't see how you came up with an average of n log(n). Fourteen minutes
> before you made this post, you demonstrated it was less than
On 06.09.2012 15:43, Johannes Bauer wrote:
> Wrong, at least for randomized strings (i.e. every character with the
> same probability). O(N) is worst-case, O(log N) is correct for
> randomized strings.
^^
Here I write the right thing. Then further below...
> Yes, worst-case is O(N), best case O(1
On 06.09.2012 16:23, Dave Angel wrote:
> On 09/06/2012 09:43 AM, Johannes Bauer wrote:
>>
>> Yes, worst-case is O(N), best case O(1). Average is O(n log n).
>
> Can't see how you came up with an average of n log(n). Fourteen minutes
> before you made this post, you demonstrated it was less than
On 09/06/2012 09:53 AM, Ramchandra Apte wrote:
> On Thursday, 6 September 2012 19:16:38 UTC+5:30, Dave Angel wrote:
>> On 09/06/2012 09:34 AM, Ramchandra Apte wrote:
>>
>>> Translator means what precisely?
>>
>>
>> Examples of translators include compilers, assemblers, and
>>
>> interpreters. The
On 09/06/2012 09:43 AM, Johannes Bauer wrote:
>
> Yes, worst-case is O(N), best case O(1). Average is O(n log n).
Can't see how you came up with an average of n log(n). Fourteen minutes
before you made this post, you demonstrated it was less than 2 for any N.
And I previously posted that for a
On 9/5/12 3:03 PM, Grant Edwards wrote:
On 2012-09-05, Dave Angel wrote:
>On 09/05/2012 01:47 PM, Grant Edwards wrote:
>
>>Making the site's "search" box use Google or somesuch is probably the
>>simplest solution. I'm not enough of a web guy to know how to do
>>that, but I do know that some si
On Thursday, 6 September 2012 19:13:23 UTC+5:30, Alex wrote:
> Ramchandra Apte wrote:
>
>
>
> > On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
>
> > > I'm new to Python and have been using IDLE 3.2.3 to experiment with
>
> > >
>
> > > code as I learn. Despite being configured t
Ramchandra Apte wrote:
> On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
> > I'm new to Python and have been using IDLE 3.2.3 to experiment with
> >
> > code as I learn. Despite being configured to use a 4 space
> > indentation
> >
> > width, sometimes IDLE's "smart" indentation insi
On Thursday, 6 September 2012 19:16:38 UTC+5:30, Dave Angel wrote:
> On 09/06/2012 09:34 AM, Ramchandra Apte wrote:
>
> > Translator means what precisely?
>
>
>
> Examples of translators include compilers, assemblers, and
>
> interpreters. They also include implementations like cfront, which
On 06.09.2012 10:33, Steven D'Aprano wrote:
> But you know, it really doesn't make a difference. Equality testing will
> *still* be O(N) since the asymptomatic behaviour for sufficiently large
> string comparisons will be bounded by O(N). Multiplicative constants
> ("half the string" versus "0.
On 06/09/2012 8:20 AM, MRAB wrote:
On 06/09/2012 13:00, shaun wrote:
Hi all,
So I'm trying to to OO a script which is currently in place on work.
It connects to the database and makes multiple strings and sends them
to a server.
But I'm having major problems since I am new to python I keep try
On 09/06/2012 09:34 AM, Ramchandra Apte wrote:
> Translator means what precisely?
Examples of translators include compilers, assemblers, and
interpreters. They also include implementations like cfront, which
translates from one high-level language to another lower-level
language. (high and low b
On 09/06/2012 08:00 AM, shaun wrote:
> Hi all,
>
> So I'm trying to to OO a script which is currently in place on work. It
> connects to the database and makes multiple strings and sends them to a
> server.
>
> But I'm having major problems since I am new to python I keep trying to do it
> as I
On 05.09.2012 18:24, Steven D'Aprano wrote:
> On Wed, 05 Sep 2012 16:51:10 +0200, Johannes Bauer wrote:
> [...]
>>> You are making unjustified assumptions about the distribution of
>>> letters in the words. This might be a list of long chemical compounds
>>> where the words typically differ only in
On Thursday, 6 September 2012 11:26:21 UTC+5:30, mike pittenson wrote:
> Ayus Technologies offers Dot net training in chennai,java/j2ee training in
> chennai,SEO training in chennai,web designing training in chennai,soft skills
> training in chennai,Software Testing training in chennai.
>
>
>
On Thursday, 6 September 2012 02:34:17 UTC+5:30, Nestor Arocha wrote:
> I'm developing a language workbench written in Python. The idea is to create
> an environment where grammars and translators can interact easily.
>
>
>
> https://github.com/nesaro/pydsl
>
>
>
> any comments, feedback or
On Thursday, 6 September 2012 17:46:38 UTC+5:30, Roy Smith wrote:
> In article <50484643$0$29977$c3e8da3$54964...@news.astraweb.com>,
>
> Steven D'Aprano wrote:
>
>
>
> > On Wed, 05 Sep 2012 14:27:44 -0400, Terry Reedy wrote:
>
> >
>
> > > On 9/5/2012 8:48 AM, Ramchandra Apte wrote:
>
>
On Thu, Sep 6, 2012 at 10:07 PM, shaun wrote:
> Hi Chris,
>
> I'm changing it into multiple classes because the script is going to get
> much larger its more for maintainability reasons rather than functionality
> reasons.
Doesn't necessarily have to be multiple classes. Python gives you t
On 06/09/2012 13:00, shaun wrote:
Hi all,
So I'm trying to to OO a script which is currently in place on work. It
connects to the database and makes multiple strings and sends them to a server.
But I'm having major problems since I am new to python I keep trying to do it
as I would do it in J
n Thu, Sep 6, 2012 at 10:13 PM, Roy Smith wrote:
> In article <50485fca$0$29977$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> In any case, the *worst* case for string equality
>> testing is certainly O(N) (every character must be looked at), and the
>> *best* case is O(1) ob
In article <50484643$0$29977$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Wed, 05 Sep 2012 14:27:44 -0400, Terry Reedy wrote:
>
> > On 9/5/2012 8:48 AM, Ramchandra Apte wrote:
> >
> > > and "a==True" should be automatically changed into memory comparison.
> >
> > I have n
On Thu, Sep 6, 2012 at 8:00 AM, shaun wrote:
> Hi all,
>
> So I'm trying to to OO a script which is currently in place on work. It
> connects to the database and makes multiple strings and sends them to a
> server.
>
> But I'm having major problems since I am new to python I keep trying to do it
In article <50485fca$0$29977$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> In any case, the *worst* case for string equality
> testing is certainly O(N) (every character must be looked at), and the
> *best* case is O(1) obviously (the first character fails to match).
The best
Hi Chris,
I'm changing it into multiple classes because the script is going to get
much larger its more for maintainability reasons rather than functionality
reasons.
Thanks so much man it was the "self" fix you stated above. I woe you a pint of
Guinness :D
Thanks again,
Shaun
--
http:/
On 06/09/2012 12:37, shaun wrote:
Sorry guys here is the full code for the class:
#!/usr/bin/python
# Echo client program
import cx_Oracle
import socket
import pprint
from struct import *
import sys
from binascii import *
Don't use "from something import *". It'll import a whole load of
names.
Hi all,
So I'm trying to to OO a script which is currently in place on work. It
connects to the database and makes multiple strings and sends them to a server.
But I'm having major problems since I am new to python I keep trying to do it
as I would do it in Java but classes seem to be very diff
On Thu, Sep 6, 2012 at 9:37 PM, shaun wrote:
> class StringCall:
> results=[]
> def databasebatchcall(self,termid, batchid):
> con =
> cx_Oracle.connect('user/user...@odb4.dcc.company.ie/ODB4TEST.COMPANY.IE')
> cur = con.cursor()
> c
1 - 100 of 126 matches
Mail list logo