"Florian Diesch" <[EMAIL PROTECTED]>wrote:
8<--
>In Germany "von" is just a part of the name since 1919 when the nobility
>was abolished by law.
Thanks - was not aware of this - 1919 - just after the Great War, 1914-1918...
- Hendrik
Hi all,
yesterday I wanted to install TurboGears, which depends on
RuleDispatch. However, I failed to download it. First I got the error
"Bad Gateway" from the server, today it's simply a "Not Found" error.
So what happened to it? Does somebody know?
I would really need to install TurboGears in t
gel a écrit :
> I would like to write some data recovery software as a learning thing.
> The sort of thing that you would use to recover data from a currupt HDD
> or floppy etc. I would like to be pointed in the right direction as
> far as modules to use and suggested approaches.
>
Once you get
I put together the following module today and would like some feedback on any
obvious problems. Or even opinions of weather or not it is a good approach.
While collating is not a difficult thing to do for experienced programmers, I
have seen quite a lot of poorly sorted lists in commercial ap
Lee Harr wrote:
> I understand how to create a property like this:
>
> class RC(object):
> def _set_pwm(self, v):
> self._pwm01 = v % 256
> def _get_pwm(self):
> return self._pwm01
> pwm01 = property(_get_pwm, _set_pwm)
>
>
> But what if I have a whole bunch of these pwm
[EMAIL PROTECTED] wrote:
> Hi All
>
> Apologies in advance for the pretty basic question - but I can't seem
> to find an answer anywhere else.
>
> I am developing a fluid sim in C++ and have heard that many people use
> Python in conjunction with C++ for this sort of thing (especially in
> games de
In <[EMAIL PROTECTED]>, Lee Harr wrote:
> But what if I have a whole bunch of these pwm properties?
>
> I made this:
>
> class RC(object):
> def _makeprop(name):
> prop = '_%s' % name
> def _set(self, v):
> v_new = v % 256
> setattr(self, prop, v_new)
[EMAIL PROTECTED] wrote:
> Thanks Robert,
>
> My previous problem is solved(I was using 'from matplotlib.pylab import
> *') but now I am facing another problem. I want to plot the histogram
> of eigenvalues calculated and I am using the following code:
> ___
In <[EMAIL PROTECTED]>, gel wrote:
> Dennis Lee Bieber wrote:
>> On 17 Oct 2006 20:18:40 -0700, "gel" <[EMAIL PROTECTED]> declaimed
>> the following in comp.lang.python:
>>
>> […] You also need very good documentation of the file system […]
>
> Yes, OK I guess NTFS would be of most interest to me
[EMAIL PROTECTED] wrote:
> Hello,
> I have thousands of files that look something like this:
>
> wisconsin_state.txt
> french_guiana_district.txt
> central_african_republic_province.txt
>
> I need to extract the string between the *last* underscore and the
> extention.
> So based on the files abov
Thanks Robert,
My previous problem is solved(I was using 'from matplotlib.pylab import
*') but now I am facing another problem. I want to plot the histogram
of eigenvalues calculated and I am using the following code:
___
import n
gel wrote:
> I would like to write some data recovery software as a learning thing.
> The sort of thing that you would use to recover data from a currupt HDD
> or floppy etc. I would like to be pointed in the right direction as
> far as modules to use and suggested approaches.
what kind of recov
Hi!
It is the normal behavior of COM.
Note that, Python being dynamic, you can modify Python script, OF THE
INTERIOR, during execution.
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> On 17 Oct 2006 20:18:40 -0700, "gel" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> > I would like to write some data recovery software as a learning thing.
> > The sort of thing that you would use to recover data from a currupt HDD
> > or floppy
runningwild wrote:
> This is the first time I have cared about httplib's HTTPSConnection.
Please note that the Python builtin SSL support is not really secure. It
does not make sure that you connect to the site you think you are
connecting to, for example.
If you really need secure SSL (what is t
runningwild wrote:
> This is the first time I have cared about httplib's HTTPSConnection.
Please note that the Python builtin SSL support is not really secure. It
does not make sure that you connect to the site you think you are
connecting to, for example.
If you really need secure SSL (what is t
Lee Harr wrote:
> I understand how to create a property like this:
>
> class RC(object):
> def _set_pwm(self, v):
> self._pwm01 = v % 256
> def _get_pwm(self):
> return self._pwm01
> pwm01 = property(_get_pwm, _set_pwm)
>
>
> But what if I have a whole bunch of these
I would like to write some data recovery software as a learning thing.
The sort of thing that you would use to recover data from a currupt HDD
or floppy etc. I would like to be pointed in the right direction as
far as modules to use and suggested approaches.
--
http://mail.python.org/mailman/lis
Hi all. I try not to post until I am stuck in hole with no way out. I
fought with this for several hours, and am currently in the hole.
I'm doing a proof of concept for creating afp shares dynamically
through a web interface from a client machine. I use a bit of php to
setup a simple form, and
At 17 Oct 2006 17:19:03 -0700 "handful of nothing" <[EMAIL PROTECTED]> wrote:
>
> IMHO,
>
> What I learned with the time and of course with books =) :
>
> Python gives you rapid turnaround. You can try different approaches and
> archictetures to solve the problem in much faster way than you wou
Hello all.
I am desperately in need for you help guys. Here is the story:
1- I have created a small simple COM serve with python (along the lines
read in Win32 Programming with python).
2- If I start the server and call a function from VBE everything works
fine
3- I then want to modify the function
wesley chun wrote:
> welcome to Python!! i too, have (recently) been interested in COM
> programming, so much so that i added some material...
> from time import sleep
> import win32com.client as win32
>
> def excel():
> xl = win32.gencache.EnsureDispatch('Excel.Application')
> ss = xl.
I understand how to create a property like this:
class RC(object):
def _set_pwm(self, v):
self._pwm01 = v % 256
def _get_pwm(self):
return self._pwm01
pwm01 = property(_get_pwm, _set_pwm)
But what if I have a whole bunch of these pwm properties?
I made this:
class
On Oct 17, 3:37 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > A couple of times recently I've come across this problem: I have a
> > large list to sort and I need to the the "key=function" argument to
> > sort appropriately. But I actually have the key mapping in a b
[EMAIL PROTECTED] wrote:
> wxpython is down for me also it did work befour my job interview at
> around noon central. It may have been my wx.grid question for my
> project finaly did the system in. I followed all the directions but
> can only post and get one responce and I can't respond to the q
wxpython is down for me also it did work befour my job interview at
around noon central. It may have been my wx.grid question for my
project finaly did the system in. I followed all the directions but
can only post and get one responce and I can't respond to the questions
(I get no email so I can
IMHO,
What I learned with the time and of course with books =) :
Python gives you rapid turnaround. You can try different approaches and
archictetures to solve the problem in much faster way than you would
with C++.
When you really need to crunch numbers, and numpy/othermodule is not
enough for
At 17 Oct 2006 16:05:40 -0700 [EMAIL PROTECTED] wrote:
>
> Hi All
>
> Apologies in advance for the pretty basic question - but I can't seem
> to find an answer anywhere else.
>
> I am developing a fluid sim in C++ and have heard that many people use
> Python in conjunction with C++ for this sor
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> >
> > I assume you are telling me to install ipython from a tar distribution
> > using setup etc. I originally installed it from the SciPy Super Pack
> > which apparently put in the site packages, but neglected the scrip
Hi,
In case you haven't solved this already, the problem seems to be an
empty or corrupt config file - \documents and
settings\username\.boa-constructor\Explorer.msw.cfg. (at least under
windows - don't know where it'd be in linux/elsewhere) When I deleted
it, the next invocation of boa worked
[EMAIL PROTECTED] wrote:
> Hi All
>
> Apologies in advance for the pretty basic question - but I can't seem
> to find an answer anywhere else.
>
> I am developing a fluid sim in C++ and have heard that many people use
> Python in conjunction with C++ for this sort of thing (especially in
> games de
Book before 31st October to save $50 and get a free conference t-shirt!
Registrations are open for the Open Source Developers' Conference 2006:
http://www.osdc.com.au/registration/index.html The conference is running
in Melbourne from the 6th - 8th December, with a day of tutorials on the
5th.
Hi All
Apologies in advance for the pretty basic question - but I can't seem
to find an answer anywhere else.
I am developing a fluid sim in C++ and have heard that many people use
Python in conjunction with C++ for this sort of thing (especially in
games dev).
What I can't understand why you wo
"Michael B. Trausch" <"mike$#at^&nospam!%trauschus"> wrote:
> Tim Chase wrote:
>>> Is there a problem with the Python and wxPython web sites?
>>> I cannot seem to get them up
>>
>> Sounds like someone needs some pyagra...
>>
>> (grins, ducks, and runs)
>>
>
> Interesting. I thought at first i
Hi all,I am trying to compare my Itunes Library xml to the actual files on my computer.As the xml file is in UTF-8 encoding, I decided to do the comparison of the filenames in that encoding.It all works, except with one file. It is named 'The Chemical Brothers-Elektrobank-04 - Don't Stop the Rock (
> Anyone have any ideas?
l = "wisconsin_state.txt"
l.split(".")[0].split("_")[-1]
Explanation:
---
the split(".")[0] part takes everything before the "."
the split("_")[-1] part selects in the last element in the list of
substrings which are separated by "_"
--
http://mail.pyth
Diez B. Roggisch wrote:
> Reading it? Using read?
>
> f = open("/dev/foo")
> f.read(1)
>
> Diez
Wow, I didn't realize it was that simple. Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Lou Pecora wrote:
> In article <[EMAIL PROTECTED]>,
> Robert Kern <[EMAIL PROTECTED]> wrote:
>
>> Lou Pecora wrote:
>>
>>> The only problem I'm having is getting ipython to run. Not installed in
>>> /usr/local/bin (although all other IPython files look to be installed in
>>> /Library/Framewaor
*% <"mike$#at^&nospam!%trausch(*%)us"> wrote:
> Is there a problem with the Python and wxPython web sites? I cannot
> seem to get them up, and I am trying to find some documentation...
The machine hosting www.python.org rebooted in response to a power failure.
Richard
--
http://mail.pytho
Tim Chase wrote:
>> Is there a problem with the Python and wxPython web sites?
>> I cannot seem to get them up
>
> Sounds like someone needs some pyagra...
>
> (grins, ducks, and runs)
>
Interesting. I thought at first it was a problem with Python's sites...
but I got through to the Python sit
Tim Chase wrote:
>> Is there a problem with the Python and wxPython web sites?
>> I cannot seem to get them up
>
> Sounds like someone needs some pyagra...
>
> (grins, ducks, and runs)
>
> the-red-or-blue-pill'ly yers,
>
> -tkc
>
>
>
>
>
lol ... got to rememner that one !
hg
--
http://
> Is there a problem with the Python and wxPython web sites?
> I cannot seem to get them up
Sounds like someone needs some pyagra...
(grins, ducks, and runs)
the-red-or-blue-pill'ly yers,
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
Is there a problem with the Python and wxPython web sites? I cannot
seem to get them up, and I am trying to find some documentation...
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates wrote:
> [EMAIL PROTECTED] wrote:
>> Hello:
>> Variable 'a' has the next values:
>> [[1,1],[2,2]]
>> and I want to take a to b as:
>> [[1,1,'='],[2,2,'=']]
>> How can I do this with only one line of instruction?
>> Thanks!!
>>
> To copy a list use:
>
> b=a[:]
>
> -Larry
Seems I may ha
rick schrieb:
> What's the best way to read a byte of data directly from a block device
> (a scsi hard drive) on Linux using Python?
Reading it? Using read?
f = open("/dev/foo")
f.read(1)
Diez
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
>
> > The only problem I'm having is getting ipython to run. Not installed in
> > /usr/local/bin (although all other IPython files look to be installed in
> > /Library/Framewaorks/python..blah/site-pack
On 2006-10-17, Edgar Matzinger <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On 10/17/2006 06:22:45 PM, SpreadTooThin wrote:
>> valid =
>> ':./,^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '
>>
>
> not specifying the OS platform, these are not all the
> characters that may occur in a fil
What's the best way to read a byte of data directly from a block device
(a scsi hard drive) on Linux using Python?
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Matthew Warren wrote:
>
> > I have the following code that implements a simple recursive tree like
> > structure.
> >
> > The trouble is with the GetTreeBranch function, the print statement
> > prints a valid value but the return immediatley afterward doesn't return
> > anyt
Andy wrote:
> Hi guys,
>
> I'm writing a program with a feature of accepting user input as command
> text and parsing it to correct function calls...example:
>
> "5 minutes later"/"5 min later"/"5 minute later"/"after 5 minutes"...
> are being parsed as the same rule so the system will call a lat
[EMAIL PROTECTED] wrote:
> A couple of times recently I've come across this problem: I have a
> large list to sort and I need to the the "key=function" argument to
> sort appropriately. But I actually have the key mapping in a big
> dictionary.
so use a bound method:
L.sort(key=key_dict.g
[EMAIL PROTECTED] wrote:
> A couple of times recently I've come across this problem: I have a
> large list to sort and I need to the the "key=function" argument to
> sort appropriately. But I actually have the key mapping in a big
> dictionary. Now I have to make an intermediary function:
>
> d
[EMAIL PROTECTED] wrote:
> A couple of times recently I've come across this problem: I have a
> large list to sort and I need to the the "key=function" argument to
> sort appropriately. But I actually have the key mapping in a big
> dictionary. Now I have to make an intermediary function:
>
> d
I'm having a problem using pexpect with 'sudo' on Ubuntu 6.06 (Dapper).
Here's the program:
#!/usr/bin/env python
import pexpect
import sys
child = pexpect.spawn("sudo apt-get update")
child.logfile = sys.stdout
try:
i = child.expect(["Password:", pexpect.EOF, pexpect.TIMEOUT])
if i ==
[EMAIL PROTECTED] wrote:
> A couple of times recently I've come across this problem: I have a
> large list to sort and I need to the the "key=function" argument to
> sort appropriately. But I actually have the key mapping in a big
> dictionary.
Is this what you mean? I suppose the lambda is an
Got it, great. This worked like a charm. I knew I was barking up the
wrong tree with urllib, but I didn't know which tree to bark up...
Thanks!
Fredrik Lundh wrote:
> Dave wrote:
>
> > How can I translate this:
> >
> > gi
> >
> > to this:
> >
> > "gi"
>
> the easiest way is to run it through an H
A couple of times recently I've come across this problem: I have a
large list to sort and I need to the the "key=function" argument to
sort appropriately. But I actually have the key mapping in a big
dictionary. Now I have to make an intermediary function:
def key_fn(key):
return key_dict[ke
> Maybe you would like Martin Fowler's "Patterns of Enterprise Application
> Architecture" http://martinfowler.com/books.html#eaa
Thanks, this one is already on my list, just like "Data Access Patterns" from
the same publisher.
> Examples are mostly Java and C#, sorry!
Which is precisely the
At Tuesday 17/10/2006 13:50, [EMAIL PROTECTED] wrote:
Can somebody tell me where to I find module name: "tele"
It's not a standard module. Look on the documentation for the
application/packages you are using.
--
Gabriel Genellina
Softlab SRL
_
Ralf wrote:
> Is their anybody with xperience in using the both and can provide me with
> some xamples.
>
> Thx a lot
> Ralf
I found the tutorial on this site helpful.
http://www.mayukhbose.com/python/ado/index.php
--
http://mail.python.org/mailman/listinfo/python-list
If you wanted to make sure stdio was flushed you could always do...
sys.stdout.write("Message\n")
sys.stdout.flush()
Thomas Guettler wrote:
> Hi,
>
> I noticed, that sys.stout does not get flushed before the process is
> replaced. The last print statements (before execvp()) disappear.
>
> It only
At Tuesday 17/10/2006 08:58, A.M. Kuchling wrote:
It might well be difficult to exploit to run arbitrary code because
your exploit code needs to have no unprintable bytes in it; repr()
turns unprintable characters into \xNN, after all, and isn't doing a
straightforward string copy. (But hackers
I think the win32all extension includes the findwindow() fuction, so
you could make a loop that looks for the window name (or class if it
takes that) of the pdf. You can also loop through a list of running
processes looking for whatever the process name is. Note that both of
these have serious lo
On Saturday 14 October 2006 00:40, [EMAIL PROTECTED] wrote:
> Ahmer wrote:
> > What do you guys use?
>
> vim
>
> Like:
>
> Built-in python interpreter so you can do any editor customizations in
> Python
> Good multilanguage support (Python, but also C, C++, Java, HTML, XML,
> SQL, and dozens of oth
You may be able to use os.popen()
kilnhead wrote:
> I am opening a file using os.start('myfile.pdf') from python. How can I
> know when the user has closed the file so I can delete it? Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Dave enlightened us with:
> How can I translate this:
>
> gi
>
> to this:
>
> "gi"
>
> I've tried urllib.unencode and it doesn't work.
As you put so nicely in the subject: it is HTML encoding, not URL
encoding. Those are two very different things! Try a HTML decoder,
you'll have more luck with tha
Lou Pecora wrote:
> The only problem I'm having is getting ipython to run. Not installed in
> /usr/local/bin (although all other IPython files look to be installed in
> /Library/Framewaorks/python...blah/site-packages). I'm still searching
> the web sites for answers.
Create a file ~/.pydist
Dave wrote:
> How can I translate this:
>
> gi
>
> to this:
>
> "gi"
the easiest way is to run it through an HTML or XML parser (depending on
what the source is). or you could use something like this:
import re
def fix_charrefs(text):
def fixup(m):
text = m.
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> >
> > Is pylab part of matplotlib?
>
> Yes.
>
> > I always thought it was the other way
> > around. I have a similar view of numpy as part of scipy.
>
> It is not.
>
> > Maybe I'm
> > confused on the dependencies.
On 2006-10-17, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Neil Cerutti wrote:
>> I'm writing an application that needs all internal character data
>> to be stored in iso-8859-1. It also must allow input and output
>> using stdin and stdout.
>
> Give the user the a
Neil Cerutti schrieb:
> The Cygwin binary I have (2.4.3) reports sys.stdin.encoding as
> 'US-ASCII', which is quite wrong. A Cygwin terminal uses, as far
> as I can tell, iso-8859-1. This renders the above construction
> useless if the user enters any character codes above 128.
> Using raw_input in
How can I translate this:
gi
to this:
"gi"
I've tried urllib.unencode and it doesn't work.
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
i am facing some problems with opening an excel file. I am using XLRD
module.
I am getting
XLRDError: Can't find workbook in OLE2 compound document
and
CompDocError: Not a whole number of sectors
exceptions in seperate try on different files.
1.Does any one know anout these exceptions? wha
Jerry wrote:
> On Oct 17, 12:43 pm, "kilnhead" <[EMAIL PROTECTED]> wrote:
> > I am opening a file using os.start('myfile.pdf') from python. How can I
> > know when the user has closed the file so I can delete it? Thanks.
>
> I assume you mean os.startfile. There is no way to do this directly.
> o
At Monday 16/10/2006 13:33, John Allman wrote:
If i manually import a module, this method works a treat, however if i
attempt to dynamically load a module at runtime the create method fails
with the following error:
TypeError: 'NoneType' object is not callable
Can you cut down a reproducible
On Oct 17, 12:43 pm, "kilnhead" <[EMAIL PROTECTED]> wrote:
> I am opening a file using os.start('myfile.pdf') from python. How can I
> know when the user has closed the file so I can delete it? Thanks.
I assume you mean os.startfile. There is no way to do this directly.
os.startfile simply hands
[EMAIL PROTECTED] wrote in news:1161102973.920895.141500
@i42g2000cwa.googlegroups.com:
> Hello:
> Variable 'a' has the next values:
> [[1,1],[2,2]]
> and I want to take a to b as:
> [[1,1,'='],[2,2,'=']]
> How can I do this with only one line of instruction?
> Thanks!!
>
b = [[x,y,'='] for (x,y
JW enlightened us with:
> Thanks to Michael and Nick, I can now cross-compile my Pyrex
> extensions for bog-standard Python 2.5 [...] I can now use Linux to
> cross-build my extension for Windows, and my preliminary testing
> (under WINE -- See the original post. I must adhere to my
> employment c
I am opening a file using os.start('myfile.pdf') from python. How can I
know when the user has closed the file so I can delete it? Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
>> If you're doing it on a time-critical basis, it might help to
>> make "valid" a set, which should have O(1) membership testing,
>> rather than using the "in" test with a string. I don't know
>> how well the find() method of a string performs in relationship
>> to "in" testing of a set. Test an
Thanks to Michael and Nick, I can now cross-compile my Pyrex extensions
for bog-standard Python 2.5. As I stumbled around in the dark trying to
bump into a solution, I was bolstered by the belief that at least two
other people had found the light at the end of the tunnel.
I had been using a cruft
Lou Pecora wrote:
> In article <[EMAIL PROTECTED]>,
> Robert Kern <[EMAIL PROTECTED]> wrote:
>
>> I presume what you did was something like this:
>>
>>from matplotlib import pylab
>>[N,x] = hist(eig, 10)
>>
>> What you actually want is this:
>>
>>from matplotlib import pylab
>>[N,
Jerry wrote:
> Okay, very well, then I put a couple of extra 'self' identifiers in
> there when I hand-copied the code over.
You should try copy/paste - it's both safer and less work !-)
> That would be my mistake for
> letting my fingers do the walking and forgetting my brain. Is there
> anyth
On 2006-10-17, Tim Chase <[EMAIL PROTECTED]> wrote:
> If you're doing it on a time-critical basis, it might help to
> make "valid" a set, which should have O(1) membership testing,
> rather than using the "in" test with a string. I don't know
> how well the find() method of a string performs in re
In <[EMAIL PROTECTED]>, Neil Cerutti wrote:
> I'm writing an application that needs all internal character data
> to be stored in iso-8859-1. It also must allow input and output
> using stdin and stdout.
>
> This works just fine with the Windows binary of Python.
> sys.stdin.encoding is correctly
Hi,
On 10/17/2006 06:22:45 PM, SpreadTooThin wrote:
> valid =
> ':./,^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '
>
not specifying the OS platform, these are not all the characters
that may occur in a filename: '[]{}-=", etc. And '/' is NOT valid.
On a unix platform. And
> l = ['a','b','c']
> for e in l:
>print l, i
>i = i + 1
>
> Is there a way to get rid of the i processing in this script?
> Sorry I'm still trying to learn python tricks here...
for i, e in enumerate(l):
print l, i
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>, SpreadTooThin
wrote:
> Hi I need to get a for loop to give me an element from a list and an
> index number...
> for example:
>
> i = 0
> l = ['a','b','c']
> for e in l:
>print l, i
>i = i + 1
>
> Is there a way to get rid of the i processing in this script?
for i
> Sometimes the user inputs characters that aren't valid
> characters for a file or directory name. Here are the
> characters that I consider to be valid characters...
>
> valid =
> ':./,^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '
Just a caveat, as colons and slashes can gi
Hi I need to get a for loop to give me an element from a list and an
index number...
for example:
i = 0
l = ['a','b','c']
for e in l:
print l, i
i = i + 1
Is there a way to get rid of the i processing in this script?
Sorry I'm still trying to learn python tricks here...
--
http://mail.pyt
Ron Adam wrote:
> Neil Cerutti wrote:
>> On 2006-10-16, Tim Chase <[EMAIL PROTECTED]> wrote:
>>> If you need it in a flat list, rather than as a list of
>>> chunk_size lists (which are handy for iterating over in many
>>> cases), there are ways of obtaining it, such as the hackish
>>>
>> sum([a
Okay, very well, then I put a couple of extra 'self' identifiers in
there when I hand-copied the code over. That would be my mistake for
letting my fingers do the walking and forgetting my brain. Is there
anything else wrong with my code?
--
Jerry
--
http://mail.python.org/mailman/listinfo/pyt
Hello,
Can somebody tell me where to I find module name: "tele"
import tele
Regards,
Vedran
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hello:
> Variable 'a' has the next values:
> [[1,1],[2,2]]
> and I want to take a to b as:
> [[1,1,'='],[2,2,'=']]
> How can I do this with only one line of instruction?
b = [item + ['='] for item in a]
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1
Neil Cerutti wrote:
> On 2006-10-16, Tim Chase <[EMAIL PROTECTED]> wrote:
>> If you need it in a flat list, rather than as a list of
>> chunk_size lists (which are handy for iterating over in many
>> cases), there are ways of obtaining it, such as the hackish
>>
> sum([a[i::chunk_size] for i in
Jerry wrote:
>> class MyClass:Descriptors don't work fine with old-style classes.
> Interesting, I have used this construct before in Python 2.4.3 and not
> run into the recursion problem you talk about.
The recursion problem doesn't occur with you original code (for the good
reason that there's a
[EMAIL PROTECTED] wrote:
> Hello:
> Variable 'a' has the next values:
> [[1,1],[2,2]]
> and I want to take a to b as:
> [[1,1,'='],[2,2,'=']]
> How can I do this with only one line of instruction?
> Thanks!!
>
To copy a list use:
b=a[:]
-Larry
--
http://mail.python.org/mailman/listinfo/python-l
[EMAIL PROTECTED] wrote:
> Hello:
> Variable 'a' has the next values:
> [[1,1],[2,2]]
> and I want to take a to b as:
> [[1,1,'='],[2,2,'=']]
> How can I do this with only one line of instruction?
> Thanks!!
>>> a = [[1,1], [2,2]]
>>> map( lambda x: x + ['='], a )
[[1, 1, '='], [2, 2, '=']]
>>>
SpreadTooThin wrote:
> Hi I'm writing a python script that creates directories from user
> input.
> Sometimes the user inputs characters that aren't valid characters for a
> file or directory name.
> Here are the characters that I consider to be valid characters...
>
> valid =
> ':./,^0123456789a
Hello:
Variable 'a' has the next values:
[[1,1],[2,2]]
and I want to take a to b as:
[[1,1,'='],[2,2,'=']]
How can I do this with only one line of instruction?
Thanks!!
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 207 matches
Mail list logo