Thanks, being new to this, I wasn't sure if I should use None, Null,
Nope, Nada, or Nil!
I'm going to be loading a list into an MS Access db. Do you know if I
load None into an Access field if Access will recognize that as
blank/null? I suppose I'll just go test it out.
Thanks again...
Kevin
> What I *really* want is to keep a collection of all the Spam instances,
> and if i try to create a new Spam instance with the same contructor
> parameters, then return the existing Spam instance. I thought new-style
> classes would do it:
> So what is the best/preferred way to do this?
Use t
I'm not sure what you mean, really, do you need an official Python
"Null" value? Try None?
In [6]: myCells = ['Mary', 'Bob', None, 'Joe']
In [7]: for cell in myCells:
...: if cell:
...: print cell
...: else:
...: print "NULL VALUE"
...:
Mary
Bob
NULL VALUE
J
I couldn't think of a good subject..
Basically, say I have a class
class Spam:
def __init__(self, x):
self.x = x
then if I create two instances:
a = Spam('foo')
b = Spam('foo')
a == b # False
What I *really* want is to keep a collection of all the Spam instances,
and if i try to
On 5 Oct 2005 08:38:44 -0700, [EMAIL PROTECTED] wrote:
>Hi,
>
>I'm learning Python now and I'm really pleased with everything so far,
>however, at some point I'll want to develop a Windows application (no
>other OS at this point). The question are:
>1. What toolkit is best for Windows develo
Bell, Kevin wrote:
>I'm pulling a list of numbers from MS Excel, but occasionally if there
>is no data from excel, the value is an asterisk, but I need to make it
>null.
>
>What is the best way to do that? Thus far, I'm using:
>
>
>for value in myRange:
> try:
> intV = int(value
Another page with up to date IronPython information:
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>, spiffo <[EMAIL PROTECTED]> wrote:
> .
> .
>
"Java and Swing" wrote:
>i dont have a myapp.pyd ...i have myapp.c, or are u suggesting I dump
> the dll?
if that's what you're trying to import, yes.
> or the swig generated python file?
> the swig generated python file only has .py and .pyc.
huh? if you have a swig-generated python file, why
Hi,
I'm learning Python now and I'm really pleased with everything so far,
however, at some point I'll want to develop a Windows application (no
other OS at this point). The question are:
1. What toolkit is best for Windows development?
2. Which toolkits can I exclude from consideration?
"Mike" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> However when I pull it into python the URL ends up looking like this
> (notice the & instead of just & in the URL)
>
> Any ideas?
Some code would be helpful: the "&" is in the page source to start
with (which is as it ought to
I'm pulling a list of numbers from MS Excel, but occasionally if there
is no data from excel, the value is an asterisk, but I need to make it
null.
What is the best way to do that? Thus far, I'm using:
for value in myRange:
try:
intV = int(value)
print intV
[Wenhua Zhao]
> a = b | 1
> a = b if b != nil
> else a =1
> Is there such expression in python?
Hi. Merely write:
a = b or 1
In Python, there is no `nil'. `a' will receive 1 instead of the value of
`b' only if `b' is either zero, None, False, or empty in some way.
--
François Pinard ht
Thomas Heller wrote:
>>Thomas Heller wrote:
>>
>>
>>>I'm about to add some logging calls to a library I have. How can I
>>>prevent that the script that uses the library prints
>>>'No handlers could be found for logger "comtypes.client"' when the
>>>script runs?
>>>I would like to setup the lo
Wenhua Zhao wrote:
> I have a list of lines. I want to feed these lines into a function.
> The input of this function is a file.
> I want to creat a temp file on disk, and write the list of lines into
> this temp file, then reopen the file and feed it to the function.
> Can I create a this temp fi
Wenhua Zhao wrote:
> a = b | 1
>
> a = b if b != nil
> else a =1
>
> Is there such expression in python?
Soon there will be, but currently: no. What you are after is a ternary
operator like _?_:_ in C. There have been plenty of discussions about
these - search this NG. Depending on your usecas
Wenhua Zhao wrote:
>I have a list of lines. I want to feed these lines into a function.
>The input of this function is a file.
>I want to creat a temp file on disk, and write the list of lines into
>this temp file, then reopen the file and feed it to the function.
>Can I create a this temp file o
i dont have a myapp.pyd ...i have myapp.c, or are u suggesting I dump
the dll? or the swig generated python file?
the swig generated python file only has .py and .pyc.
--
http://mail.python.org/mailman/listinfo/python-list
a = b | 1
a = b if b != nil
else a =1
Is there such expression in python?
Thanks a lot!
--
http://mail.python.org/mailman/listinfo/python-list
I have a list of lines. I want to feed these lines into a function.
The input of this function is a file.
I want to creat a temp file on disk, and write the list of lines into
this temp file, then reopen the file and feed it to the function.
Can I create a this temp file on memory???
Jeremy Jon
"parul garg" wrote:
> i am new to python.i hav to call function of c++ .so file(shared
> library)on linux.
> any how i am not able to do that.
> i had made one zoo.so file.when i import it this gives the following error...
>
import zoo
> Traceback (most recent call last):
> File "", line 1,
> This is naive. Testing doesn't guarantee anything. If this is what you
> think about testing, then testing gives you a false impression of
> security. Maybe we should drop testing.
Typechecking is done by a reduced lamda calculus (System F, which is
ML-Style), whereas testing has the full power
"Java and Swing" wrote:
>>> from ctypes import *
>>> myapp = cdll.LoadLibrary("c:\\myapp.dll")
>>> dumpbin /exports myapp.pyd
>
> i get, SyntaxError: invalid syntax with it pointing at the first "p" in
> myapp.pyd.
dumpbin is a command-line utillity, usually included in the compiler
toolsuite...
Wenhua Zhao wrote:
>A.T.T
>
>Thanks a lot.
>
>
If you could elaborate a bit more, it might be helpful. I'm guessing
you want something like StringIO or cStringIO.
- jmj
--
http://mail.python.org/mailman/listinfo/python-list
Here's how:
1. open your web browser
2. visit the url http://docs.python.org
3. click the link "Library Reference" (keep this under your pillow)
4. scan down the list of modules until you see these two items:
4.6 StringIO -- Read and write strings as files
4.7 cStringIO -- Faster v
On 2005-10-05, Java and Swing <[EMAIL PROTECTED]> wrote:
> i tried...
>
>>> from ctypes import *
>>> myapp = cdll.LoadLibrary("c:\\myapp.dll")
>>> dumpbin /exports myapp.pyd
>
> i get, SyntaxError: invalid syntax with it pointing at the first "p" in
> myapp.pyd.
Um, just a guess, but I don't think
A.T.T
Thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
This is great Jimmy and thanks. Py2exe is too handy of a project to let
fall into obsolescence. I especially appreciate your willingness to
work with other projects in developing synergies between them.
Thanks again.
Jimmy Retzlaff wrote:
> I am taking over the maintenance and support of py2ex
Given that the format is consistent (and the last char is not part of
the number you want), you can probably do something like this:
x = int('10944800e'[:-1])
Disclaimer: I am a n00b. YMMV ;-)
--
http://mail.python.org/mailman/listinfo/python-list
> i am new to python.i hav to call function of c++ .so file(shared
> library)on linux.
> any how i am not able to do that.
> i had made one zoo.so file.when i import it this gives the following error...
>
>
import zoo
>
> Traceback (most recent call last):
> File "", line 1, in ?
> ImportE
Hi, I am using Python to scrape web pages and I do not have problem
unless I run into a site that is utf-8. It seems & is changed to &
when the site is utf-8.
If I try to replace it with .replace('&','&') it for some reason
does not replace it.
For example: http://today.reuters.co.uk/news/def
On Wed, 05 Oct 2005 07:24:31 -0700, Java and Swing wrote:
> i have printed out some numbers and they look like
>
> 10944800e
> 10952560d
They don't look like numbers to me. They have letters at the end. What are
they? What does the letter mean?
> ...if i want to later assign this type of numbe
doh! nevermind, my original output had e and d in it.
--
http://mail.python.org/mailman/listinfo/python-list
i tried...
>> from ctypes import *
>> myapp = cdll.LoadLibrary("c:\\myapp.dll")
>> dumpbin /exports myapp.pyd
i get, SyntaxError: invalid syntax with it pointing at the first "p" in
myapp.pyd.
--
http://mail.python.org/mailman/listinfo/python-list
i have printed out some numbers and they look like
10944800e
10952560d
...if i want to later assign this type of number to variable how can i
do it?
for example i can't do...
>> x = 10944800e
..since it says "invalid token" on the "e".
thanks.
--
http://mail.python.org/mailman/listinfo/pyth
looks sad :(
ok, until the decision not found, i've run my script (if someone have the same
problem) using sh-script like this:
#!/bin/sh
while true
do
myscript.py
echo "scrip was fault" | mail -s "run.sh" [EMAIL PROTECTED]
done
... still works ;)
Franz Steinhaeusler wrote:
> Tamer, thanks
Hi,
I'am writting a simple SOAP client in python (2.4) using SOAPpy lib.
I've met with this problem:
when I want to send a list of complex type using
some method from WebService(java,WAS),
I'v got an exception:
**
SOAPpy.Types.faultType:
http://www.w3.org/
Hi,
thank you very much for your tipps. I get it to work!
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
> Thomas Heller wrote:
>> I'm about to add some logging calls to a library I have. How can I
>> prevent that the script that uses the library prints
>> 'No handlers could be found for logger "comtypes.client"' when the
>> script runs?
>> I would like to setup the logging so that there is no loggin
Antoon Pardon <[EMAIL PROTECTED]> writes:
>>> They also relieve a burden from the run-time, since all variables
>>> are declared, the runtime doesn't has to check whether or not
>>> a variable is accesible, it knows it is.
>> Not in a dynamic language. Python lets you delete variables at run
>> tim
>>result=python_command(' command_on_the_bash ')
>>
>>Is that possible? And how to do that?
>>
>>
>
>Check out the commands module.
>
>http://docs.python.org/lib/module-commands.html
>
Hmm, I forgot this one. It is only working from UNIX, am I right?
Les
--
http://mail.python.org/mailman
alexLIGO wrote:
>Hi,
>
>I would like to execute some command in python on the bash, e.g.
>
>os.system('globus-job-run mike4.cct.lsu.edu/jobmanager-pbs -l
>/bin/date')
>
>and want the result of the output in a vector, so something like:
>
>result=python_command(' command_on_the_bash ')
>
>Is that p
Interesting. I'd noticed that the metaclass one didn't crash my 2.2, but I
didn't check the marshal one.
This one core dumps in 'Python 2.2.2 (#1, Feb 24 2003, 19:13:11) ... linux2'
but inexplicably prints 'keys' when I ran it on the 2.4.1 I used in my last
post.
>>> import marshal
>>> f = lambd
"alexLIGO" <[EMAIL PROTECTED]> writes:
> I would like to execute some command in python on the bash, e.g.
>
> os.system('globus-job-run mike4.cct.lsu.edu/jobmanager-pbs -l
> /bin/date')
>
> and want the result of the output in a vector, so something like:
>
> result=python_command(' command_on_the
Hi,
I would like to execute some command in python on the bash, e.g.
os.system('globus-job-run mike4.cct.lsu.edu/jobmanager-pbs -l
/bin/date')
and want the result of the output in a vector, so something like:
result=python_command(' command_on_the_bash ')
Is that possible? And how to do that?
hi
i am new to python.i hav to call function of c++ .so file(shared
library)on linux.
any how i am not able to do that.
i had made one zoo.so file.when i import it this gives the following error...
>>> import zoo
Traceback (most recent call last):
File "", line 1, in ?
ImportError: ./zoo.so: und
[EMAIL PROTECTED] wrote:
> I've rewritten your middle example to be clearer.
> $ python2.4
> Python 2.4.1 (#1, May 16 2005, 15:15:14)
> [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
type("Y", (type,), {"mro": lambda
Ben Sizer wrote:
> Fredrik Lundh wrote:
>
>
>>it's also mentioned in chapter 4 of the tutorial:
>>
>>http://docs.python.org/tut/node6.html#SECTION00671
>>
>> "*Important warning*: The default value is evaluated only once. This
>>makes a difference when the default is a
Brandon K" wrote:
> Here's the Script it was being used in (forgive it if it seems a bit
> messy, i have been tinkering with variables and such to try different
> ideas and haven't really cleaned it up).
the C compiler does in fact provide you with some clues:
c:\test\c_lib.cpp(22) : warning C47
On Wed, 05 Oct 2005 06:48:59 +, CJ wrote:
>
>Hey, I'm new to the Python world, but I do have experience in several
> other languages. I've been running through a tutorial, and I decided that
> I'd make a program that runs through a list, finds if there are any
> duplicates. The progra
beza1e1:
> Coming back from a bug hunt, i am not sure what to think of this python
> behaviour. Here is a demo program:
>
> class A:
>def __init__(self, lst=[]):
> self.lst = lst
>
> a = A()
> b = A()
> b.lst.append("hallo")
> print a.lst # output: ["hallo"]
>
> The point seems to be,
Hi,
I am trying to upload zip files using ftplib module. The server has
Vsftpd 2.0.3 installed on it.
I was able to succesfully upload files using ftplib and Vsftpd on the
server locally connected.
Now, I want to transfer files to remote server using the same script.
I am getting the following e
may be this you will find usefull:
def getLog(logName, fileName = None):
if fileName:
hdl = logging.FileHandler(fileName)
else:
hdl = logging.StreamHandler()
fmt =
logging.Formatter("%(name)s:\t%(levelname)s:\t%(asctime)s:\t%(message)s")
hdl.setFormatter(f
On Wed, 05 Oct 2005 14:53:45 +0200, Tamer Fahmy
<[EMAIL PROTECTED]> wrote:
>On Tue, 04 Oct 2005 19:13:10 +0300, Maksim Kasimov wrote:
>> my programm sometime gives "Segmentation fault" message (no matter how
>> long the programm had run (1 day or 2 weeks). And there is nothing in
>> log-files that
Java and Swing wrote:
>I used, myApp = CDLL("C:...") ...as I saw it in one of the ctypes
> samples.
>
> Anyhow, I tried...
>
> myApp = cdll.LoadLibrary("C:\\myapp.dll")
> myApp.AddNumbers(1, 4)
>
> ..I get an error...
>
> AttributeError: function 'AddNumbers' not found
>
> ...myapp certainly has A
Paul Rubin wrote:
> So where are the complex templates and dangerous void pointers in ML?
You're right about that of course. There aren't any templates or
pointers in COBOL either as far as I know, and COBOL has been used
for lots of real world code (which ML hasn't).
I don't know what your point
On Tue, 04 Oct 2005 19:13:10 +0300, Maksim Kasimov wrote:
> my programm sometime gives "Segmentation fault" message (no matter how
> long the programm had run (1 day or 2 weeks). And there is nothing in
> log-files that can points the problem. My question is how it possible to
> find out where is t
Paul Rubin wrote:
> You'd have to declare any variable global, or declare it local, or it
> could be a function name (defined with def) or a function arg (in the
> function scope), or maybe you could also declare things like loop
> indices. If it wasn't one of the above, the compiler would flag it
Brian Quinlan <[EMAIL PROTECTED]> writes:
> Aren't you looking for some of compile-time checking that ensures that
> only declared variables are actually used? If so, how does global help?
You'd have to declare any variable global, or declare it local, or it
could be a function name (defined with
Fredrik Lundh wrote:
> it's also mentioned in chapter 4 of the tutorial:
>
> http://docs.python.org/tut/node6.html#SECTION00671
>
> "*Important warning*: The default value is evaluated only once. This
> makes a difference when the default is a mutable object such as a
On Wed, 05 Oct 2005 03:39:30 -0700, beza1e1 wrote:
> Coming back from a bug hunt, i am not sure what to think of this python
> behaviour.
[snip code]
> The point seems to be, that lst=[] creates a class attribute (correct
> name?), which is shared by all instances of A. So a.lst ist the same
> o
On Wed, 05 Oct 2005 13:46:30 +0530, Iyer, Prasad C wrote:
>
> Actually I am bit confused between the modules and .py file
> How do I differentiate between the 2.
>
> For example
> I have a file import1.py, import2.py file
>
> Which has few functions and classes
> And if I have a class with same
Python_it wrote:
> I know how to insert values in a database.
> That's not my problem!
> My problem is how i insert NULL values in de mysql-database.
> None is een object in Python and NULL not.
> None is not converted to NULL?
> Table shows None and not NULL!
None is converted to mysql's NULL and
Python_it wrote:
> I know how to insert values in a database.
> That's not my problem!
> My problem is how i insert NULL values in de mysql-database.
So you *don't* know how to insert values in a database: as Laszlo wrote,
you might be best using parameterized queries.
> None is een object in Py
Python_it wrote:
> I know how to insert values in a database.
> That's not my problem!
> My problem is how i insert NULL values in de mysql-database.
> None is een object in Python and NULL not.
> None is not converted to NULL?
> Table shows None and not NULL!
As Laszlo wrote, "None will be conver
I'm about to add some logging calls to a library I have. How can I
prevent that the script that uses the library prints
'No handlers could be found for logger "comtypes.client"' when the
script runs?
I would like to setup the logging so that there is no logging when
nothing is configured, and no
> Yes, give us the error. And know that you can't build raw IP packets
> unless you're root.
>
> Sybren
Sorry. I forgot to paste the error:
Traceback (most recent call last):
File "C:\test\client.py", line 156, in ?
send_pkt()
File "C:\test\client.py", line 96, in send_pkt
s.sendto(i
Here's the Script it was being used in (forgive it if it seems a bit
messy, i have been tinkering with variables and such to try different
ideas and haven't really cleaned it up).
import ctest
import Tkinter
import threading
hue_map =
("#FF","#FEFEFF","#FDFDFF","#FCFCFF","#FBFBFF","#FAFAF
I used, myApp = CDLL("C:...") ...as I saw it in one of the ctypes
samples.
Anyhow, I tried...
myApp = cdll.LoadLibrary("C:\\myapp.dll")
myApp.AddNumbers(1, 4)
..I get an error...
AttributeError: function 'AddNumbers' not found
...myapp certainly has AddNumbers.
Grant Edwards wrote:
> On 2005-
On Wed, 05 Oct 2005 00:10:12 -0700, [EMAIL PROTECTED] wrote:
> hi,
>
> to get howmany element list appear you can code:
> ttllst=[4,3,45,3]
> for x in ttllst:
> print x, ttllst.count(x)
> pass
>
> to get non duplicate element list you can code:
> ttllst=[4,3,45,3]
>
Brandon Keown wrote:
>I have programmed a fractal generator (Julia Set/Mandelbrot Set) in
> python in the past, and have had good success, but it would run so
> slowly because of the overhead involved with the calculation. I
> recently purchased VS .NET 2003 (Win XP, precomp binary of python
Maksim Kasimov a écrit :
>
> yes, to generete core dump is the best way,
>
> but the command "$ ulimit -c 50" don't make python to generete core
> dump in the time of crush.
>
> I would like to know how to run python script so if it crushes than core
> dump will be genereted.
>
> Thanks
>
Mike Meyer wrote:
(snip)
> Antoon, at a guess I'd say that Python is the first time you've
> encountered a dynamnic language. Being "horrified" at not having
> variable declarations,
Mike, "being horrified" by the (perceived as...) lack of variable
declaration was the OP's reaction, not Antoon's.
Thanks for you answer! This copy trick is the most elegant solution i
think.
--
http://mail.python.org/mailman/listinfo/python-list
In case you missed it, I said I have windows XP. Windows XP
pre-compiled python binaries are built on VS .NET 2003. In order to
build extensions, you need the compiler the interpreter was built on, or
at least that is what is reported to me by calling setup.py. If I was
using linux, which I
Paul Rubin wrote:
>>Which is evaluated at runtime, does not require that the actual global
>>variable be pre-existing, and does not create the global variable if
>>not actually assigned. I think that is pretty different than your
>>proposal semantics.
>
>
> Different how?
Aren't you looking for
I know how to insert values in a database.
That's not my problem!
My problem is how i insert NULL values in de mysql-database.
None is een object in Python and NULL not.
None is not converted to NULL?
Table shows None and not NULL!
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> As far as I understand people don't like global very much so I don't
> expect that a second keyword with the same kind of behaviour has
> any chance.
That's why the behaviour I suggest is different than the current behaviour
of global. Arguments against global (it is the on
Steve Holden wrote:
> Interestingly I couldn't find this in the FAQ, though it *is* a
> frequently-asked question [note: my not finding it doesn't guarantee
> it's not there].
it's there:
http://www.python.org/doc/faq/general.html#why-are-default-values-shared-between-objects
(maybe "defau
Sorry guys for that .py in import.
It was typing mistake.
Extremely sorry
regards
prasad chandrasekaran
--- Cancer cures smoking
#-Original Message-
#From: Steve Holden [mailto:[EMAIL PROTECTED]
#Sent: Wednesday, October 05, 2005 2:43 PM
#To: python-list@python.org
#Subject: R
>
> BTW, you did not write which driver are you using.
Oh, you did. Sorry. :-( Import your DB module 'yourmodule' and then
print yourmodule.paramstyle
Description of paramstyle is also in PEP249:
paramstyle
String constant stating the type of parameter marker
Python 2.4
MySQL-python.exe-1.2.0.win32-py2.4.zip
How can I insert a NULL value in a table (MySQL-database).
I can't set a var to NULL? Or is there a other possibility?
My var must be variable string or NULL.
Becaus i have a if statement:
if
cursor.execute(".insert NULL
Antoon Pardon wrote:
> Op 2005-10-04, Ron Adam schreef <[EMAIL PROTECTED]>:
>
>>Antoon Pardon wrote:
>>
>>>Op 2005-10-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>>>
And lo, one multi-billion dollar Mars lander starts braking either too
early or too late. Result: a new crater on Mars,
Python_it wrote:
>Python 2.4
>MySQL-python.exe-1.2.0.win32-py2.4.zip
>
>How can I insert a NULL value in a table (MySQL-database).
>I can't set a var to NULL? Or is there a other possibility?
>My var must be variable string or NULL.
>Becaus i have a if statement:
>if
> cursor.execute("..
beza1e1 wrote:
> Coming back from a bug hunt, i am not sure what to think of this python
> behaviour. Here is a demo program:
>
> class A:
>def __init__(self, lst=[]):
> self.lst = lst
>
> a = A()
> b = A()
> b.lst.append("hallo")
> print a.lst # output: ["hallo"]
>
> The point seems t
Python.org General FAQ 1.4.21: Why are default values shared between
objects?
(http://www.python.org/doc/faq/general.html#why-are-default-values-shared-between-objects)
--
http://mail.python.org/mailman/listinfo/python-list
beza1e1 wrote:
> Coming back from a bug hunt, i am not sure what to think of this python
> behaviour. Here is a demo program:
>
> class A:
>def __init__(self, lst=[]):
> self.lst = lst
>
> a = A()
> b = A()
> b.lst.append("hallo")
> print a.lst # output: ["hallo"]
>
> The point seems t
Antoon Pardon wrote:
> Op 2005-10-05, Steve Holden schreef <[EMAIL PROTECTED]>:
[...]
>
> Anyway, I have searched the source of the test for all testing
> with regards to < and after some browsing back and fore it seems
> it all boils down to the following two tests.
>
>self.assert_(not {} <
beza1e1> class A:
beza1e1>def __init__(self, lst=[]):
beza1e1> self.lst = lst
Lists are mutable and default args are only evaluated once, at function
definition. If you want independent default args use:
class A:
def __init__(self, lst=None):
if lst
Hi,
[EMAIL PROTECTED] wrote:
> this message is geared toward those of you in the scientific community.
> i'm looking for a python plotting library that can support rendering
> greek symbols and other various characters on plot axes labels, etc. I
> would prefer something that adheres to tex format
Coming back from a bug hunt, i am not sure what to think of this python
behaviour. Here is a demo program:
class A:
def __init__(self, lst=[]):
self.lst = lst
a = A()
b = A()
b.lst.append("hallo")
print a.lst # output: ["hallo"]
The point seems to be, that lst=[] creates a class attribu
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> "10001234" -> ""10.001.234""
> So I need thousand separators.
> Can anyone helps me with a simply solution (like %xxx) ?
I think you're supposed to do a locale-specific conversion (I've never
understood that stuff). You could also do something lik
[EMAIL PROTECTED] wrote:
> Hi !
>
> I need to convert some integer values.
>
> "1622" ->"1 622"
>
> or
>
> "10001234" -> ""10.001.234""
>
> So I need thousand separators.
>
> Can anyone helps me with a simply solution (like %xxx) ?
The module locale does what you need, look at ist docs, espe
One possible solution. Don't know how efficient it is though. :-)
>>> def put_decimal(s):
... return ''.join( [ [s[i], '.%s' % s[i]][(len(s)-i)%3 == 0] for i
in range(0, len(s))])
...
>>> put_decimal("10001234")
'10.001.234'
>>> put_decimal("12622")
'12.622'
thanks,
Satchit
[EMAIL PROTE
Hi !
I need to convert some integer values.
"1622" ->"1 622"
or
"10001234" -> ""10.001.234""
So I need thousand separators.
Can anyone helps me with a simply solution (like %xxx) ?
Thanx for it: dd
Ps:
Now I use this proc:
def toths(i):
s=str(i)
l=[]
ls=len(s)
for i in rang
Op 2005-10-05, Duncan Booth schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> It also is one possibility to implement writable closures.
>>
>> One could for instace have a 'declare' have the effect that
>> if on a more inner scope such a declared variable is (re)bound it
>> will rebind the
Op 2005-10-05, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>>
>> I have been searching some more and finally stumbled on this:
>>
>> http://docs.python.org/ref/comparisons.html
>>
>> Mappings (dictionaries) compare equal if and only if their sorted
>> (key, value) lists
Thanks Fredrik.
Went through the code to make sure "self" was used properly and one of the parent classes was missing a "self".It's fixed now.
/me kicks self
-toufeeqOn 10/5/05, Toufeeq Hussain <[EMAIL PROTECTED]> wrote:
Fredrik,
sigh!
I see the problem you mention and I agree.
Should have post
I had in the past the most ridiculous erection in the world,4in.I'm not
poor and then,I used all the supposed "miraculous products" to
rectify.Vainly.Until one of my friends,who experimented it
himself,advise me to use an african grass,in the way of tea.As long as
I haven't obtain the desired size.
[Mike]
> Is there a python library, that is able to create Excel files with
> unicode characters.
pyExcelerator claims to do this, but I've never used it.
http://sourceforge.net/projects/pyexcelerator/
--
Richie Hindle
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Brian Quinlan wrote:
> Paul Rubin wrote:
>
>>Brian Quinlan <[EMAIL PROTECTED]> writes:
>>
>>
>>>Have those of you who think that the lack of required declarations in
>>>Python is a huge weakness given any thought to the impact that adding
>>>them would have on the rest of the language? I can't ima
101 - 200 of 242 matches
Mail list logo