is).
What you're trying to do is difficult if not impossible to do as a
comprehension.
Here's another approach:
b = list(itertools.chain.from_iterable(a))
And without using a library function:
b = []
for pair in a:
for item in pair:
b.append(item)
Cheers,
Chris
independent , something called embedded into one file only ?
thank you in anticipation .
Rohan.
--
http://mail.python.org/mailman/listinfo/python-list
--
Shane Geiger, IT Director
Council For Economic Education
modules is easier than upgrading most other language's
libraries[citation needed].
--
http://mail.python.org/mailman/listinfo/python-list
--
Shane Geiger, IT Director
Council For Economic Education / www.councilforeconed.org
sgei...@councilforeconed.org / 402-438-8958
Teaching Opportunity
--
http://mail.python.org/mailman/listinfo/python-list
#x27;s language, as it makes many of the annoying things
about programs non-issues.
--
Shane Geiger, IT Director
Council For Economic Education / www.councilforeconed.org
sgei...@councilforeconed.org / 402-438-8958
Teaching Opportunity
--
http://mail.python.org/mailman/listinfo/python-list
http://mail.python.org/mailman/listinfo/python-list
--
Shane Geiger, IT Director
Council For Economic Education / www.councilforeconed.org
sgei...@councilforeconed.org / 402-438-8958
Teaching Opportunity
--
http://mail.python.org/mailman/listinfo/python-list
else:
res.append(el)
return res
Brian Vanderburg II
--
http://mail.python.org/mailman/listinfo/python-list
--
Shane Geiger, IT Director
Council For Economic Education / www.councilforeconed.org
sgei...@councilforeconed.org / 402-438-8958
Teaching Opportunity
--
http://mail.python.org/mailman/listinfo/python-list
ng:
mag = len(string)
upper_lim = mag/50 + 1
But i'm not sure how to declare and set them to my parsed strings.
Now problem #1 isn't as pressing, i can technically get away with
cutting up the words, i'd just prefer not to. The most pressing
problem right now is #2. Any help, or sugg
tp://mail.python.org/mailman/listinfo/python-list
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
in love to drop by &
> give that to you, to make the dreaded waiting for the amassing expert
> advice a bit more comfortable!
>
> Diez
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
; -------
>
> Any idea ?
>
> Thanks ...
>
> # Gabriel
>
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
Windows (XP Pro, Home, whatever). The
> method I'm using is:
>
> >>> process_list = os.popen('TASKLIST').read()
>
> However, XP Home doesn't have the tasklist.exe tool so, this is kind
> of useless in that OS. Do you have any other methods I can use for
r =~ s/(\d\d\d)(?=\d)(?!d*\.)/$1,/g;
>>return scalar reverse $number;
>> }
>>
>
>
>> But I cannot find how to do this in Python.
>>
>
> Look at the locale module. If you're producing the numbers yourself then they
> get pri
gt;
> What you monitor is up to you. At a basic level, you can see if the
> server is accepting connections. At a higher level, see if you can get
> a page or see if you can login as a specific person. At a higher
> level, you may want to check what is on the page or what happens when
>
end(l)
>
> #now list is [3,9,1,5,4,2,8]
>
> list.sort()
>
> #now your list is in sorted order
>
> Then, you can just write a series of for loops to spin off your data
> however you like.
>
>
def gen(lists):
out = '[' + ','.join(["v%s"
a good start to create your gamma function:
> http://en.wikipedia.org/wiki/Factorial
> http://en.wikipedia.org/wiki/Gamma_function
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economi
#tmp = tempfile.mktemp()
print commands.getoutput('/Applications/wacaw --png ' + current
) # ' + tmp +'.png')
# Here's the actual name of the file wacaw created:
current = '/Applications/'+current+'.png'
oves bearophiles point, for-else is really
>> tricky.
>>
>
> Ah ha, but that would have been a mistake with or without the else
> clause
>
>
> Carl Banks
>
This approach works well for me:
def foo0(): print 'foo0'
def bar0(): print 'bar0
oes anyone have some sample code?
>
> Regards
> Bernd
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
se them from python instead of from C#.
>
> Thanks,
> Huayang
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
ather's name is Gene, and he's expressed software wants
> that I've implemented in Python...so yes, I guess I've done some
> Gene Expression Programming...
>
> ;-P
>
> -tkc
>
>
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EM
Also, it seems that the environment variable "PYTHONPATH" applies to
> "import", but not to the starting module named on the Python command
> line. Is that correct? Thanks.
>
> John Nagle
>
--
Shane Geiger
IT Director
National Counci
st = 'foo.com'
account = 'jennyjenny'
password = '8675309'
import getpass, poplib
M = poplib.POP3(host)
#M.user(getpass.getuser())
#M.pass_(getpass.getpass())
M.user(account)
M.pass_(password)
numMessages = len(M.list()[1])
for i in range(numMessages):
for j in M.ret
Does this help?
def foobar(first_name,last_name, *args, **kwargs):
print first_name
print last_name
print "Tuple:",args
print "Dict:",kwargs
x = "has"
y = "demonstrated"
foobar('Shane','Geiger', x, y, adjective='us
ealize this might be more controversial and might have been avoided on
purpose, but I wasn't around for that discussion.)
>>> sentence = 'this is a senTence WiTH'
>>> generator = (word.capitalize() for word in sentence.split())
>>> while a,b,c = generator.
;
>
>>>> import linecache
>>>> linecache.getline(glob.glob('/etc/*', 4)
>>>>
>
> doens't work
>
> is there any better methods??? thank you very much in advance
>
> jo3c
>
--
Shane Geiger
IT Director
Nati
Does someone know where SVGDraw has gone? It used to be here:
http://www2.sfk.nl/svg/
Googling hasn't helped me locate it. :-\
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economi
x27;)
return "\n".join(msg)
def copyfile(self, source, outputfile):
shutil.copyfileobj(source, outputfile)
def main(HandlerClass = MyHTTPRequestHandler,
ServerClass = BaseHTTPServer.HTTPServer):
BaseHTTPServer.test(HandlerClass, ServerClass)
if __name__ == '__main__':
main()
vinoj davis wrote:
> hi all,
> i am new to python, can anyone tell me how can i connect to
> a remote machine using python and execute commands.
>
> Thanking you..
>
> Regards,
>
> ---ViNOJ DAViS---
>
>
>
> Chat on a cool, new interface. No download required. Click here.
> <http://in.rd.yahoo.com/tagline_webmessenger_10/*http://in.messenger.yahoo.com/webmessengerpromo.php>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
t;
>
>
>>>> import os
>>>> os.remove(tmp)
>>>>
> Traceback (most recent call last):
> File "", line 1, in
> OSError: [Errno 2] No such file or directory: '/tmp/tmpZkS0Gj'
>
>
>
>
> You mi
>
>>>> x.write("1234")
>>>> print len(x.read())
>>>>
> 0
>
>>>> x.flush()
>>>> print len(x.read())
>>>>
> 0
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
MAIL PROTECTED]:/nu/mine/myothername$ sudo crontab -l
15 10 * * * /usr/sbin/ipcheck.py -l -r checkip.dyndns.org:8245
shanerg asdfasdf sgeiger.mine.nu,sgeigerbot.mine.nu,myothername.mine.nu
--acctfile /root/ipcheck.dat
[EMAIL PROTECTED]:/nu/mine/myothername$
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
going to take a look at itertools. I prefer the
>> Kugutsumen> list version since I need to buffer that chunk in memory at
>> Kugutsumen> this point.
>>
>> Also consider this solution from O'Reilly's Python Cookbook (2nd Ed.) p705
>>
>> def chop(iterable, length=2):
>> return izip(*(iter(iterable),) * length)
>>
>> Terry
>>
>
>
>> [snip code]
>>
>> Try this instead:
>>
>> import itertools
>>
>> def chunk(iterator, size):
>> # I prefer the argument order to be the reverse of yours.
>> while True:
>> chunk = list(itertools.islice(iterator, size))
>> if chunk: yield chunk
>> else: break
>>
>>
>
> Steven, I really like your version since I've managed to understand it
> in one pass.
> Paul's version works but is too obscure to read for me :)
>
> Thanks a lot again.
>
>
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
ence, AIXtarmay fail)
>> - Is your disk full or do you have the correct permissions with your
>> current user?
>>
>> ++
>>
>> Sam
>>
>
> Hi Sam ,
> I am using windows server 2003, python2.5.1 and version 1.16 of tar
>
> and as per
this using python. If yes then
> which library and functions are required and if no then reasons why it
> cant be done.
>
> Thank you All
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading
ich of these overlap each
> other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple
> 2 overlaps with 1. Tuple 3 overlaps with tuple 1.
>
> In my scenario I would have hundreds, if not thousands of these
> ranges. Any nice pythonic way to do this?
>
> Thanks.
&g
=
['cat','num','name','blank1','blank2','company','phone1','phone2', \
'phone3','phone4','email','addr1','city','state','zip','blank3
have to
> convert over to that. Any help is appreciated. Thanks
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
--
http://mail.python.org/mailman/listinfo/python-list
image2
>> etc.
>>
>
> I just put the reference in my module. Don't hard code an absolute
> path, use the environment tools.
>
> app_path = os.getenv('HOME') + "/your_sub_dir"
>
> resources_path = os.getenv('HOME
If you are just asking those questions for people living now (and are
> not called Connor McLeod ;-) and the gregorian calender it's easy but
> providing functions in the standard library for arbitrary date calculation
> involving years is not so easy.
>
> Ciao,
> Marc
csv_list:
> author_name = row[-1]
> if author_name == '': #Find entries where no author is listed
> csv_list.remove(row) #Remove those entries from the list
>
> def assign_author_to_title(): #Assign an author to every title
> author_of_title = {}
> for row in csv_file:
> title = row[3]
> author = row[-1]
> author_of_title[title] = author
>
>
> assign_author_to_title()
> print author_of_title
>
> --
>
> Ok, the last two lines are kind of my "test the last function" test.
> Now when I run these two lines I get the error:
>
> Traceback (most recent call last):
> File "D:\Python25\Lib\SITE-P~1\PYTHON~1\pywin\framework
> \scriptutils.py", line 310, in RunScript
> exec codeObject in __main__.__dict__
> File "D:\Python25\csv_read.py", line 33, in
> print author_of_title
> NameError: name 'author_of_title' is not defined
>
> I am guessing that the author_of_title dict does not exist outside of
> the function in which it is created? The concept of instantiation is
> sort of foreign to me so I'm having some trouble predicting when it
> happens.
>
> If I call the assign_author_to_title function later, am I going to be
> able to work with the author_of_title dictionary? Or is it best if I
> create author_of_title outside of my function definitions?
>
> Clearly I'm just stepping through my thought process right now,
> creating functions as I see a need for them. I'm sure the code is
> sloppy and terrible but please be gentle!
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
e cmdline parsing with ini
> file parsing code)
>
> I've looked at configparse, cfgparse, iniparse.
>
> configparse looks like what I want, but it seems last commit was >2years
> ago.
>
> What is the best choice?
>
>
--
Shane Geiger
IT Director
National Co
html",index2_html)
os.system('chmod 755 ' + DOCUMENT_ROOT+"/index2.html")
try:
os.remove('/tmp/web') # this path is OS-dependent
os.symlink(DOCUMENT_ROOT, '/tmp/web')
print "Created symlink /tmp/web"
except:
pass
import os
/using_matlab_from_python.html
Calling Matlab from Python
Rolf Wester wrote:
> Hi,
>
> is there a tool to automatically translate Matlab source to Python/numpy
> code?
>
> Regards
>
> Rolf
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL
http://montypython.tribe.net/thread/fd519910-25e3-4102-b898-8815d6ece32a
>
> http://www.flickr.com/photos/kirstywombat/1862165664/
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Ec
print str(i) + " COMPLETED" # debug
data = sound.readframes(bytes_per_second)
if not data:
break
#print data # debug
player.writeframes(data) # this line is causing this problem with
every .aiff file I try:
i += 1
#import sys; sys.exit()
player.wait()
ver I'm not sure how to tell the request that I'm building in my
> python script to either use the info in my AD account or enter in my
> user/pass automatically.
>
> Anyone know how to do this?
>
> Thanks
>
--
Shane Geiger
IT Director
National Council on Economic
This should do the trick:
http://www.libsdl.org/
Dave wrote:
> I need to read microphone input and determine frequency. Is there a lib
> for that?
>
> Thanks,
> Dave
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402
I think this is what you need to make the output readable:
tidy -asxml output.xml
James Matthews wrote:
> Thank You Shane,
>
> However that is using PyRss2Gen which doesn't put newlines in the XML.
> So it's a little out of the picture!
> On Nov 27, 2007 1:57
ames
>
>
> --
> http://search.goldwatches.com/?Search=Movado+Watches
> http://www.goldwatches.com/coupons
> http://www.jewelerslounge.com
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Ec
http://pyenchant.sourceforge.net/
helzer wrote:
> I need to add spell checking to my Python application (for Windows).
> Any ideas on where to start?
>
> Thanks,
> Helzer
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402
>
> I was wondering how can I make an executable or some kind of
> installer, so that end user doesn't need to compile and worry if he/
> she has Python installed or not ?
>
> Every help is greatly appreciated.
>
> Thanks,
>
>
--
Shane Geiger
IT Director
N
ter core.
> Might need to do nasty things to the low-level import mechanism so that
> villains can't rig a web site to contain an import module with ability
> to access the local file system.
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED
lso don't condone tirades based on myths. Please
verify for yourself that some problems exist.
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcar
t; 'Decimal' is about as short as I'd want.
>>
>
> You don't like str, int, float, list, set, dict, or bool?
>
> Or for that matter, enum
> http://www.python.org/dev/peps/pep-0354/
>
> *wink*
>
>
>
--
Shane Geiger
IT Director
Na
>> Chris
>>
>>
>
> Before you reinvent the wheel, you should look into using a mailing list
> manager, Mailman for example:
>
> http://www.gnu.org/software/mailman/index.html
>
> Regardless, confirmed double-opt-in should be a requirement as should a
>
ng first that could equivalent to the
> name of the function I wish to call. how could I do that? the string
> could might include name of the module.
>
> for example
>
> a_string = 'datetime.' + 'today()'
>
> how could I call a_string as function?
>
&g
last_months(3))
>for month in last_months(24): print month
>
> The alternative would likely be to do something like subtract one
> from the current month, and if it drops below 1, decrement the
> year and reset the month to 12. Equally fuzzy:
>
>def lastN(months
6/10/2007" into a date object which I can then compare with the
> current date created by datetime.now().
> is that right?
> if yes then please explain me how I can get the delta object to give
> me results in days.
> regards,
> Krishnakant.
>
--
Shane Geiger
IT Di
ible with Qt also.
> So, perhaps (which I don't know) Aqua buttons simply don't permit
> absolute stuff ?
> Or the Aqua programmers read the user interface guidelines carefully ?
>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-
"for dummies" or "in x
(hours/days)" books. They can be decent introductory material, but
unless you are really really new to programming, you probably wouldn't
be getting enough information to justify the cost of the book (and a
lot of times they have a lot of bad pra
jango and PyGame. Something you could point a newbie to and they
would be able to create "real" applications with, without needing to
download hundreds of dependencies.
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http:/
text
files is not possible.
I'm not completely understanding your problems here. Can you explain
why urllib.urlencode wouldn't work?
(http://docs.python.org/lib/module-urllib.html)
Thanks,
-Dave
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTE
t_name
if __name__ == '__main__':
sys.argv.append('-cl')
from IPython.Shell import IPShellEmbed
ipshell = IPShellEmbed()
print "Please set these variables: project_name, group_name ...and
then type create()"
### I even tried to put all my
ipshell() #
sInMonth(year, month):
Matt> s1 = mktime((year,month,1,0,0,0,0,0,-1))
Matt> s2 = mktime((year,month+1,1,0,0,0,0,0,-1))
Matt> return s2-s1
Probably won't work if month==12. ;-)
Skip
--
Shane Geiger
IT Director
National Council on Economic Education
[EM
11',
'value12', 'value13'], 'keyvalue3': ['value31', 'value32', 'value33'],
'keyvalue2': ['value21', 'value22', 'value23']}
do something like this
{keyvalue1:[ value1, value2, va
can spend more time finding cool files
to share and making funny user pictures. It's kind of like myspace
really, except it's not broken every other day. (Well, let's hope.)
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958
st):
File "", line 1, in ?
ImportError: No module named amod
import sys
sys.path.append('otherdir')
import amod
amod.afunc()
'found'
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.n
ED]> wrote:
how can i compare a string which is non null and empty?
[...]
In java,I do this:
if (str != null) && (!str.equals(""))
how can i do that in python?
If you want to litterally do that, it's
if (str != None) and (str != ""):
t, see
the recipe
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303339
But I don't see any obvious way to get the process id of the spawned
subprocess.
- Andrew
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee
OMG, I was starting to reconsider Ruby.
Maƫl Benjamin Mettler wrote:
Is this supposed to be a joke?
First of April? Likely.
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for
dant 'cruft' that
Word puts in there, rather than making valid HTML out of invalid HTML.
Again, IIUC, HTMLtidy does not do this.
If Beautiful Soup does, then I'm intererested!
jon N
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] |
ing']=RN('quoted_string', r'"%(qtext)s"' % regex)
# ::= |
regex['local_part']=RN('local_part', r'%(quoted_string)s|%
(dot_string)s' % regex)
# ::= "@"
regex['mailbox']=RN('mailbox', r'
'sandboxes' for testing
programs. It is also an ideal launcher for IronPython.
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcard
fn:Shane Gei
nows how to enumerate the current running processes , or
how to obtain a specific process by its name or process id. I know I
can do this in many programming languages , but how in python? any
one know?
Thanks for any guidance.
--
li xianmin
[EMAIL PROTECTED] <mailto:[EMAIL PROT
any guidance.
--
li xianmin
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcard
fn:Shane
() in module.__dict__
return module
def hooker(pathitem):
print 'hooker %r' % pathitem
if pathitem.startswith(theurl): return Examp()
raise ImportError
sys.path_hooks.append(hooker)
sys.path.append(theurl)
import foo
print foo.foo()
Alex
Thanks for your help
write a static method in
ZList which takes a plain list of Z objects and returns a ZList.
Anyway, my question is whether or not this can be done more elegantly
via list comprehension?
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http
Unfortunately, I do not have a
Mac to test with.
Mike
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcard
fn:Shane Geiger
n:Geiger;Shane
org:Nati
ument to the join method, and the
delimiter is the string whose method is being called.
To further demonstrate (because I got a weird email that seemed to
think that my code didn't work):
import string
l = ['a','b','c']
string.join(l,',')
ing as
Windows service and waiting for requests on a port (or Pyro object or Corba
object...).
No need for telnet/ssh connection, no logout problem.
Just care of possible security problems :-)
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED]
lue_circle, blue_square, red_circle, red_square
--
001,0,4,11,0
002 ...
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign
t there is no information on this in
the readme.txt, at the pycron website, or here in groups.
Does anyone know how to troubleshhot this? Thanks in advance.
Contacting the author?
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8
erent.
The one that comes with ubuntu edgy. Just
apt-get install mdbtools
or something, that's it.
I don't want to start a distro war here - but I always found the
RPM-based distros lacking, to say the least.
Diez
--
Shane Geiger
IT Director
National Council on Economic E
import re
line = '123456789123456789'
print re.findall('([0-9]{3})', line)
Shane Geiger wrote:
You don't even need regex.
def
split_seq(seq,size):
'456','789', '123','456','789', .]
thanks.
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcard
t; " + f2
return ("no differences" in popen(cmnd).read())
This is needlessly slow, because one can stop comparing two files
after the first difference is detected. How should one check that
files are the same in Python? The files are plain text.
--
Shane Geiger
IT Director
"list comprehension" can fast up things. Can you point out how to do
it in this case?
thanks a lot!
f = open('file.txt','r')
for line in f:
db[line.split(' ')[0]] = line.split(' ')[-1]
db.sync()
--
Shane Geiger
IT Director
Natio
) if el==2]
Bye,
bearophile
Thank you both, a little more cumbersome than I expected, but it does
the job! Thanks!
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financia
eason.. it just won't exclude them.
I'd like to know why and how to fix it.
Thanks in advance.
Milton
Explore the seven wonders of the world Learn more!
<http://search.msn.com/results.aspx?q=7+wonders+world&a
tures/mail/>
alerts you the instant new Mail arrives. Check it out.
<http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/>
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading
Hi,
I have a small app which consist of a few .py files. Is there any way to
distribute it in jar like fashion as a single file I can just run python
on. I obviously look for platform independent solution.
Thx in advance, A.
"""
Author: Shane Geiger <[EMAIL PROTEC
is it appropriate to use range() vs xrange(). From my
understanding, xrange() essentially gives you an iterator across a
range, so it should be used when iterating. Should you only use
range() when want to physically store the range as a list?
Thanks,
Drew
--
Shane Geiger
IT Director
National
rest + [i]
import random
print random.choice(list(genpool(n=4, m=20)))
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcard
fn:Shane Geiger
n:Ge
opersGuide.html.
-Carsten
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
begin:vcard
fn:Shane Geiger
n:Geiger;Shane
org:National Council on Economic
93 matches
Mail list logo