tmp123 wrote:
> Hello,
>
> Thanks for your time.
>
> We have very big files with python commands (more or less, 50
> commands each file).
>
Those are BIG programs. Presumably other programs are writing them?
> It is possible to execute them command by command, like if the
> commands was typ
Bruno Desthuilliers wrote:
> Kevin Walzer a écrit :
>
> Note that if you go that way, neither Windows nor MacOS X are actually
> able to cleanly manage such dependencies (which is why the usual
> solution on these platforms - or at least on Windows - is to just bundle
> everything in a single b
In <[EMAIL PROTECTED]>, Stefan Behnel wrote:
> René Fleschenberg wrote:
>> Marc 'BlackJack' Rintsch schrieb:
>>> There are potential users of Python who don't know much english or no
>>> english at all. This includes kids, old people, people from countries
>>> that have "letters" that are not tha
On Wed, 2007-05-16 at 14:35 +0200, René Fleschenberg wrote:
> You have misread my statements.
>
> Carsten Haese schrieb:
> > There is evidence against your assertions that knowing some English is a
> > prerequisite for programming
>
> I think it is a prerequesite for "real" programming. Yes, I c
Hi Steven,
Thanks for all of the good advice! Much appreciated.
Dusty
---
Steven D'Aprano wrote:
> On Tue, 15 May 2007 17:12:01 -0700, Brian wrote:
>
>> How do I, in Python, obtain a recursive list of files in a specified
>> directory, including the subdirectories, etc? For example, in the ol
Eric Brunel:
> Funny you talk about Japanese, a language I'm a bit familiar with and
> for which I actually know some input methods. The thing is, these only
> work if you know the transcription to the latin alphabet of the word you
> want to type, which closely match its pronunciation. So if y
Tina I wrote:
> Kevin Walzer wrote:
> And maybe the smartest thing to do would be to dump PyQt and just go for
> tkinter, however ugly it is :/
Tkinter doesn't have to be ugly.
I sell a proprietary Tkinter app commercially on OS X:
http://www.codebykevin.com/phynchronicity-running.png
It tak
On Wed, 16 May 2007 15:46:10 +0200, Neil Hodgson
<[EMAIL PROTECTED]> wrote:
> Eric Brunel:
>
>> Funny you talk about Japanese, a language I'm a bit familiar with and
>> for which I actually know some input methods. The thing is, these only
>> work if you know the transcription to the latin a
On May 16, 2:12 am, Brian <[EMAIL PROTECTED]> wrote:
> How do I, in Python, obtain a recursive list of files in a specified
> directory, including the subdirectories, etc?
import os
def iter_dirs(root, dirs=False):
stack = [root]
while stack:
dir = stack.pop(0)
for f in (
"Ondrej Baudys" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> After trawling through the archives for a simple quote aware split
> implementation (ie string.split-alike that only splits outside of
> matching quote) and coming up short, I implemented a quick and dirty
> fun
Hi,
I am parsing an xml file ,before that i have replaced a string in
the original xml file with another and made a new xml file which will
now be parsed.I am also opening some more files for output.The
following code shows some i/o commands.
file_input = raw_input("Enter The ODX File Path:")
i
Eric Brunel:
> Have you ever tried to enter anything more than 2 or 3 characters like
> that?
No, only for examples. Lengthy texts are either already available
digitally or are entered by someone skilled in the language.
> I did. It just takes ages. Come on: are you really serious about
[EMAIL PROTECTED] wrote:
> Hi,
> I am parsing an xml file ,before that i have replaced a string in
> the original xml file with another and made a new xml file which will
> now be parsed.I am also opening some more files for output.The
> following code shows some i/o commands.
> file_input = r
[EMAIL PROTECTED] wrote:
> output_file = open(test_file,"w")
...
> input_xml_sec = open(output_file,'r')
Can you spot the problem now? To prevent it, use a naming convention that
allows you to distinguish between file /names/ and file /objects/.
> But i am getting an error o
In article <[EMAIL PROTECTED]>, Aahz <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>,
>Anthony Irwin <[EMAIL PROTECTED]> wrote:
>>
>>#5 someone said that they used to use python but stopped because the
>>language changed or made stuff depreciated (I can fully remember
>>which) and old
On Sunday 13 May 2007 15:20, walterbyrd wrote:
> With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
> and non-Ajax solutions abound.
>
> With Python, finding such library, or apps. seems to be much more
> difficult to find.
>
> I thought django might be a good way, but I can n
On Wed, 16 May 2007 16:29:27 +0200, Neil Hodgson
<[EMAIL PROTECTED]> wrote:
> Eric Brunel:
>
>> Have you ever tried to enter anything more than 2 or 3 characters like
>> that?
>
> No, only for examples. Lengthy texts are either already available
> digitally or are entered by someone skil
Eric Brunel schrieb:
> Highly improbable in the general context. If I stumble on a source code
> in Chinese, Russian or Hebrew, I wouldn't be able to figure out a single
> sound.
If you get source code in a programming language that you don't know you
can't figure out a single sound too.
How i
> I tend to use the shebang #!/usr/bin/env python in my scripts so far
> but I imagine that having that would not work on say windows. Or is
> there some kind of file extension association for people running
> windows instead of the shebang?
The shebang is ignored in Windows (as far as I know). Th
On May 16, 3:07 pm, Gerard Flanagan <[EMAIL PROTECTED]> wrote:
...
> import os
>
> def iter_dirs(root, dirs=False):
...
Rather than rolling your own directory walker:
The same iterator using os.walk:
def iter_dirs(root, dirs=False):
for root, directories, files in os.walk(root):
if d
I am reading in data from a text file. I want to enter each value on
the line into a list and retain the order of the elements. The number
of elements and spacing between them varies, but a typical line looks
like:
' SRCPARAM 1 6.35e-07 15.00 340.00 1.10 3.0 '
Why does the followi
Lisa wrote:
> I am reading in data from a text file. I want to enter each value on
> the line into a list and retain the order of the elements. The number
> of elements and spacing between them varies, but a typical line looks
> like:
>
> ' SRCPARAM 1 6.35e-07 15.00 340.00 1.10 3.0
On May 16, 2:24 am, Bruno Desthuilliers wrote:
> 7stud a écrit :
>
>
>
> > "When you bind (on either a class or an instance) an attribute whose
> > name is not special...you affect only the __dict__ entry for the
> > attribute(in the class or instance, respectively)."
>
> > In light of that statem
I've implemented several libraries using calldll (originally on
Python 2.2) and posted recipe on ASPN for a general implementation
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847.
If I were doing it over again today, I would use ctypes, but I
have thousands of lines of library code t
On May 16, 2:17 am, [EMAIL PROTECTED] wrote:
> Hi,
> Suppose i have a list v which collects some numbers,how do i
> remove the common elements from it ,without using the set() opeartor.
> Thanks
Submit this as your homework answer -- it wi
On May 16, 11:21 am, Lisa <[EMAIL PROTECTED]> wrote:
> I am reading in data from a text file. I want to enter each value on
> the line into a list and retain the order of the elements. The number
> of elements and spacing between them varies, but a typical line looks
> like:
>
> ' SRCPARAM 1
On 16 May, 15:49, Carsten Haese <[EMAIL PROTECTED]> wrote:
>
> [*] And if you respond that they must know "some" English in the form of
> keywords and such, the answer is no, they need not. It is not hard for
> Europeans to learn to visually recognize a handful of simple Chinese
> characters withou
On Wed, 16 May 2007 17:14:32 +0200, Gregor Horvath <[EMAIL PROTECTED]>
wrote:
> Eric Brunel schrieb:
>
>> Highly improbable in the general context. If I stumble on a source code
>> in Chinese, Russian or Hebrew, I wouldn't be able to figure out a
>> single sound.
>
> If you get source code i
Great. Thanks for your help.
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates schrieb:
> I've implemented several libraries using calldll (originally on
> Python 2.2) and posted recipe on ASPN for a general implementation
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847.
> If I were doing it over again today, I would use ctypes, but I
> have thous
Hi,
I'm trying to use pymssql to execute a stored procedure. Currently, I
have an Excel spreadsheet that uses VBA in this manner:
Private Function CreateNewParrot(connDb As ADODB.Connection) As Long
Dim objCommand As ADODB.Command
Dim iParrot As Long
Dim bSuccess As Boolean
Set objComman
Eric Brunel schrieb:
>
> The point is that today, I have a reasonable chance of being able to
> read, understand and edit any Python code. With PEP 3131, it will no
> more be true. That's what bugs me.
That's just not true. I and others in this thread have stated that they
use German or other
As a non-native English speaker,
On May 13, 11:44 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> - should non-ASCII identifiers be supported? why?
No. I don't think it adds much, I think it will be a little used
feature (as it should be), every python instructor will start their
class by say
Thomas Heller wrote:
> Larry Bates schrieb:
>> I've implemented several libraries using calldll (originally on
>> Python 2.2) and posted recipe on ASPN for a general implementation
>> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847.
>> If I were doing it over again today, I would use
"tmp123" schrieb >
> We have very big files with python commands
> (more or less, 50 commands each file).
>
> It is possible to execute them command by command,
inp = open(cmd_file)
for line in inp:
exec line
might help. You don't get quite the same feeling as
"like if the commands wa
Istvan Albert schrieb:
> Here is something that just happened and relates to this subject: I
> had to help a student run some python code on her laptop, she had
> Windows XP that hid the extensions. I wanted to set it up such that
> the extension is shown. I don't have XP in front of me but when I
I looked in the language but did not find a switch for requiring
variables to be declared before use.
Is such an option available?
Thanks,
jvh
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-05-16, HMS Surprise <[EMAIL PROTECTED]> wrote:
> I looked in the language but did not find a switch for requiring
> variables to be declared before use.
Still trying to write Pascal, eh? ;)
> Is such an option available?
No.
However, there are utilities to "proofread" your code should
To quote from zipfile.py (2.4 library):
# Search the last END_BLOCK bytes of the file for the record signature.
# The comment is appended to the ZIP file and has a 16 bit length.
# So the comment may be up to 64K long. We limit the search for the
# signature to a few Kbytes at th
Hello list,
The following behavior is completely unexpected. Is it a bug or a by-
design feature?
Regards,
Victor.
-
from pickle import dumps
from cPickle import dumps as cdumps
print dumps('1001799')==dumps(str(1001799))
print cdumps('1001799')==cdumps(str(1001799))
outpu
Hello list,
I've found the following strange behavior of cPickle. Do you think
it's a bug, or is it by design?
Best regards,
Victor.
from pickle import dumps
from cPickle import dumps as cdumps
print dumps('1001799')==dumps(str(1001799))
print cdumps('1001799')==cdumps(str(1001799))
outputs
T
http://scargo.in - Download pics and videos of Britneys new Boob job
see her new tits naked!
--
http://mail.python.org/mailman/listinfo/python-list
On May 16, 4:12 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 16 May 2007 03:16:59 -0300, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> escribió:
>
>
>
>
>
> > On May 15, 7:07 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
> >> import gmpy
> >> a = 2**177149-1
> >>
On 16 May 2007 10:06:20 -0700, Victor Kryukov <[EMAIL PROTECTED]> wrote:
> Hello list,
>
> The following behavior is completely unexpected. Is it a bug or a by-
> design feature?
>
> Regards,
> Victor.
>
> -
>
> from pickle import dumps
> from cPickle import dumps as cdumps
>
> prin
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to use pymssql to execute a stored procedure. Currently, I
> have an Excel spreadsheet that uses VBA in this manner:
>
> Private Function CreateNewParrot(connDb As ADODB.Connection) As Long
> Dim objCommand As ADODB.Command
> Dim iParrot As Long
>
Has anyone had success installing the pyhdf library with python 2.4
under linux 2.6.18 (debian)? I have installed the HDF library and
development package from apt and have downloaded the pyhdf
installation files.
I've had failures in two ways:
1) When I install, I do not wish to use the szip libr
I have been using python shell to test small parts of the big program.
What other ways can I use the shell effectively. My mentor told me
that you can virtually do anything from testing your program to
anything in the shell. Any incite would be useful.
--
http://mail.python.org/mailman/listinfo/p
Christophe wrote:
> [EMAIL PROTECTED] a ecrit :
> > Christophe wrote:
> >> [EMAIL PROTECTED] a ecrit :
> >>> Steven D'Aprano wrote:
> I would find it useful to be able to use non-ASCII characters for heavily
> mathematical programs. There would be a closer correspondence between the
> >>>
Hi!
Is it possible to "automagically" coerce the named groups to python types? e.g.:
>>> type(re.match('(?P\d*)', '123').groupdict()['x'])
But what I'm looking forward is for the type to be 'int'.
Cheers!
Hugo Ferreira
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Terry Reedy <[EMAIL PROTECTED]> wrote:
>
>"Anthony Irwin" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
.
.
.
>| #5 someone said that they used to use python but stopped because t
In article <[EMAIL PROTECTED]>,
Paul Melis <[EMAIL PROTECTED]> wrote:
>Anthony Irwin wrote:
>> Hi All,
>>
>> I am currently trying to decide between using python or java and have a
>> few quick questions about python that you may be able to help with.
>>
>> #1 Does python have something like ja
In article <[EMAIL PROTECTED]>,
Paul Melis <[EMAIL PROTECTED]> wrote:
.
.
.
>your program comes out on the other platforms. You could use a GUI
>toolkit that draws its own widgets instead of one that uses the native
>control
On May 16, 1:09 pm, [EMAIL PROTECTED] wrote:
> I am interested in organizing and taking part in a project that would
> create a virtual world much like the one described in Neal
> Stephenson's 'Snow Crash'. I'm not necessarily talking about
> something 3d and I'm not talking about a game either.
On May 16, 9:04 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote:
> On Wed, 16 May 2007 16:29:27 +0200, Neil Hodgson
>
> <[EMAIL PROTECTED]> wrote:
...snip...
> > Each of these can be handled reasonably considering their frequency of
> > occurrence. I have never learned Japanese but have had to deal
Hey,
a while ago i found a widget somewhere that was written in python with the
cairo extension.
that widget wasn't just a window.. it was a window without decorations and a
red round thing in it.
now i was trying to find that thing again and i`ve searched over a million
blogs (oke not that much
* Krypto (16 May 2007 10:38:27 -0700)
> I have been using python shell to test small parts of the big program.
> What other ways can I use the shell effectively. My mentor told me
> that you can virtually do anything from testing your program to
> anything in the shell. Any incite would be useful.
On May 13, 5:44 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> PEP 1 specifies that PEP authors need to collect feedback from the
> community. As the author of PEP 3131, I'd like to encourage comments
> to the PEP included below, either here (comp.lang.python), or to
> [EMAIL PROTECTED]
>
> In
QOTW: "Sometimes you just have to take the path of least distaste". - Grant
Edwards
"I want to choose my words carefully here, so I'm not misunderstood. They're
a bunch of fucking idiots." - Charles Wang, billionaire chairman of software
giant Computer Associates, asked to assess the quality of
En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen
<[EMAIL PROTECTED]> escribió:
> "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>
>> Maybe there is a confusion here. You code above means that, when the
>> event
>> "The leftmost MOUSE BUTTON was released" happens over your BUTTON WIDGET
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > First "while" is a keyword and will remain "while" so
> > that has nothing to do with anything.
>
> I think this cuts right down to why I oppose the PEP.
> It is not so much for techn
No haven't had to endure Pascal. Mostly C/C++, Tcl, and assembler. Oh
yeah, and a (thankfully) short stint of Ada.
But I glad to hear of the proofing tools. Working a lot of data parsed
from web pages and the developer there a different naming convention
from what I am accustomed so sometimes I i
On May 16, 1:55 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Robert Rawlins - Think Blue wrote:
>
> > Hello Guys,
>
> > I've got an application that I've written, and it sits in an embedded
> > system, from time to time the application will crash, I'm not quite sure
> > what's causing this, but as
On Monday 14 May 2007 18:46, James T. Dennis wrote:
> I'm thinking of some sort of class/module that would generate
> various sorts of HTML forms by default, but also allow one to
> sub-class each of the form/query types to customize the contents.
Turbogears has catwalk, which is already an int
On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
> Istvan Albert schrieb:
>
> > Here is something that just happened and relates to this subject: I
> > had to help a student run some python code on her laptop, she had
> > Windows XP that hid the extensions. I wanted to set it up such
En Wed, 16 May 2007 12:18:35 -0300, Martin Maney <[EMAIL PROTECTED]>
escribió:
> So the author knows that there's a hard limit of 64K on the comment
> size, but feels it's more important to fail a little more quickly when
> fed something that's not a zipfile - or a perfectly legitimate zipfile
>
Sorry about the duplicate post! My news reader never showed my first reply!
j
--
Posted via a free Usenet account from http://www.teranews.com
--
http://mail.python.org/mailman/listinfo/python-list
On May 16, 2007, at 10:36 AM, John Zenger wrote:
> On May 16, 2:17 am, [EMAIL PROTECTED] wrote:
>> Hi,
>> Suppose i have a list v which collects some numbers,how do i
>> remove the common elements from it ,without using the set() opeartor.
>>
Martin Blume wrote:
> "tmp123" schrieb >
>> We have very big files with python commands
>> (more or less, 50 commands each file).
>>
>> It is possible to execute them command by command,
>
> inp = open(cmd_file)
> for line in inp:
> exec line
>
> might help. You don't get quite the sam
Eric Brunel <[EMAIL PROTECTED]> wrote:
> Joke aside, this just means that I won't ever be able to program math in
> ADA, because I have absolutely no idea on how to do a 'pi' character on my
> keyboard.
Just in case it wasn't clear: you could of course continue to use the
old name 'Pi' instead
Hugo Ferreira wrote:
> Hi!
>
> Is it possible to "automagically" coerce the named groups to python types?
> e.g.:
>
type(re.match('(?P\d*)', '123').groupdict()['x'])
>
>
> But what I'm looking forward is for the type to be 'int'.
>
> Cheers!
>
> Hugo Ferreira
So apply the "int()" funct
"wb" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On May 14, 2:09 am, [EMAIL PROTECTED] wrote:
>
>
> If her boobs getting any bigger she won't be able to stand up.
>
Im afraid of boobs. they are not on men I suck.
--
http://mail.python.org/mailman/listinfo/python-list
On May 16, 1:44 am, René Fleschenberg <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
> > I'm not sure how you conclude that no problem exists.
> > - Meaningful identifiers are critical in creating good code.
>
> I agree.
>
> > - Non-english speakers can not create or understand
> > engli
Hello list,
our team is going to rewrite our existing web-site, which has a lot of
dynamic content and was quickly prototyped some time ago.
Today, as we get better idea of what we need, we're going to re-write
everything from scratch. Python is an obvious candidate for our team:
everybody knows
I read in the ref man that try-except-finally did not work in earlier
versions, I am using jython 2.2. Does this imply that try-except
without finally does not work either? I get a syntax error on the else
below. Some of the functions embedded in the try section try to
convert strings to ints, etc
HMS Surprise wrote:
> I read in the ref man that try-except-finally did not work in earlier
> versions, I am using jython 2.2. Does this imply that try-except
> without finally does not work either? I get a syntax error on the else
> below. Some of the functions embedded in the try section try to
>
I don't know exactly what the first non-space character is. I know the
first non-space character will be * or an alphanumeric character.
--
http://mail.python.org/mailman/listinfo/python-list
> I don't know exactly what the first non-space character is. I know the
> first non-space character will be * or an alphanumeric character.
How about:
>>> mystring = 'ksjfkfjkfjds '
>>> print len( mystring ) - len( mystring.lstrip( ) )
4
HTH,
Daniel
--
http://mail.python.org/mailman/li
Python's lack of an EOF character is giving me a hard time.
I've tried:
-
s = f.readline()
while s:
.
.
s = f.readline()
and
---
s = f.readline()
while s != ''
.
.
s = f.readline()
---
In both cases, the loop ends as soon it encounters an empty line in
the file, i.e.
xx
On May 16, 1:13 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote:
> Hello list,
>
> I've found the following strange behavior of cPickle. Do you think
> it's a bug, or is it by design?
>
> Best regards,
> Victor.
>
> from pickle import dumps
> from cPickle import dumps as cdumps
>
> print dumps('100179
walterbyrd wrote:
> Python's lack of an EOF character is giving me a hard time.
>
> I've tried:
>
[ stuff ]
for s in f:
do_whatever_with_s(s)
James
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-05-16, walterbyrd <[EMAIL PROTECTED]> wrote:
> Python's lack of an EOF character is giving me a hard time.
No it isn't.
> s = f.readline()
> while s:
> .
> .
> s = f.readline()
> s = f.readline()
> while s != ''
> .
> .
> s = f.readline()
Neither one of your examples is legal Python
walterbyrd wrote:
> I don't know exactly what the first non-space character is. I know the
> first non-space character will be * or an alphanumeric character.
>
This is another of the hundreds of ways:
py> for i,c in enumerate(astring):
... if c != ' ': break
...
py> print i
--
http://mail.p
Grant Edwards wrote:
> On 2007-05-16, walterbyrd <[EMAIL PROTECTED]> wrote:
>
>
>>Python's lack of an EOF character is giving me a hard time.
>
>
> No it isn't.
>
>
>>s = f.readline()
>>while s:
>>.
>>.
>>s = f.readline()
>
>
>
>
>>s = f.readline()
>>while s != ''
>>.
>>.
>>s = f.readline
walterbyrd wrote:
> I don't know exactly what the first non-space character is. I know the
> first non-space character will be * or an alphanumeric character.
>
>
using builtin function rindex
st = 'asblde '
>>> st.rindex(' ')
sph
--
HEX: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
> > I've found the following strange behavior of cPickle. Do you think
> > it's a bug, or is it by design?
> >
> > Best regards,
> > Victor.
> >
> > from pickle import dumps
> > from cPickle import dumps as cdumps
> >
> > print dumps('1001799')==dumps(str(1001799))
> > print cdumps('1001799')==cdum
Clement wrote:
> On May 16, 1:09 pm, [EMAIL PROTECTED] wrote:
>
>>I am interested in organizing and taking part in a project that would
>>create a virtual world much like the one described in Neal
>>Stephenson's 'Snow Crash'.
That's a perfectly reasonable idea. It takes money and people to
p
On May 16, 1:13 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote:
> Hello list,
>
> I've found the following strange behavior of cPickle. Do you think
> it's a bug, or is it by design?
>
> Best regards,
> Victor.
>
> from pickle import dumps
> from cPickle import dumps as cdumps
>
> print dumps('100179
On 5/16/07, Daniel Nogradi <[EMAIL PROTECTED]> wrote:
> > > I've found the following strange behavior of cPickle. Do you think
> > > it's a bug, or is it by design?
> > >
> > > Best regards,
> > > Victor.
> > >
> > > from pickle import dumps
> > > from cPickle import dumps as cdumps
> > >
> > > pri
In <[EMAIL PROTECTED]>, Daniel Nogradi
wrote:
> The OP was not comparing identity but equality. So it looks like a
> real bug, I think the following should be True for any function f:
>
> if a == b: f(a) == f(b)
>
> or not?
In [74]: def f(x):
: return x / 2
:
In [75]: a = 5
On May 16, 11:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Christophe wrote:
snip...
> > Who displays stack frames? Your code. Whose code includes unicode
> > identifiers? Your code. Whose fault is it to create a stack trace
> > display procedure that cannot handle unicode? You.
>
>
ActivePython 2.5.1.1 as well:
PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit
(Intel)] on win32.
Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin'
for further copyright information.
>>> from pickle import dumps
>>> from cPickle import dumps as cdumps
>>>
My program creates three lists: the first has dates expressed as
strings, the second has floats that are strictly positive, and the
third has floats that are strictly negative. I have no trouble writing
the data in these lists to a .csv file using the csv module using the
following code.
outfile =
> > > > I've found the following strange behavior of cPickle. Do you think
> > > > it's a bug, or is it by design?
> > > >
> > > > Best regards,
> > > > Victor.
> > > >
> > > > from pickle import dumps
> > > > from cPickle import dumps as cdumps
> > > >
> > > > print dumps('1001799')==dumps(str(100
Martin Maney wrote:
> To quote from zipfile.py (2.4 library):
>
> # Search the last END_BLOCK bytes of the file for the record signature.
> # The comment is appended to the ZIP file and has a 16 bit length.
> # So the comment may be up to 64K long. We limit the search for the
> #
On May 16, 12:38 pm, Krypto <[EMAIL PROTECTED]> wrote:
> I have been using python shell to test small parts of the big program.
> What other ways can I use the shell effectively. My mentor told me
> that you can virtually do anything from testing your program to
> anything in the shell. Any incite
Hi
With Python 2.5, there is a change on the reference count of objects
compared with previous versions (as reported by sys.getrefcount).
All Python versions from 2.1 thru 2.4 gave these same results:
Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "cr
On May 16, 8:51 pm, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote:
> How is the code different from shlex.split?
Shlex only splits by whitespace. I needed something to split out SQL
statements from a Postgresql dump, so the ideal way of doing that is
to split by semicolons. However, postgresql fun
On May 16, 9:57 am, HMS Surprise <[EMAIL PROTECTED]> wrote:
> I looked in the language but did not find a switch for requiring
> variables to be declared before use.
>
> Is such an option available?
>
> Thanks,
>
> jvh
You do have to declare a variable before use. You do so by assigning
it a value
Matimus wrote:
> On May 16, 9:57 am, HMS Surprise <[EMAIL PROTECTED]> wrote:
>> I looked in the language but did not find a switch for requiring
>> variables to be declared before use.
>>
>> Is such an option available?
>>
>> Thanks,
>>
>> jvh
>
> You do have to declare a variable before use. You
Hello Hugo,
> Is it possible to "automagically" coerce the named groups to python types?
> e.g.:
Not that I know of, however I use the following idiom:
match = my_regexp.find(some_string)
def t(name, convert=str):
return convert(match.group(name))
myint = t("field1", int)
HTH,
--
Miki <[EM
101 - 200 of 238 matches
Mail list logo