一首诗 wrote:
#
class MyError(Exception):
def __init__(self):
self.message = u'Some Chinese:中文'
def __str__(self):
return self.message.encode('utf8')
#
This is an exception that
The Python's regex different from Perl's ,I want know what's the
different?
--
http://mail.python.org/mailman/listinfo/python-list
hey i want to count number of files in remote computer
example of my code is
import glob
import os
import time
from datetime import date
today=date.today()
dir_count, file_count=0, 0
for files in glob.glob('\\192.168.0.45\files\*.txt'):
file_count += len(files)
print 'the count of
Here's a proposed implementation for Py2.7 and Py3.1:
http://code.activestate.com/recipes/576669/
Would like you guys to kick the tires, exercise it a bit, and let me
know what you think. The recipe runs under 2.6 and 3.0 without
modification so it should be easy to play with.
The main
On Thu, Feb 26, 2009 at 1:05 AM, lameck kassana chela...@gmail.com wrote:
hey i want to count number of files in remote computer
example of my code is
import glob
import os
import time
from datetime import date
today=date.today()
dir_count, file_count=0, 0
for files in
Hi Dennis Thanks for your reply and also the detailed explanation.
Or do you mean you want something that, given a bare name, searches
your file system to find where a file with that name actually is?
Yes, this is what i exactly needed.
I have found something interesting to do this
On Feb 26, 12:57 am, Miles Bader mi...@gnu.org wrote:
There is ample room for people to discuss this evolution, but approaches
that start with first, toss out the existing user interface aren't gonna
fly.
Who said to toss out existing user interface, you?
Are you saying that i start my
It is, however I was able to get the first 8 done, I am struggling with
these 3 particular ones. I have to make an SQL file based off of it, so this
seems to be a blockage in my works.
-Original Message-
From: Gary Herron [mailto:gher...@islandtraining.com]
Sent: Thursday, February 26,
Lets say I compile python 2.6.1 without readline support due to not
having the readline headers installed prior. Is there a standard way to
recompile the extension without having to rebuild the entire source.
Looking at the makefile, I found the gcc line (modified to dump the
relocatable in
QOTW: I believe this is because Microsoft failed to understand the
original meaning of ___, and persisted with this
ghastly error in the name of backwards compatibility, justifying it
by suggesting that _. Somebody should have
cards printed up... - the
Xah Lee xah...@gmail.com writes:
Hi Xah,
is the suggestion of using modern standard shortcut set of X C V for
Cut, Copy, Paste, of which Linux uses, means it is turning emacs to a
fancy Notepad clone?
The functionality stays the same, but IMO it would confuse most users.
Killing is not
hi all
while getting used to with subprocess module i failed in executuing a)
but succeeded in running b). Can anyone explain me why as i am providing
absolute path? Is this has to do anything with shared library.. which
must be accessed based on system variables?
a) pipe =
Visco Shaun schrieb:
hi all
while getting used to with subprocess module i failed in executuing a)
but succeeded in running b). Can anyone explain me why as i am providing
absolute path? Is this has to do anything with shared library.. which
must be accessed based on system variables?
Hi,
Are there any way to change the EOL character for sys.stdin.readline()
and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will use
\r\000 as EOL.
Example from my code:
On Thu, Feb 26, 2009 at 2:41 AM, Visco Shaun visc...@gmail.com wrote:
hi all
while getting used to with subprocess module i failed in executuing a)
but succeeded in running b). Can anyone explain me why as i am providing
absolute path? Is this has to do anything with shared library.. which
Hi. This must be a simple command but I just can't find it in the
Phthon manual. How do I delete all items with a certain condition from
a list? For instance:
L=['a', 'b', 'c', 'a']
I want to delete all 'a's from the list.
But if L.remove('a') only deletes the first 'a'.
How do you delete all
Hi, I tried the script below to send mail by gmail from python using
smptlib. I got the script here (http://kutuma.blogspot.com/2007/08/
sending-emails-via-gmail-with-python.html)
It works fine from home, but at work not. I think it is because I am
behind a http or a socks proxy server at work.
On Thu, Feb 26, 2009 at 3:05 AM, Clarendon jine...@hotmail.com wrote:
Hi. This must be a simple command but I just can't find it in the
Phthon manual. How do I delete all items with a certain condition from
a list? For instance:
L=['a', 'b', 'c', 'a']
I want to delete all 'a's from the
The Python's regex different from Perl's ,I want know what's the
different?
Easy:
bash$ diff (lynx -dump http://perldoc.perl.org/perlre.html)
(lynx -dump http://docs.python.org/library/re.html)
Had you tried the great Google in the sky, you might have found
such pages as:
i did try but still not working.But also i try os.walk() for remote
computer like os.walk('\\192.168.0.45') it also failed
Thats it is my main problem do i need any new imports besides import os
On 2/26/09, Chris Rebert c...@rebertia.com wrote:
On Thu, Feb 26, 2009 at 1:05 AM, lameck kassana
I have written a program that reads data and updates the records
for some people. They are represented by objects, and I need to
read the data from a file, look the person up and then update
his record.
I have implemented this by creating a list with all the people's
names and another list
On Feb 17, 10:28 pm, alex23 wuwe...@gmail.com wrote:
On Feb 18, 3:10 am, Robert Kern robert.k...@gmail.com wrote:
Its public image definitely suffers from the impression that it's an ORM
that
can be compared on equal terms with packages that actually are just ORMs. I
describe it as a
sert je...@hotmail.com wrote:
I have written a program that reads data and updates the records
for some people. They are represented by objects, and I need to
read the data from a file, look the person up and then update
his record.
I have implemented this by creating a list with all the
sert:
I have implemented this by creating a list with all the people's
names and another list with their objects (their data).
It works but after profiling the code it turns out that half the
time spent in the program is spent in the list.index() function
looking up names. Isn't there a less
i am trying to write script which will count files for remote directory
which having certain pattern.
i tried with my code and have a look at this code.
---
import glob
import os
import time
from datetime import date
bearophileh...@lycos.com wrote in
news:37632421-5475-4859-be83-07ae2eca1...@r4g2000yqa.googlegro
ups.com:
Try using a dict instead, where keys are the names and
objects the values (it turns a linear search in a quick
hash look up). . Then tell us the performance changes.
It halved the
music24...@gmail.com wrote:
On Feb 26, 9:03 am, Steve Holden st...@holdenweb.com wrote:
music24...@gmail.com wrote:
On Feb 26, 2:35 am, Emile van Sebille em...@fenx.com wrote:
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -cimport os; print
Clarendon a écrit :
Hi. This must be a simple command but I just can't find it in the
Phthon manual. How do I delete all items with a certain condition from
a list? For instance:
L=['a', 'b', 'c', 'a']
I want to delete all 'a's from the list.
But if L.remove('a') only deletes the first 'a'.
Dennis Lee Bieber wrote:
On Wed, 25 Feb 2009 07:37:21 -0800 (PST), music24...@gmail.com declaimed
the following in comp.lang.python:
WARNING -- I will probably NOT see your response; since 90+% of the
spam in comp.lang.python is injected via googlegroups and gmail
accounts, my client
Murray wrote:
[top-posting corrected]
-Original Message-
From: Gary Herron [mailto:gher...@islandtraining.com]
Sent: Thursday, February 26, 2009 1:46 AM
To: mmcclaf; python-list@python.org
Subject: Re: Queries
mmcclaf wrote:
I have to make some queries for 4 tables I have. The
Chris Rebert wrote:
On Thu, Feb 26, 2009 at 1:05 AM, lameck kassana chela...@gmail.com wrote:
hey i want to count number of files in remote computer
example of my code is
import glob
import os
import time
from datetime import date
today=date.today()
dir_count, file_count=0, 0
for
Hello all,
I've a strange requirement where I need to run a python
script just as we run an exe (by double clicking through windows
explorer or by typing the script name at command prompt). In that
process I should be able to execute another python script in such a
way that, the second
Chris Rebert wrote:
On Thu, Feb 26, 2009 at 3:05 AM, Clarendon jine...@hotmail.com wrote:
...
L=['a', 'b', 'c', 'a']
I want to delete all 'a's from the list.
But if L.remove('a') only deletes the first 'a'.
How do you delete all 'a's?
There are several ways. I'd go with a list
2009/2/26 Steve Holden st...@holdenweb.com
Murray wrote:
[top-posting corrected]
-Original Message-
From: Gary Herron [mailto:gher...@islandtraining.com]
Sent: Thursday, February 26, 2009 1:46 AM
To: mmcclaf; python-list@python.org
Subject: Re: Queries
mmcclaf wrote:
I
On Thu, 2009-02-26 at 04:55 -0800, venutaurus...@gmail.com wrote:
Hello all,
I've a strange requirement where I need to run a python
script just as we run an exe (by double clicking through windows
explorer or by typing the script name at command prompt).
I don't know how windows
2009/2/26 sert je...@hotmail.com:
bearophileh...@lycos.com wrote in
news:37632421-5475-4859-be83-07ae2eca1...@r4g2000yqa.googlegro
ups.com:
Try using a dict instead, where keys are the names and
objects the values (it turns a linear search in a quick
hash look up). . Then tell us the
relational database will be optimised to do these operations and so is
likely to be faster still. I think there are a couple that Python
works well with, but I've never looked into that -- others will no
doubt be along with recommendations now I've raised the subject.
batteries-included support
lameck kassana wrote:
i am trying to write script which will count files for remote directory
which having certain pattern.
Please refrain from repeating questions. When you posted this a reply
had already been made to your original posting. Remember, this isn't a
paid help desk ...
regards
ok my original question is how can count the files of ceratin pattern(eg
*.txt) in remote directory .It seems use of glob.glob() for remote
directory is not working .Example I want to count the files in following
shared folder \\192.168.0.45\files file://192.168.0.45/files how can do it
by using
On Feb 26, 6:10 pm, Tim Wintle tim.win...@teamrubber.com wrote:
On Thu, 2009-02-26 at 04:55 -0800, venutaurus...@gmail.com wrote:
Hello all,
I've a strange requirement where I need to run a python
script just as we run an exe (by double clicking through windows
explorer or by
On Feb 26, 9:56 am, Christian Heimes li...@cheimes.de wrote:
Dan Barbus schrieb:
Hi,
I have a problem with setting a property to a class instance, in
python 2.5.1. The property is defined through get and set methods, but
when I set it, the setter doesn't get called. Instead, I believe
On Feb 26, 7:51 am, Steve Holden st...@holdenweb.com wrote:
Murray wrote:
[top-posting corrected]
-Original Message-
From: Gary Herron [mailto:gher...@islandtraining.com]
Sent: Thursday, February 26, 2009 1:46 AM
To: mmcclaf; python-l...@python.org
Subject: Re: Queries
On Feb 26, 7:00 pm, venutaurus...@gmail.com
venutaurus...@gmail.com wrote:
On Feb 26, 6:10 pm, Tim Wintle tim.win...@teamrubber.com wrote:
On Thu, 2009-02-26 at 04:55 -0800, venutaurus...@gmail.com wrote:
Hello all,
I've a strange requirement where I need to run a python
lameck kassana wrote:
ok my original question is how can count the files of ceratin pattern(eg
*.txt) in remote directory .It seems use of glob.glob() for remote
directory is not working .Example I want to count the files in following
shared folder \\192.168.0.45\files
2009/2/26 venutaurus...@gmail.com venutaurus...@gmail.com
On Feb 26, 7:00 pm, venutaurus...@gmail.com
venutaurus...@gmail.com wrote:
On Feb 26, 6:10 pm, Tim Wintle tim.win...@teamrubber.com wrote:
On Thu, 2009-02-26 at 04:55 -0800, venutaurus...@gmail.com wrote:
Hello all,
En Thu, 26 Feb 2009 00:39:30 -0200, birdsong david.birds...@gmail.com
escribió:
Dictionaries just store references to objects, right? So is it thread
safe to lock a specific key/val pair on a dictionary and modify its
val and release the lock?
example snippet:
# assuming d_lock was
On Feb 16, 11:21 pm, Yuanxin Xi xi11w...@gmail.com wrote:
Could anyone please explain why this happens? It seems some memory
are not freed.
There is a bug in versions of Python prior to 2.5 where memory
really isn't released back to the OS. Python 2.5 contains a new object
allocator that is
On Thu, 2009-02-26 at 06:00 -0800, venutaurus...@gmail.com wrote:
Thanks for the reply,
Being a newbie to python, I am finding it difficult to
understand the logic even after thorough reading of comments. Is there
any simpler way where I can just run a python script from the main
Tim Peters showed a way to demonstrate the fix in
http://mail.python.org/pipermail/python-dev/2006-March/061991.html
For simpler fun, run this silly little program, and look at memory
consumption at the prompts:
x = []
for i in xrange(100):
x.append([])
raw_input(full )
del x[:]
You flatter me sir (or madam? can't tell from your name...), but I wouldn't
presume to so lofty a title among this crowd. I'd save that for the likes
of Alan Gauld and Kent Johnson, who are much more prolific and informative
contributors to this list than I.
-- Paul
-Original Message-
Hi,
this is a bit off topic.
In our company we have several SVN repositories.
According to [1] Trac by default only handles one
repository.
Of course Trac links like changeset [1234] would not work anymore.
You would need [repro/1234] or something like this.
I think many (python) programmer
En Thu, 26 Feb 2009 11:00:30 -0200, Boris Borcic bbor...@gmail.com
escribió:
Chris Rebert wrote:
On Thu, Feb 26, 2009 at 3:05 AM, Clarendon jine...@hotmail.com wrote:
...
L=['a', 'b', 'c', 'a']
I want to delete all 'a's from the list.
But if L.remove('a') only deletes the first 'a'.
How
On 2009-02-25 13:25, Helmut Jarausch wrote:
Helmut Jarausch wrote:
Hi,
I've just tried to write a simple example using PyCrypto's
AES (CBC mode)
#!/usr/bin/python
from Crypto.Cipher import AES
PWD='abcdefghijklmnop'
Initial16bytes='0123456789ABCDEF'
crypt = AES.new(PWD,
On Feb 26, 7:47 pm, Tim Wintle tim.win...@teamrubber.com wrote:
On Thu, 2009-02-26 at 06:00 -0800, venutaurus...@gmail.com wrote:
Thanks for the reply,
Being a newbie to python, I am finding it difficult to
understand the logic even after thorough reading of comments. Is there
The regular expression syntax is basically exactly the same. The main
difference is that a regex can't just be written into a statement as
part of the syntax; you have to create a regular expression object and
use its methods.
So, instead of:
new_thing =~ s/pattern/replacement/
it's:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define
__ne__ so a
more generic answer would be:
from functools import partial
from operator import ne
L = filter(partial(ne, 'a'), L)
And don't forget this traditional solution:
L=['a',
from functools import partial
from operator import ne
L = filter(partial(ne, 'a'), L)
I learned about functools.partial only recently (on this list). functools is
implemented in C, not Python, so I couldn't answer this question for myself:
Is functools.partial completely
Thomas Guettler wrote:
Hi,
this is a bit off topic.
In our company we have several SVN repositories.
According to [1] Trac by default only handles one
repository.
Of course Trac links like changeset [1234] would not work anymore.
You would need [repro/1234] or something like this.
I think
jkv wrote:
Hi,
Are there any way to change the EOL character for sys.stdin.readline()
and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will use
\r\000 as EOL.
Example from my code:
On Thursday 26 February 2009 11:10:15 am Tim Golden wrote:
Have a look at DrProject[1], a Trac-alike which handles
multiple projects. (Not used it myself).
[1] https://www.drproject.org/
I've used DrProject a bit (my gf is one of the developers). If you like trac,
chances are that you will
David Niergarth wrote:
Tim Peters showed a way to demonstrate the fix in
http://mail.python.org/pipermail/python-dev/2006-March/061991.html
For simpler fun, run this silly little program, and look at memory
consumption at the prompts:
x = []
for i in xrange(100):
x.append([])
En Thu, 26 Feb 2009 13:32:27 -0200, venutaurus...@gmail.com
venutaurus...@gmail.com escribió:
On Feb 26, 7:47 pm, Tim Wintle tim.win...@teamrubber.com wrote:
On Thu, 2009-02-26 at 06:00 -0800, venutaurus...@gmail.com wrote:
Thanks for the reply,
Being a newbie to python, I am
I have embedded Python in a shared library. This works fine in Windows (dll),
but I get the following error is Ubuntu when I try to load modules:
/usr/lib/python2.5/lib-dynload/time.so: error: symbol lookup
error: undefined symbol: PyExc_ValueError
I found many postings on this issue on the
Raymond Hettinger python at rcn.com writes:
Here's a proposed implementation for Py2.7 and Py3.1:
http://code.activestate.com/recipes/576669/
Would like you guys to kick the tires, exercise it a bit, and let me
know what you think. The recipe runs under 2.6 and 3.0 without
jkv wrote:
Hi,
Are there any way to change the EOL character for sys.stdin.readline()
and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will use
\r\000 as EOL.
Example from my code:
Try this as an outline:
script1.py
from subprocess import Popen
if __name__ == '__main__':
scriptname = script2.py
Popen(python %s % scriptname, shell=True)
print I'm done
script2.py
from time import sleep
if __name__ == '__main__':
while (True):
Greetings,
I'm looking for a function in the standard library or pywin32 package
that will block until a certain condition is met or it is interrupted
by Ctrl-C. For example, time.sleep() would have been perfect for my
needs if thread.interrupt_main() could interrupt the call from another
thread
Steve Holden wrote:
David Niergarth wrote:
Tim Peters showed a way to demonstrate the fix in
http://mail.python.org/pipermail/python-dev/2006-March/061991.html
For simpler fun, run this silly little program, and look at memory
consumption at the prompts:
x = []
for i in xrange(100):
Gabriel Genellina wrote:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
In Py3, all classes inherit .__ne__ from 'object'.
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
Steve Holden wrote:
David Niergarth wrote:
[...]
I'm not sure what deleting a slice accomplishes (del x[:]); the
behavior is the same whether I do del x or del x[:]. Any ideas?
del x removes the name x from the current namespace, garbage collecting
the object to which it
Terry Reedy wrote:
Gabriel Genellina wrote:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
In Py3, all classes inherit .__ne__ from 'object'.
Isn't that inherited method just an identity comparison?
However in this particular case the main
What is it about with statements that makes you want to so frequently embed
them in try/except statements?
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
jkv wrote:
Hi,
Are there any way to change the EOL character for
sys.stdin.readline() and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will
use \r\000 as EOL.
Example
On Thu, 26 Feb 2009 11:46:24 +0100, jkv j...@unixcluster.dk wrote:
Hi,
Are there any way to change the EOL character for sys.stdin.readline() and
raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they
Hi Folks,
cgi module can easily acquire the all fields of data input from client
side, through a form. Then, a simple line of code:
form_dict = cgi.FieldStorage()
grabs all data into a dictionary form_dict. The rest becomes a piece
of cake by querying the form_dict. Nice!
However, it is done
On Thu, Feb 26, 2009 at 12:19 PM, Muddy Coder cosmo_gene...@yahoo.com wrote:
Hi Folks,
cgi module can easily acquire the all fields of data input from client
side, through a form. Then, a simple line of code:
form_dict = cgi.FieldStorage()
grabs all data into a dictionary form_dict. The
Steve Holden wrote:
Terry Reedy wrote:
Gabriel Genellina wrote:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
In Py3, all classes inherit .__ne__ from 'object'.
Isn't that inherited method just an identity comparison?
Yes. And so is, by
Hi,
I'm working on a Python module called psutil [1] for reading process
information in a cross-platform way.
I'm having a problem with psutil test suite.
Almost all the test cases we implemented so far look like this:
def test_foo(self):
test_process = subprocess.Popen(sys.executable,
Terry Reedy wrote:
Steve Holden wrote:
Terry Reedy wrote:
Gabriel Genellina wrote:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
In Py3, all classes inherit .__ne__ from 'object'.
Isn't that inherited method just an identity comparison?
Ben bnsili...@gmail.com wrote:
On Feb 24, 11:31?am, Nick Craig-Wood n...@craig-wood.com wrote:
So do you want to embed python into your code?
I'm still not clear what you are trying to achieve with python, though
I have a better idea what SLAG is now!
Actually no, I want to EXTEND
En Thu, 26 Feb 2009 16:17:42 -0200, Maxim Khitrov mkhit...@gmail.com
escribió:
I'm looking for a function in the standard library or pywin32 package
that will block until a certain condition is met or it is interrupted
by Ctrl-C. For example, time.sleep() would have been perfect for my
needs
On Thu, 26 Feb 2009 12:27:26 -0800 (PST), Giampaolo Rodola' gne...@gmail.com
wrote:
Hi,
I'm working on a Python module called psutil [1] for reading process
information in a cross-platform way.
I'm having a problem with psutil test suite.
Almost all the test cases we implemented so far look
I have some strings that look like function calls, e.g.
junkpkg.f1
junkpkg.f1()
junkpkg.f1('aaa')
junkpkg.f1('aaa','bbb')
junkpkg.f1('aaa','bbb','ccc')
junkpkg.f1('aaa','with,comma')
and I need to split them into the function name and list of
On Thu, 2009-02-26 at 21:29 +, m...@pixar.com wrote:
I have some strings that look like function calls, e.g.
junkpkg.f1
junkpkg.f1()
junkpkg.f1('aaa')
junkpkg.f1('aaa','bbb')
junkpkg.f1('aaa','bbb','ccc')
junkpkg.f1('aaa','with,comma')
and I need to split them into the function
On Thu, 2009-02-26 at 21:39 +, Tim Wintle wrote:
On Thu, 2009-02-26 at 21:29 +, m...@pixar.com wrote:
junkpkg.f1, ['aaa','with,comma']
oops - missed this one, ignore my last reply.
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-02-26 15:29, m...@pixar.com wrote:
I have some strings that look like function calls, e.g.
junkpkg.f1
junkpkg.f1()
junkpkg.f1('aaa')
junkpkg.f1('aaa','bbb')
junkpkg.f1('aaa','bbb','ccc')
junkpkg.f1('aaa','with,comma')
and I need to split
Raymond Hettinger pyt...@rcn.com writes:
Here's a proposed implementation for Py2.7 and Py3.1:
http://code.activestate.com/recipes/576669/
Several methods like __contains__() and __getitem__() are not
overridden, so their performance is just as fast as a regular
dictionary.
Robert Kern robert.k...@gmail.com wrote:
On 2009-02-26 15:29, m...@pixar.com wrote:
Use the compiler module to generate an AST and walk it. That's the real
way. For me, that would also be the quick way because I am familiar with
the API, but it may take you a little bit of time to get used
I have one module called foo.py
-
class Foo:
foo = None
def get_foo():
return Foo.foo
if __name__ == __main__:
import bar
Foo.foo = foo
bar.go()
-
And another one called bar.py
-
import foo
def go():
assert
On Feb 27, 8:29 am, m...@pixar.com wrote:
I have some strings that look like function calls, e.g.
junkpkg.f1
junkpkg.f1()
junkpkg.f1('aaa')
junkpkg.f1('aaa','bbb')
junkpkg.f1('aaa','bbb','ccc')
junkpkg.f1('aaa','with,comma')
Examples are
On Thu, Feb 26, 2009 at 1:48 PM, Jesse Aldridge jessealdri...@gmail.com wrote:
I have one module called foo.py
-
class Foo:
foo = None
def get_foo():
return Foo.foo
if __name__ == __main__:
import bar
Foo.foo = foo
bar.go()
-
And
I'm pretty sure that Foo is getting replaced once you import Foo, why not
pass the Foo() object to bar's go? I'm sure there are other ways, but yes,
circular imports are indeed evil.
On Thu, Feb 26, 2009 at 5:13 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Feb 26, 2009 at 1:48 PM, Jesse
Hello,
Python newbie here. I am working with Python and geoprocessing in
ArcGIS. I'm taking a training course online and the exercise I'm
working on makes mention of using PythonWin instead of Idle.
I am using version 2.5 and have not been able to locate PythonWin. The
download just
Jean-Paul Calderone wrote:
sys.stdout.write('Password: ');
#IAC DO ECHO sys.stdout.write('\xFF\xFB\x01')
password = raw_input()
If the client sends 'qwerty\r\n' everything is fine and the password
get stored in the variable. But sometimes, depending on how broken
the telnet
On Feb 26, 3:50 am, Shawn Milochik sh...@milochik.com wrote:
On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani ma...@sferacarta.com wrote:
Yes it's in Python alright, but it's not Pythonese yet. You could try
avoiding the getter/setter stuff, and camelCase method naming, things like
that,
On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells gsche...@hotmail.com wrote:
Hello,
Python newbie here. I am working with Python and geoprocessing in ArcGIS.
I'm taking a training course online and the exercise I'm working on makes
mention of using PythonWin instead of Idle.
I am using
On Feb 27, 8:48 am, Jesse Aldridge jessealdri...@gmail.com wrote:
I have one module called foo.py
-
class Foo:
foo = None
def get_foo():
return Foo.foo
if __name__ == __main__:
import bar
Foo.foo = foo
bar.go()
-
And another
On Thu, 26 Feb 2009 23:32:13 +0100, jkv j...@unixcluster.dk wrote:
Jean-Paul Calderone wrote:
sys.stdout.write('Password: ');
#IAC DO ECHO sys.stdout.write('\xFF\xFB\x01')
password = raw_input()
If the client sends 'qwerty\r\n' everything is fine and the password get
stored in
[Benjamin Peterson]
Why not just inherit from collections.MutableMapping?
It makes the recipe shorter to inherit some methods from dict. Also,
subclassing from dict gives a speedup for __getitem__(), __len__(),
and get().
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 26, 3:29 pm, m...@pixar.com wrote:
I have some strings that look like function calls, e.g.
junkpkg.f1
junkpkg.f1()
junkpkg.f1('aaa')
junkpkg.f1('aaa','bbb')
junkpkg.f1('aaa','bbb','ccc')
junkpkg.f1('aaa','with,comma')
and I need to
1 - 100 of 236 matches
Mail list logo