If I try to invoke python via the command prompt I get an error
"command prompt: the ntvdm cpu has encountered an illegal
instruction..."
I don't get this problem if I first cd to the python directory. I am
running python 3.0 on windows.
--
http://mail.python.org/mailman/listinfo/python-list
On 24 May, 18:32, Gerhard Häring wrote:
>
> Running Python from the Cygwin shell? Try from outside Cygwin, then.
>
No I am running from the windows command prompt.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Python 2.5.2
WinXP
I'm using CGIHTTPServer.py and want to return a response code of 400
with a message in the event that the cgi script fails for some
reason. I notice that
run_cgi(self):
executes this line of code,
self.send_response(200, "Script output follows")
which overwrites any hea
eed to
be able to capture n-tuples. Can someone help point me to the correct
re or a better way to solve this?
Thanks in advance,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 23, 4:22 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Apr 23, 6:24 pm, Daniel <[EMAIL PROTECTED]> wrote:
>
> > I have a list of strings, which I need to convert into tuples. If the
> > string is not in python tuple format (i.e. "('one',
ports
sys.path.append('\\'.join(os.path.dirname(__file__).split('\\')
[:len(os.path.dirname(__file__).split('\\'))-1]) + "\\" + dir)
Any and all suggestions appreciated. Thanks in advance.
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 21, 12:26 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Thu, 21 Aug 2008 13:04:51 -0300, Daniel <[EMAIL PROTECTED]>
> escribi :
>
> > I have a project that I've decided to split into packages in order to
> > organize my code b
On Aug 21, 2:22 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Daniel a écrit :
>
> > Hello,
>
> > I have a project that I've decided to split into packages in order to
> > organize my code better. So what I have looks something like this
>
>
ty descriptor prevents built-in
clutter.
(2) encapsulation of property logic inside function namespace,
preventing clutter in class namespace.
(3) doc string appears in a more natural place, before getter/setter/
delter logic, as in classes and functions.
Cons:
difficult to implement?
Of course, mo
gt; @my_prop.deleter
> def my_prop(): del self._prop
Hmm, interesting. I wonder if it suppports setting the doc-string in a
similar way? I'll have to look into that. Thanks for pointing this
out.
~ Daniel
--
http://mail.python.org/mailman/listinfo/python-list
ml
I have found http://qualitylabs.org/pdbseed/, which helps with
unittests for a live database. This isn't what I'm after.
Does anyone know about a module that acts as a database stub for
python unittests?
Thanks,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
t with the MySQL database is different than
the sqlite portion.
Thanks again,
Daniel
On Aug 26, 4:12 pm, gordyt <[EMAIL PROTECTED]> wrote:
> Daniel I don't know if it would work for your situation or not, but if
> you are using Python 2.5, you could use the now built-in sqlit
he path (and it does).
import os, sys
newpath = os.path.normpath( os.path.join( __file__, "../../" ))
sys.path.append(newpath)
I still get the same error. Can someone please point me in the right
direction? Thanks in advance:
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 27, 11:00 am, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 27 Aug, 18:44, Daniel <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm writing some unit tests for my python software which uses
> > packages. Here is the basic structure:
>
> > mypacka
On Aug 27, 11:00 am, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 27 Aug, 18:44, Daniel <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm writing some unit tests for my python software which uses
> > packages. Here is the basic structure:
>
> > mypacka
On Aug 28, 2:28 am, "Marco Bizzarri" <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 27, 2008 at 6:44 PM, Daniel <[EMAIL PROTECTED]> wrote:
> > Hello,
>
> > I'm writing some unit tests for my python software which uses
> > packages. Here is th
On Aug 29, 11:23 am, cnb <[EMAIL PROTECTED]> wrote:
> If I get zero division error it is obv a poor solution to do try and
> except since it can be solved with an if-clause.
>
> However if a program runs out of memory I should just let it crash
> right? Because if not then I'd have to write excepti
On Aug 29, 1:15 pm, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 29 Aug, 19:08, Daniel <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I have tried running both commands above from the mypackage directory
> > and unittests directory. I get the following res
Hello,
I'm trying to build a very simple IPC system. What I have done is
create Data Transfer Objects (DTO) for each item I'd like to send
across the wire. I am serializing these using cPickle. I've also
tried using pickle (instead of cPickle), but I get the same response.
Below is the code.
On Sep 30, 4:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 30 Sep 2008 18:38:19 -0300, Daniel <[EMAIL PROTECTED]>
> escribió:
>
>
>
> > [BEGIN CODE]
> > #!/usr/bin/python
> > import SocketServer
> > import o
On Sep 30, 5:49 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 30 Sep 2008 19:44:51 -0300, Daniel <[EMAIL PROTECTED]>
> escribió:
>
>
>
> > On Sep 30, 4:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
Hello,
I can't seem to get my sockets code to work right. Here is what I
have inside my RequestHandler handle() function:
total_data=[]
data = True
logger_server.debug(self.__class__.__name__ + ' set data =
True')
while data:
logger_server.debug(self.
wser (no
internet connection required)? That would enable you to use the same
mechanism on all platforms.
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
g/pipermail/xml-sig/2003-March/009244.html
hope it helps.
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
mplete the transaction.
Thanks in advance...
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
i am making a tic-tac-toe game using python. i am pretty new to it,
but cant seem to figure this one out.
Here is my code:
X = "X"
O = "O"
empty = " "
tie = "Tie"
squares = 9
def display():
print """Welcome to Tic-Tac-Toe. Player will play against the
computer.
\nYou will move by
On Dec 9, 6:18 pm, Jon Clements wrote:
> On Dec 9, 11:55 pm, Daniel wrote:
>
>
>
> > i am making a tic-tac-toe game using python. i am pretty new to it,
> > but cant seem to figure this one out.
> > Here is my code:
>
> > X = "X"
> >
On Dec 9, 6:50 pm, MRAB wrote:
> Daniel wrote:
> > i am making a tic-tac-toe game using python. i am pretty new to it,
> > but cant seem to figure this one out.
> > Here is my code:
>
> [snip]
> You problem is due to your choice of variable names, because '0&
ake?
Also, slightly related, is there an easy way to get the sha/md5
deprecation warnings emitted by PyCrypto in Python 2.6 to go away?
~ Daniel
--
http://mail.python.org/mailman/listinfo/python-list
ce them via the warnings module. I suppose that the
> latest version of PyCrypto fixes these warnings.
The version that gets installed by easy_install or pip (2.0.1) emits
those warnings. Is there a more recent version?
Thanks for the feedback.
~ Daniel
--
http://mail.python.org/mailman/listinfo/python-list
is of its key schedule.
Changed easily enough. The updated recipe defaults to AES-192.
I also made one other minor tweak: the global constants were moved to
class-level so they can be overridden more easily if needed.
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
M.-A. Lemburg wrote:
> Daniel wrote:
> > On Jan 26, 12:37 pm, "M.-A. Lemburg" wrote:
> >> Note that your code has a padding bug: the decoder doesn't
> >> undo the padding. You're lucky though, since pickle will only
> >> read as much data a
I created a page with a ".py" extension but the browser does not like
it.
Here is what I did: I edited httpd.conf file and added the line:
AddHandler cgi-script .cgi .py
Then I stopped and restarted apache. Next I created a hello world file
as on this page:
http://deron.meranda.us/python/webserving
Hello,
I would like to know if there is some way to limit the maximum number
of connections to my SimpleHTTPServer. I have built a system that
sends out work from one box to worker boxes and am using
SimpleHTTPServer to send the work. The files are very large
(sometimes as much as 20-30MB). Whe
Hello,
I'm trying to determine the amount of free hard disk space on a remote
windows host. Seems like this should be simple, but it's giving me
grief. Here's what I've tried:
>>> mystat = os.stat('//remotehost/share/')
>>> mystat
(16895, 0L, 0, 0, 0, 0, 0L, 1251731920, 1251731289, 1249399952)
s\n" % error)
return
sys.__stdout__.write("\n")
pdb.do_break("") # print breakpoints
sys.settrace(pdb.trace_dispatch)
I'm sure there is a better way to implement some of this, especially
the part marked with HACK, but it seems to work for me in most
situations.
~ Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have a class with some members that depend on others. Initially most
of them are None.
For each one there is a function to calculate it as soon as some other
dependencies become available.
In the end, all values can be computed by the right sequence of
function applications.
class A:
> >> You might be interested by the story of how AstraZeneca tackled that
> >> kind of problem in PyDrone:http://www.python.org/about/success/astra/
that is interesting! So it seems they store the values in a
dictionary.
For each value they associate a function that gets called when the
value is n
I want to know how to implement concurrent threads in Python
--
http://mail.python.org/mailman/listinfo/python-list
fuck! fuck! i'm gonna be fired if i didnt get this shit! i told my boss id
do it. fuck! im gonna pipe some crakc. fuck...
2013/5/26 Mark Lawrence
> On 26/05/2013 20:10, Daniel Gagliardi wrote:
>
>> I want to know how to implement concurrent threads in Python
>>
>&g
I'm having a little trouble, tried Googling it, but to no avail. Currently, I'm
working on making a snake game, however I'm stuck on a simple border. The only
thing I need help with is when you run the program, the bottom right corner of
the border is missing. I'm not sure why. And I know I'm no
I didn't even think about that! I added one more draw and it worked like a
charm, thanks so much! I'm not sure why I couldn't think of that!
--
http://mail.python.org/mailman/listinfo/python-list
funcs = [ lambda x: x**i for i in range( 5 ) ]
print funcs[0]( 2 )
print funcs[1]( 2 )
print funcs[2]( 2 )
This gives me
16
16
16
When I was excepting
1
2
4
Does anyone know why?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org
> funcs = [ lambda x: x**i for i in range( 5 ) ]
> print funcs[0]( 2 )
> print funcs[1]( 2 )
> print funcs[2]( 2 )
>
> This gives me
>
> 16
> 16
> 16
>
> When I was excepting
>
> 1
> 2
> 4
>
> Does anyone know why?
And more importantly, what's the simplest way to achieve the latter? :)
--
Psss,
t;
>Try giving the lambda a default parameter (they get calculated and
> have their value stored at the time the lambda is defined) like this:
>funcs = [ lambda x, i=i: x**i for i in range( 5 ) ]
Thanks a lot!
I worked around it by
def p(i):
return lambda x: x**i
funcs = [ p(i) fo
turn x**i
>
> i = 3
> def f3(x): return x**i
>
> Is there any surprise that all three functions return the same value?
> They all point to the same global variable i. I'm not sure what it is
> about lambda that fools people into thinking that it is different (I've
> even been fooled myself!) but it is not.
Thank you Steve!
Precise and clear, as always!
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
and to the Django
community in general. Please pass on condolences to his family and friends.
--
Daniel.
--
http://mail.python.org/mailman/listinfo/python-list
alternatively you can use virtualenv to create virtual environments
http://www.virtualenv.org/en/latest/index.html
however, if what you want is automated generation of some of the code,
you can adopt an IDE or create some macros in your text editor of
choice.
From: alex23
Date: 24 Septem
e is that I have all sorts
of recent files in /var/cache/abrt/pyhook-* indicating that somehow
abrt is doing things even though it is not running, for instance
chkconfig --list | grep abrt shows it off in all run levels.
What's going on?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
t;>>> [name for name in sys.modules if "abrt" in name.lower()]
> []
>
> gives a non-empty result I'd investigate where the culprit is imported --
> /usr/lib/python2.6/sitecustomize.py would be the obvious candidate.
Indeed! Thanks a lot,
/usr/lib/python2.6/si
Hi!
I've got import scripts for a bunch of csv files into an sqlite database. I
have one csv file per language. I don't write directly to the sqlite db; this
is a django app and I'm creating items in my django models.
My script (scripts, unfortunately) work just fine, but it feels beyond stupi
Thank you Steven! That was PRECISELY what I was looking for.
--
http://mail.python.org/mailman/listinfo/python-list
On Wednesday, October 3, 2012 5:40:12 PM UTC+1, Daniel Klein wrote:
> Thank you Steven! That was PRECISELY what I was looking for.
(And kwpolska!)
--
http://mail.python.org/mailman/listinfo/python-list
Where would I start something like this?
Any pointers would be greatly appreciated!
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
rk immediately with gtk from C.
But I have zero experience with gui programming in python. So any
pointers would be much appreciated how to implement a system tray in
python. Gtk is I guess just one option, one could use other stuff from
python but I wouldn't know what the simplest approach is.
when you write that you have no experience with
> GUI programming, I'd start another projet first - I think you will have
> a tough way to succeed with this project.
I certainly wouldn't start with Xlib in C, but if python bindings
would be available that would make life much easier.
Cheers,
Daniel
> Christian
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
programming, I'd start another projet first - I think you will have
>>> a tough way to succeed with this project.
>>
>> I certainly wouldn't start with Xlib in C, but if python bindings
>> would be available that would make life much easier.
>>
>
On Thu, Oct 18, 2012 at 8:42 PM, Demian Brecht wrote:
>> str, bytes, bytearrays, arrays, sets, frozensets, dicts, dictviews, and
>> ranges should all return len in O(1) time. That includes the possibility
>> of a subtraction as indicated above.
>
> Awesome. Pretty much what I figured. Of course, I
Hello rusi
This is a little bit faster:
s = "apple"
[s[i:i+2] for i in range(len(s)-1)]
>>> timeit("""s = "apple"
... [a+b for a,b in zip(s, s[1:])]""",number=1)
0.061038970947265625
>>> timeit("""s = "apple"
... [s[i:i+2] for i in range(len(s)-1)]""",number=1)
0.0467379093170166
Reg
> can we append a list with another list in Python ? using the normal routine
> syntax but with a for loop ??
x = [1,2,3]
y = [10,20,30]
x.extend( y )
print x
this will give you [1,2,3,10,20,30] which I guess is what you want.
Cheers,
Daniel
--
Psss, psss, put it down!
#x27; : 'logging.StreamHandler',
'stream' : 'ext://sys.stderr',
'level' : 'WARNING',
'formatter' : 'stderr', }
},
'root' : { 'level' : options.log_level.upper(),
'handlers' : ['stdout', 'stderr'],
},
}
logging.config.dictConfig( config )
return logging.getLogger()
#+end_src
Regards.
--
Daniel Dehennin
EOLE
pgpP128hCWd2L.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Dehennin writes:
> Hello,
Hi
[...]
> I tried to setup the same for my scripts with
> "logging.config.dictConfig()" without much success, I want to limit
> output to stdout to INFO, everything bellow INFO should be sent to
> stderr instead.
>
> Any hints?
If you try to expand any of the paths in the Path Browser (by clicking the
+ sign) then it not only closes the Path Browser but it also closes all
other windows that were opened in IDLE, including the IDLE interpreter
itself.
A Google search doesn't look like this been reported. If this is truly a
If you try to expand any of the paths in the Path Browser (by clicking the +
sign) then it not only closes the Path Browser but it also closes all other
windows that were opened in IDLE, including the IDLE interpreter itself.
I did a Google search and it doesn't look like this been reported. If t
With the assistance of this group I am understanding unicode encoding
issues much better; especially when handling special characters that are
outside of the ASCII range. I've got my application working perfectly now
:-)
However, I am still confused as to why I can only use one specific encoding.
mmon idiom
for this that does?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am new to Python. Is there a method to "join" two pipe delimited files using
a unique key that appears in both files? I would like to implement something
similar to the Unix join command.
Thanks for your help!
Topeka Capital Markets Disclaimers -
ht
All,
I am new to python and am stuck with python 2.6 (Ubuntu 10.04 and dont want to
force switch to 2.7)
I want to use assertListEqual and other new test functions.
However
I do am import unittest2 as unittest
The code does not fail but any use of the new functions results in:
NameError: global n
On Thursday, December 13, 2012 3:09:58 PM UTC, Miki Tebeka wrote:
> On Thursday, December 13, 2012 7:03:27 AM UTC-8, Daniel Laird wrote:
>
> > I do am import unittest2 as unittest
>
> > NameError: global name 'assertListEqual' is not defined
>
> According t
terested in the first 3 items?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
>>Hi folks, I swear I used to know this but can't find it anywhere:
>>
>>What's the standard idiom for unpacking the first few items of an
>>iterable whose total length is unknown?
>>
>>Something like
>>
>>a, b, c, _ = myiterable
>>
>>where _ could eat up a variable number of items, in case I'm onl
>> a, b, c, *rest = myiterable
>> Thanks, sounds great, how about python2?
>>
>
> If you know the sequence has at least n items, you
> can do a, b, c = seq[:3]
Yeah, that's probably the simplest, without all the fancy stuff :)
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
ave simply lifted it.
Does anyone know what a good replacement for get_local_path_from_uri
is? Is there a gtk/gnome/etc related python package that contains it
which would work with gnome 3? Or a totally gnome-independent python
implementation?
Cheers,
Daniel
--
Psss, psss, put it down! - http
uri( uri ):
return uri.split( '//' )[1]
and it seems to work. In the program the function is always called in
a try: except: block so if anything is not okay it will get caught, I
don't have to catch exceptions inside the function.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
rlier!
Indeed..
BTW, I also use vim only,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
value correspondingly. I've been searching around for a simple
function that would take 2 float arguments and would return a string
but didn't find anything although something tells me it's been done a
gazillion times.
What would be the simplest such function?
Cheers,
Daniel
--
Pss
le).to_integral()
> if 'E' in value_str:
> index = value_str.index('E')
> return value_str[:index] + error_str + value_str[index:]
> else:
> return value_str + error_str
>
>>>> format_error(1.03789291, 0.00089)
> &
On 2/16/12, Ian Kelly wrote:
> On Thu, Feb 16, 2012 at 1:36 AM, Daniel Fetchinson
> wrote:
>>>> Hi folks, often times in science one expresses a value (say
>>>> 1.03789291) and its error (say 0.00089) in a short way by parentheses
>>>> like so: 1.0379(9
guess, it's failing because scaleb() (which was new in
> 2.6) is buggily expecting a decimal argument, but adjusted() returns an int.
> Convert the results of the two adjusted() calls to decimals, and I
> think it should be fine.
Great, with python 2.7 it works indeed!
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
of digits for the value that makes sense for
the given error. So what you call "non sense" is part of the problem
to be solved.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
A new release of markup.py is available at http://markup.sourceforge.net/
This new release is compatible with both python 2 and 3.
What is markup.py?
Markup.py is an intuitive, light weight, easy-to-use, customizable and
pythonic HTML/XML generator. The only goal is quickly writing HTML/XML
segm
strip() removes leading and trailing characters, which is why the 't' in
the middle of the string was not removed. To remove the 't' in the
middle, str1.replace('t','') is one option.
On 3/22/12 3:48 PM, Rodrick Brown wrote:
#!/usr/bin/python
def main():
str1='this is a test'
str2=
On 3/23/12, Sangeet wrote:
> Hi,
>
> I've got to fetch data from the snippet below and have been trying to match
> the digits in this to specifically to specific groups. But I can't seem to
> figure how to go about stripping the tags! :(
>
> Sum class="green">24511 align='center'>02561.496
> [min]
It's also quite ironic that the initial complaining started from how
the domain name www.pyjs.org is not available only pyjs.org is. At the
same time the Rebel Chief's listed domain name on github, see
https://github.com/xtfxme, gives you a server not found:
http://the.xtfx.me/ :)
On 5/9/12, ant
nity, new
infrastructure, new fame, etc, and I sure as hell like to take the
easy road as opposed to the hard road".
Until you clearly explain your reasoning for taking over as opposed to
forking, the default answer is the above one.
Cheers,
Daniel
--
Psss, psss, put it down! - http
Hello,
I have a long list of n date intervals that gets added or suppressed
intervals regularly. I am looking for a fast way to find the intervals
containing a given date, without having to check all intervals (less
than O(n)).
Do you know the best way to do this in Python with the stdlib?
A var
it fast is to have done some preprocessing at
insertion time, so that not all intervals are processed at query time.
On Sat, May 12, 2012 at 2:30 PM, Karl Knechtel wrote:
> On Sat, May 12, 2012 at 8:17 AM, Jean-Daniel
> wrote:
>> I am looking for a fast way to find the intervals
&
ecision, you do not have to like that decision, you do not have to |
> | accept that decision.|
>
Again, if you don't like the lead developer just fork the project,
come up with a new name, new website
/3.1/
> [2] http://www.python.org/getit/releases/2.7.3/
> [3] http://dl.acm.org/citation.cfm?id=645413.652131
>
> On Sat, May 12, 2012 at 10:17 PM, Jean-Daniel
> wrote:
>>
>> Hello,
>>
>> I have a long list of n date intervals that gets added or suppressed
&
On Wed, May 16, 2012 at 5:38 AM, Jean-Daniel wrote:
> On Sun, May 13, 2012 at 2:29 PM, Alec Taylor
> wrote:
> > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2].
>
> Ordered dict are useful, but they only remember the ordered in which
> they were add
name__] = staticmethod(obj)
> else:
> raise TypeError('bad export')
> Namespace = type(func.__name__, (), ns)
> return Namespace()
>
>
> Have fun!
Funny, you got to the last line of "import this" but apparently
skipped the second line:
Explicit is better than implicit.
And you didn't even post your message on April 1 so no, I can't laugh
even though I'd like to.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
like to.
>
> Can you be less condescending?
Of course! :)
Anyway, the point I was trying to make is that Steve's example is
kinda cool but only as a funny exercise and not something for real
life. Let's toy with python kinda thing, which is always welcome but
with a big fat aster
]
>
> I wonder whether there can be a single list comprehension expression to get
> this
> result without the aid of the auxiliary function.
>
> Do you have any comments on this?
>>> l = [0,1,2,3,4,5,6,7,8,9]
>>> [n if n%2 else 100+n for n in l]
[100, 1, 102, 3, 104, 5, 106, 7, 108, 9]
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
The windows box is my development box, it's not where the script will be
running in the end. It'll be running on a Linux box where I don't have root so
python setup.py install isn't an option (to my understanding).
So what happened is that 7zip didn't unzip the .tar.gz2 properly, but it does
fi
ink this is the mentioned bug:
http://bugs.python.org/issue1294232
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Am 15.06.2011 14:29, schrieb Olivier LEMAIRE:
Hi there, I've been looking for 2 days for a way to convert integer
to binary number 0-padded, nothing... I need to get numbers converted
with a defined number of bits. For example on 8 bits 2 = 0010
bin(2)[2:].zfill(8)
Regards
D
est regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
; (http://www.geek.com/articles/gadgets/dreamplug-puts-a-1-2ghz-arm-pc-in-a-power-outlet-2011022/)
> which isn't too shabby but I wonder if it will work.
The netbook I use with fedora linux and basically every major python
release from 2.4 to 3.2 has more limited resources :)
So yes, python wo
from it.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
or your own app.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 1788 matches
Mail list logo