Hi:
Do you mean the following code?
#!/usr/bin/python
# OS: Ubuntu
import subprocess
fileName = open ('final.txt', 'a')
fileName.write ('%s %s %s \n' % (12,25,9))
fileName.flush() # add
fileName.close() # add
desLrr = subprocess.Popen('ls -a >> final.txt', shell=True) # change to "ls
-a"
fi
sturlamolden, 04.07.2010 05:30:
I was just looking at Debian's benchmarks. It seems LuaJIT is now (on
median) beating Intel Fortran!
C (gcc) is running the benchmarks faster by less than a factor of two.
Consider that Lua is a dynamically typed scripting language very
similar to Python.
LuaJIT
Kenny Meyer wrote:
>
>I have to figure out if a string is callable on a Linux system. I'm
>actually doing this:
>...
>Never mind the code, because this is not the original.
>The side effect of subprocess.call() is that it *actually* executes
>it, but I just need the return code. What are better wa
joblack wrote:
>
>I get sometimes a
>
>Errno 9 Bad file descriptor
>
>the code is too long to show it here but what are the circumstances
>this could happen? A web search showed nothing.
>
>I have especially the feeling Python 2.6 has some problems with
>Unicode ... and might not find the file. Is
On 12Jul2010 21:28, Jia Hu wrote:
| I have a problem about how to generate a specific.txt file. I use the
| following code:
|
| #!/usr/bin/python
| # OS: Ubuntu
| import subprocess
| fileName = open ('final.txt', 'a')
| fileName.write ('%s %s %s \n' % (12,25,9))
String still in Python's buffer,
On 8 Jul., 19:32, Christian Heimes wrote:
> Which third party products with C extensions do you use? Have you
> updated your database adapter and NumPy yet?
I'm using sqlalchemy, scipy and numpy. I will try to update these and
see if that helps.
Dierk
--
http://mail.python.org/mailman/listinf
If I change "'echo "hello">> final.txt" to "ls -a >> final.txt" and add
fileName.close() before subprocess.
The result is still like:
12 25 9
85 25 12
# list of files
.
How can I put the list before the number list 85 25 12?
Thank you.
On Tue, Jul 13, 2010 at 12:47 AM, Jia Hu wrote:
On 07/12/2010 06:36 PM, Paul Rubin wrote:
> I'd personally prefer
>
> if not bool(myValue):
>
> which would call the myValue's __bool__ method if it chose to implement
> one. Explicit is better than implicit.
That's just ugly. Probably a more explicit way would be to have an
is_true() and
http;//www.123maza.com/elaxa/domain-hosting
--
http://mail.python.org/mailman/listinfo/python-list
On 07/12/2010 06:18 PM, Steven D'Aprano wrote:
> Early versions of BASIC used -1 as true and 0 as false.
They did this for good reason. BASIC had no logical operators. AND,
OR, and NOT were all actually bitwise operators. By making the True
value -1, the bitwise operations yielded the result on
On Mon, 12 Jul 2010 20:58:39 -0700, Paul Rubin wrote:
> Steven D'Aprano writes:
>> What Python does instead is to accept *any* object in a context where
>> other languages (such as Pascal) would insist on a boolean.
>
> I'm aware of what Python does, just saying I can sympathize with the
> senti
> > Yesterday, I was running a CNC plasma cutter that's controlled
> > by Windows XP. This is a machine that moves around a plasma torch that
> > cuts thick steel plate. A "New Java update is available" window
> > popped up while I was working. Not good.
>
> Hi, it looks like you're attem
On Mon, Jul 12, 2010 at 3:32 PM, Junkman wrote:
> Greetings to Python users,
>
> I'm trying to parse Python code using the grammar supplied with the
> documentation set, and have a question on the grammar for function
> parameters:
>
> funcdef: 'def' NAME parameters ['->' test] ':' suite
> paramet
Steven D'Aprano writes:
> What Python does instead is to accept *any* object in a context where
> other languages (such as Pascal) would insist on a boolean.
I'm aware of what Python does, just saying I can sympathize with the
sentiment that explicit conversions would make more sense. I wouldn'
On Mon, 12 Jul 2010 20:22:39 -0700, Paul Rubin wrote:
> Steven D'Aprano writes:
>> Writing the explicit tests:
>> if bool(myInt):
>> or even:
>> if myInt <> 0:
>>
>> are firmly in the same category. The only difference is that it is more
>> familiar and therefore comfortable to those who are use
On Mon, 12 Jul 2010 17:36:38 -0700, Paul Rubin wrote:
>> I would argue against that. Why do you, the coder, care about the
>> specific details of treating ints in a boolean context? The int type
>> itself knows, leave the decision to it.
>
> There is a horrible (IMO) thing that Perl, Lua, and Jav
On Mon, Jul 12, 2010 at 9:16 PM, Steven D'Aprano
wrote:
> You've seen -1 being used as false? Where? Are you still talking about
> Python builtins or language semantics?
Some of our database tables at work use 1 for true, -1 for false, and
0 for neither. Don't look at me, I didn't design it. Wh
On Mon, Jul 12, 2010 at 6:29 PM, Kenny Meyer wrote:
> Hello,
>
> I have to figure out if a string is callable on a Linux system. I'm
"callable" seems vague. Is a command string with invalid arguments but
a valid executable "callable"? If no, then there's no general way to
test "callability" witho
Steven D'Aprano writes:
> Writing the explicit tests:
> if bool(myInt):
> or even:
> if myInt <> 0:
>
> are firmly in the same category. The only difference is that it is more
> familiar and therefore comfortable to those who are used to languages
> that don't have Python's truth-testing rules.
On Mon, 12 Jul 2010 19:28:28 -0600, Ian Kelly wrote:
> On Mon, Jul 12, 2010 at 6:18 PM, Steven D'Aprano
> wrote:
>>> I prefere to explicitly write what I want to test:
>>>
>>> if myInt <> 0:
>>
>> I would argue against that. Why do you, the coder, care about the
>> specific details of treating in
Must We Worship
Whom Must We Worship
The submission of man to His Creator is the essence of Islam. The name
“Islam” is chosen by God (Allah) and not by man. It is the same
unifying Message revealed to all the Prophets and Messengers by Allah
and which they spread amongst their respective nations.
On Mon, Jul 12, 2010 at 7:14 PM, Paul Rubin wrote:
> Ian Kelly writes:
> > I don't think it's any more egregious than automatic conversions of
> > mixed-type expressions, such as 3 + 4.5.
>
> That could also be explicit: float(3) + 4.5, or 3 + int(4.5).
>
> > If you don't want your ints automati
On 12Jul2010 17:36, Paul Rubin wrote:
| Steven D'Aprano writes:
| > This is why virtually all low-level languages treat 0 as a false ...
|
| OK, but is Python a low-level language,
Not particularly, but true/false and Boolean login are low level ideas.
If it works well in a low level language (
Ian Kelly writes:
> I don't think it's any more egregious than automatic conversions of
> mixed-type expressions, such as 3 + 4.5.
That could also be explicit: float(3) + 4.5, or 3 + int(4.5).
> If you don't want your ints automatically converted to floats on
> division, then use the integer d
Jia Hu wrote:
Hello:
I have a problem about how to generate a specific.txt file. I use the
following code:
#!/usr/bin/python
# OS: Ubuntu
import subprocess
fileName = open ('final.txt', 'a')
fileName.write ('%s %s %s \n' % (12,25,9))
desLrr = subprocess.Popen('echo "hello" >> final.txt ', s
On Mon, Jul 12, 2010 at 6:36 PM, Paul Rubin wrote:
> There is a horrible (IMO) thing that Perl, Lua, and Javascript all do,
> which is automatically convert strings to numbers, so "12"+3 = 15.
> Python has the good sense to throw a type error if you attempt such an
> addition, but it goes and conv
On 7/12/10 10:16 AM, John Nagle wrote:
>Yesterday, I was running a CNC plasma cutter that's controlled
> by Windows XP. This is a machine that moves around a plasma torch that
> cuts thick steel plate. A "New Java update is available" window
> popped up while I was working. Not good.
That's
Hello,
I have to figure out if a string is callable on a Linux system. I'm
actually doing this:
def is_valid_command(command):
retcode = 100 # initialize
if command:
retcode = subprocess.call(command, shell=True)
if retcode is 0:
print "Valid co
On Mon, Jul 12, 2010 at 6:18 PM, Steven D'Aprano
wrote:
>> I prefere to explicitly write what I want to test:
>>
>> if myInt <> 0:
>
> I would argue against that. Why do you, the coder, care about the
> specific details of treating ints in a boolean context? The int type
> itself knows, leave the
Hello:
I have a problem about how to generate a specific.txt file. I use the
following code:
#!/usr/bin/python
# OS: Ubuntu
import subprocess
fileName = open ('final.txt', 'a')
fileName.write ('%s %s %s \n' % (12,25,9))
desLrr = subprocess.Popen('echo "hello" >> final.txt ', shell=True)
fileName
On Mon, Jul 12, 2010 at 2:33 PM, Jia Hu wrote:
> Thank you. It works now.
>
> if I use 'print' to print the whole list, 'print' will add newline
> at the end of the list but not each item in the list. right?
>
> For the code:
> for line in fileName:
> line = line.rstrip('\n')
> I think this
Steven D'Aprano writes:
> This is why virtually all low-level languages treat 0 as a false ...
OK, but is Python a low-level language, and if not, why are low-level
languages appropriate examples to follow?
>> if myInt <> 0:
>
> I would argue against that. Why do you, the coder, care about the
On Jul 12, 2010, at 15:55 , Alf P. Steinbach /Usenet wrote:
> * Rami Chowdhury, on 13.07.2010 00:14:
>> Perhaps I'm misunderstanding, but ...
>>
>> On Jul 12, 2010, at 13:57 , Alf P. Steinbach /Usenet wrote:
>>>
>>> Existence of a variable means, among other things, that
>>>
>>> * You can use
On Mon, 12 Jul 2010 12:34:46 +0200, Jean-Michel Pichavant wrote:
> Well, actually some people might think otherwise. While I disagree with
> the OP flaming style, one could argue that muting an integer into a
> boolean makes no sense (I'm one of them). You can still do it, but there
> is no "right
* Steven D'Aprano, on 13.07.2010 01:34:
On Mon, 12 Jul 2010 20:28:49 +0200, Alf P. Steinbach /Usenet wrote:
As I see it it doesn't matter whether the implementation is CPython call
frame slots or that mechanism called something else or a different
mechanism called the same or a different mechan
* Steven D'Aprano, on 13.07.2010 01:50:
On Mon, 12 Jul 2010 22:57:10 +0200, Alf P. Steinbach /Usenet wrote:
Existence of a variable means, among other things, that
* You can use the value, with guaranteed effect (either unassigned
exception
or you get a proper value): in particul
On Mon, 12 Jul 2010 22:57:10 +0200, Alf P. Steinbach /Usenet wrote:
> Existence of a variable means, among other things, that
>
>* You can use the value, with guaranteed effect (either unassigned
>exception
> or you get a proper value): in particular, you won't be accessing a
>
On Mon, 12 Jul 2010 17:00:22 -0500, Jake b wrote:
> I'm starting a new python code project. What license do you suggest? I
> am searching, but I'm not finding a simple comparison of licenses. So I
> don't know which to use. Maybe MIT or Apache or LGPL or BSD?
http://www.dwheeler.com/essays/gpl-co
On Jul 12, 9:52 pm, Gelonida wrote:
> Hi lkcl,
>
> Do you have any documentation or overview for your project?
git clone git://pyjs.org/git/multitaskhttpd.git
i only started it today, but yes, there's a README.
the primary reason it's being developed is because GNUmed are looking
to create a
On Mon, 12 Jul 2010 20:28:49 +0200, Alf P. Steinbach /Usenet wrote:
> As I see it it doesn't matter whether the implementation is CPython call
> frame slots or that mechanism called something else or a different
> mechanism called the same or a different mechanism called something
> different; wha
Jake b writes:
> I want:
> 1] Pretty much let anyone use it. Users do not have to include source
> code, as long as I get credit. (which I think normallly is a textfile
> with project url + name?)
The simplest effective license that requires nothing more that
attribution is “under the terms of t
On Mon, Jul 12, 2010 at 10:13 PM, geremy condra wrote:
> On Mon, Jul 12, 2010 at 4:59 PM, lkcl wrote:
>> for several reasons, i'm doing a cooperative multi-tasking HTTP
>> server:
>> git clone git://pyjs.org/git/multitaskhttpd.git
>>
>> there probably exist perfectly good web frameworks that are
On Mon, Jul 12, 2010 at 6:00 PM, Jake b wrote:
> I'm starting a new python code project. What license do you suggest? I
> am searching, but I'm not finding a simple comparison of licenses. So
> I don't know which to use. Maybe MIT or Apache or LGPL or BSD?
Fair warning: I like and use the GPL a l
* Rami Chowdhury, on 13.07.2010 00:14:
Perhaps I'm misunderstanding, but ...
On Jul 12, 2010, at 13:57 , Alf P. Steinbach /Usenet wrote:
Existence of a variable means, among other things, that
* You can use the value, with guaranteed effect (either unassigned exception
or you get a prop
Greetings to Python users,
I'm trying to parse Python code using the grammar supplied with the
documentation set, and have a question on the grammar for function
parameters:
funcdef: 'def' NAME parameters ['->' test] ':' suite
parameters: '(' [typedargslist] ')'
typedargslist: ((tfpdef ['=' test]
On Mon, Jul 12, 2010 at 4:59 PM, lkcl wrote:
> for several reasons, i'm doing a cooperative multi-tasking HTTP
> server:
> git clone git://pyjs.org/git/multitaskhttpd.git
>
> there probably exist perfectly good web frameworks that are capable of
> doing this sort of thing: i feel certain that twi
Perhaps I'm misunderstanding, but ...
On Jul 12, 2010, at 13:57 , Alf P. Steinbach /Usenet wrote:
>
> Existence of a variable means, among other things, that
>
> * You can use the value, with guaranteed effect (either unassigned exception
>or you get a proper value)
Surely by that definiti
On Mon, 12 Jul 2010 14:54:00 -0700, nais-saudi wrote:
> Why did I Embrace Islam?
Very interesting & good fro you but I cannot find any thing related to
python here.
--
This place just isn't big enough for all of us. We've got to find a way
off this planet.
--
http://mail.python.org/mailm
On 07/12/2010 12:16 PM, John Nagle wrote:
On 7/12/2010 7:19 AM, Grant Edwards wrote:
On 2010-07-09, Les Schaffer wrote:
i have been asked to guarantee that a proposed Python application will
run continuously under MS Windows for two months time. And i am looking
^
I'm starting a new python code project. What license do you suggest? I
am searching, but I'm not finding a simple comparison of licenses. So
I don't know which to use. Maybe MIT or Apache or LGPL or BSD?
Are there certain licenses to avoid using because of interaction
problems between libraries us
Why did I Embrace Islam?
This is an extract from Dr. Gronier, a French MP, who embraced Islam.
Revealing the reason of embracing Islam he said, I read all of the
Ayat (Quranic verses), which have a relation to medical, health, and
natural sciences that I studied before and have a wide knowledge of.
Thomas,
> split() also splits at other whitespace.
Doh! Corrected version follows:
print ''.join( open( 'Direct_Irr.txt' ).read().splitlines() )
Broken out:
- open(): open file
- read(): read its entire contents as one string
- splitlines(): split the contents into a list of lines
(splits
Hi lkcl,
Do you have any documentation or overview for your project?
Questions I would be interested in:
- List of features already working
- list of features under development
- list of features being in in the near future
lkcl wrote:
> for several reasons, i'm doing a cooperative multi-ta
On 07/12/2010 11:29 PM, pyt...@bdurham.com wrote:
> Jia,
>
> print ''.join( open( 'Direct_Irr.txt' ).read().split() )
>
> Broken out:
>
> - open(): open file
> - read(): read its entire contents as one string
> - split(): split the contents into a list of lines
> (splits lines at \n; does not
Thank you. It works now.
if I use 'print' to print the whole list, 'print' will add newline
at the end of the list but not each item in the list. right?
For the code:
for line in fileName:
line = line.rstrip('\n')
I think this will affect 'fileName' because it assign the value to 'line' ?
B
Jia,
print ''.join( open( 'Direct_Irr.txt' ).read().split() )
Broken out:
- open(): open file
- read(): read its entire contents as one string
- split(): split the contents into a list of lines
(splits lines at \n; does not include \n in split values)
- ''.join(): join list of lines with an e
On the positive side, Lua supports tail call optimization and coroutines
are built in by default.
--
дамјан ((( http://damjan.softver.org.mk/ )))
Education is one of the "prices" of freedom that some are unwilling to
pay.
--
http://mail.python.org/mailman/listinfo/python-list
I let the setup.py script talk:
# 03_1__noddy
from distutils.core import setup, Extension
import distutils.ccompiler
compilerName = distutils.ccompiler.get_default_compiler()
options = []
if compilerName == "msvc":
# * distutils sets warning level 3:
# Overriding with warning level
for several reasons, i'm doing a cooperative multi-tasking HTTP
server:
git clone git://pyjs.org/git/multitaskhttpd.git
there probably exist perfectly good web frameworks that are capable of
doing this sort of thing: i feel certain that twisted is one of them.
however, the original author of rtm
* Rhodri James, on 12.07.2010 22:19:
On Mon, 12 Jul 2010 13:56:38 +0100, bart.c wrote:
"Steven D'Aprano" wrote in
message news:4c3aedd5$0$28647$c3e8...@news.astraweb.com...
On Mon, 12 Jul 2010 09:48:04 +0100, bart.c wrote:
That's interesting. So in Python, you can't tell what local variabl
On 7/12/2010 4:05 AM, Steven D'Aprano wrote:
Pardon me if this has already been mentioned, but I didn't see it, and
this is big big news.
The latest release of numpy now supports Python 2.x and 3.x out of a
single code base, and Scipy is predicted to follow soon.
http://www.mail-archive.com/num
On Mon, Jul 12, 2010 at 1:27 PM, Jia Hu wrote:
> Hi, I just want to delete "\n" at each line. My operating system is ubuntu
> 9.1. The code is as follows
>
> #!/usr/bin/python
> import string
> fileName=open('Direct_Irr.txt', 'r') # read file
> directIrr = fileName.readlines()
> fileName.close()
>
On 7/12/2010 4:48 AM, bart.c wrote:
>>> def foo():
print("Before:", locals())
x = 0
print("After:", locals())
>>> foo()
Before: {}
After: {'x': 0}
That's interesting. So in Python, you can't tell what local variables a
function has just by looking at it's code:
You are being fooled by the
On Sun, 11 Jul 2010 18:17:49 +, Duncan Booth wrote:
> wheres pythonmonks wrote:
>
>> I'm an old Perl-hacker, and am trying to Dive in Python. I have some
>> easy issues (Python 2.6)
>> which probably can be answered in two seconds:
without going into details on how to do these things in py
On Mon, Jul 12, 2010 at 2:27 PM, Jia Hu wrote:
> Hi, I just want to delete "\n" at each line. My operating system is ubuntu
> 9.1. The code is as follows
>
> #!/usr/bin/python
> import string
> fileName=open('Direct_Irr.txt', 'r') # read file
> directIrr = fileName.readlines()
> fileName.close()
>
I hope this could help:
>>> f = open('powersave.sh')
>>> map(lambda s: s.strip(), f.readlines())
['echo 1 > /sys/module/snd_hda_intel/parameters/power_save', 'echo
min_power > /sys/class/scsi_host/host0/link_power_management_policy',
'echo 1 > /sys/module/snd_hda_intel/parameters/power_save']
I k
John Nagle writes:
>Yesterday, I was running a CNC plasma cutter that's controlled
> by Windows XP. This is a machine that moves around a plasma torch that
> cuts thick steel plate. A "New Java update is available" window
> popped up while I was working. Not good.
You can blame that one o
Hi, I just want to delete "\n" at each line. My operating system is ubuntu
9.1. The code is as follows
#!/usr/bin/python
import string
fileName=open('Direct_Irr.txt', 'r') # read file
directIrr = fileName.readlines()
fileName.close()
for line in directIrr:
line.rstrip('\n')
print directIrr
On Mon, 12 Jul 2010 13:56:38 +0100, bart.c wrote:
"Steven D'Aprano" wrote in
message news:4c3aedd5$0$28647$c3e8...@news.astraweb.com...
On Mon, 12 Jul 2010 09:48:04 +0100, bart.c wrote:
That's interesting. So in Python, you can't tell what local variables a
function has just by looking at
On Jul 12, 4:11 pm, Nick Raptis wrote:
> Hi Richard!> I have downloaded iptcinfo and placed it in
> python27\Lib\site-packages
> > \iptcinfo
>
> > I guessed that was the right place, because that is where PIL ended
> > up, but that had a fancy installer with it.
>
> You did place it in the right
On 7/11/2010 5:24 PM, Steven D'Aprano wrote:
On Sun, 11 Jul 2010 08:59:06 -0700, dhruvbird wrote:
Why doesn't python's list append() method return the list itself? For
that matter, even the reverse() and sort() methods? I found this link
(http://code.google.com/edu/languages/google-python- clas
On Jul 12, 4:20 pm, Hrvoje Niksic wrote:
> dhruvbird writes:
> > No, I meant x.append(4)
> > Except that I want to accomplish it using slices.
>
> > (I can do it as x[lex(x):] = [item_to_append] but is there any other
> > way?)
>
> It seems that you've found a way to do so, so why do you need ano
Emile van Sebille fenx.com> writes:
>
> On 7/12/2010 2:52 AM Robin Becker said...
>
> > What value should round(-9.85,1) return?
>
> Per round's definition, -9.9.
No. The float that's represented by the literal '-9.85' *isn't*
exactly -9.85, for all the usual binary floating-point reasons.
T
On Jul 12, 1:16 pm, John Nagle wrote:
> On 7/12/2010 7:19 AM, Grant Edwards wrote:
>
> > On 2010-07-09, Les Schaffer wrote:
>
> >> i have been asked to guarantee that a proposed Python application will
> >> run continuously under MS Windows for two months time. And i am looking
> >
* Steven D'Aprano, on 12.07.2010 04:39:
On Mon, 12 Jul 2010 03:12:10 +0200, Alf P. Steinbach /Usenet wrote:
* MRAB, on 12.07.2010 00:37:
[...]
In Java a variable is declared and exists even before the first
assignment to it. In Python a 'variable' isn't declared and won't exist
until the firs
MRAB writes:
> John Bokma wrote:
[..]
>> Can't think of why not. Of course not all operations are shared by each
>> OS, but /I/ know that I can't do chmod on Windows. But it doesn't mean
>> that on Windows I can't make a file only readable by me. Just give me
>> the Windows security options on
On 7/12/2010 2:52 AM Robin Becker said...
What value should round(-9.85,1) return?
Per round's definition, -9.9. String interpolation for %n.mf doesn't
appear to define it's rounding behavior, so a peek at the source would
answer what's being done.
It does look inconsistent however, and i
I've resolved this issue by deleting the *.py file association in
Windows.
You can do this either by associating *.py with something like
textpad, using a utility such as http://defaultprogramseditor.com/ or
doing so in the registry.
Note that when using the command like you need to issue command
* sturlamolden, on 12.07.2010 16:59:
On 12 Jul, 07:51, "Alf P. Steinbach /Usenet" wrote:
We're talking about defining a 'swap' routine that works on variables.
I did not miss the point. One cannot make a swap function that rebinds
its arguments in the calling stack frame. But a swap function
Hi,
I am planning to build a generic node based framework using python. I
would start with a simple image editing application. I hope that
experienced users understands what am I trying to say here. In simple
words:
LoaderNode : Load Image from disk
OperatorNode : Performs a specific task on data
On 7/12/2010 7:19 AM, Grant Edwards wrote:
On 2010-07-09, Les Schaffer wrote:
i have been asked to guarantee that a proposed Python application will
run continuously under MS Windows for two months time. And i am looking
^^
IMO, that's going to be your main
On 07/12/2010 01:44 AM, rantingrick wrote:
> On Jul 11, 11:31 am, Thomas Jollans wrote:
>> On 07/11/2010 07:44 AM, rantingrick wrote:
>
>>> Congratulations on this effort Luke. However you know what project i
>>> would really like to see the community get around? ...dramatic pause
>>> here... a c
On 07/12/2010 02:52 AM, Robin Becker wrote:
A client wants to know why his db number -9.85 gets displayed by some
simple code as -9.8
I looked at the number and see that
>>> -9.85
-9.8496
ie I expect simple rounding to produce the observed result and indeed
>>> '%.1f' % -9.85
'-9
Hi Richard!
I have downloaded iptcinfo and placed it in python27\Lib\site-packages
\iptcinfo
I guessed that was the right place, because that is where PIL ended
up, but that had a fancy installer with it.
You did place it in the right path, but the "fancy installer" does one
more thing, it
Alexander Eisenhuth stacom-software.de> writes:
>File "C:\Python25\lib\pickle.py", line 954, in load_float
> self.append(float(self.readline()[:-1]))
> ValueError: invalid literal for float(): -1.#IND
>
> - I'm not sure what -1.#IND means. Can somebody assist?
It's the Windows way of r
On 12 Jul, 07:51, "Alf P. Steinbach /Usenet" wrote:
> We're talking about defining a 'swap' routine that works on variables.
I did not miss the point. One cannot make a swap function that rebinds
its arguments in the calling stack frame. But a swap function can swap
values, given that the type i
On 2010-07-12, Grant Edwards wrote:
> On 2010-07-12, Alexander Eisenhuth wrote:
>
>> python: 2.5.1
>> palttform: winXP
>>
>> I'm using pickle.dump and pickle.load with data that is created in a
>> wrapped (boost.python) piece of C++ code. pickle.dump works fine.
>> pickle.load creates the followi
On 2010-07-12, Alexander Eisenhuth wrote:
> python: 2.5.1
> palttform: winXP
>
> I'm using pickle.dump and pickle.load with data that is created in a
> wrapped (boost.python) piece of C++ code. pickle.dump works fine.
> pickle.load creates the following exception:
>
> [...]
> data = pickle.l
Hello together,
python: 2.5.1
palttform: winXP
I'm using pickle.dump and pickle.load with data that is created in a wrapped
(boost.python) piece of C++ code. pickle.dump works fine. pickle.load creates
the following exception:
[...]
data = pickle.load(input)
File "C:\Python25\lib\pickl
On 2010-07-11, Thomas Jollans wrote:
> On 07/11/2010 08:45 PM, wheres pythonmonks wrote:
>> On #3: Sorry this is confusing, but I was browsing some struct array
>> code from numpy, in which one of the columns contained strings, but
>> the type information, supplied in numpy.array's dtype argument
On 2010-07-09, Les Schaffer wrote:
> i have been asked to guarantee that a proposed Python application will
> run continuously under MS Windows for two months time. And i am looking
^^
IMO, that's going to be your main problem.
--
Grant Edwards g
My Code
`import os
from PIL import Image
from iptcinfo import IPTCInfo
info = IPTCInfo('test.jpg')
print info.keywords, info.supplementalCategories, info.contacts
caption = info.data['caption/abstract']
print caption`
running Win XP SP3
I get the message
No module: iptcinfo
I have downloaded i
Stephen:
I'm not adverse to being able to do that, but the number of times that I've
wanted to do that is greatly outweighed by the number of times I've had to
pass a function "(somestring,)" or call "if isinstance(foo, basestring):
..." to avoid producing a bug. The more abstract and adaptive th
"Steven D'Aprano" wrote in message
news:4c3aedd5$0$28647$c3e8...@news.astraweb.com...
On Mon, 12 Jul 2010 09:48:04 +0100, bart.c wrote:
That's interesting. So in Python, you can't tell what local variables a
function has just by looking at it's code:
def foo(day):
if day=="Tuesday":
x=0
dhruvbird writes:
> No, I meant x.append(4)
> Except that I want to accomplish it using slices.
>
> (I can do it as x[lex(x):] = [item_to_append] but is there any other
> way?)
It seems that you've found a way to do so, so why do you need another
way? Are you after elegance? Efficiency? Brevi
On Mon, Jul 12, 2010 at 8:49 PM, Gilles Ganault wrote:
>>There are almost a dozen of Python "forum apps" for Django alone, and
>>Python is known as "the language with more web frameworks than keywords".
Speaking of frameworks and python forums, sahriswiki 91)
is not a forum, but it's goals are to
On Jul 12, 1:21 am, rantingrick wrote:
> On Jul 11, 5:28 pm,Fuzzyman wrote:
>
> > But why hijack someone else's announcement to do that? Congratulations
> > alone would have been great. However good your intentions your message
> > came across as "but it would really have been better if you had be
On Sat, 10 Jul 2010 18:37:00 +0200, Bruno Desthuilliers
wrote:
>There are almost a dozen of Python "forum apps" for Django alone, and
>Python is known as "the language with more web frameworks than keywords".
Thanks for the tip. I'll head that way.
--
http://mail.python.org/mailman/listinfo/pyth
On Jul 12, 10:52 am, Robin Becker wrote:
> What value should round(-9.85,1) return? Is the result explainable in python
> (ie
> without resort to the internal FP representations etc etc)?
As you observe, the closest float to -9.85 is actually just a little
smaller (i.e., closer to 0) than -9.85:
rantingrick wrote:
On Jul 11, 3:03 am, "Günther Dietrich"
wrote:
So, it is not a disadvantage that the functions you listed above are
named in this way. In the contrary, it is an advantage, as it keeps
newcomers from using stupid variable names.
"int" for an Integer is stupid?
"list"
1 - 100 of 121 matches
Mail list logo