BWill wrote:
> and ixnay on the ubyray or else I'll tell you where to stick your
> endblock delimiter :P
OK, I can't help it... which is more readable:
a_string.reverse(ruby)
a_string[::-1] (python)
--
http://mail.python.org/mailman/listinfo/python-list
Is development still going on with Jython? Version 2.1 came out in 2001
and it's still the most current stable release.
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> I agree with you here, though. I want to be diplomatic here, but Cheese
> Shop - a name for a package repository, for those who are lost already
> - is really just a totally stupid name. Yes, I'm aware of the Monty
> Python sketch, mediocre by the high standards of the Pythons'
Andrew Gwozdziewycz wrote:
> What would changing the name of language you're
> trying to market do for the marketing campaign?
I forgot to address this part... I think it would create a lot of hype.
What well-established programming language has ever had the nerve to
change its name after more
Andrew Gwozdziewycz wrote:
> On 3/9/06, rtilley <[EMAIL PROTECTED]> wrote:
>
>
>>>Doug Bromley wrote:
>>>
>>>>I can see Ruby overtaking Python if we don't ALL do something about it.
>>
>>I think it's the name. Python. Let'
Dale Strickland-Clark wrote:
> rtilley wrote:
>
>
>>Psychology is important. Just as important as good design. I think this
>>fact doesn't sink in to the Python community.
>
>
> You speak of fluff and ribbons and glitter.
Yes, I know. Great products, ideas
Steve Holden wrote:
> Doug Bromley wrote:
>> I can see Ruby overtaking Python if we don't ALL do something about it.
I think it's the name. Python. Let's change it to something nicer. Think
about it... if you found a Ruby, you'd pick it up and put it in your
pocket. If you ran across a Python, y
Rich wrote:
> Anyway, my question is: what experience you people have with working
> with different languages at the same time?
IMO, it's a good idea.
Currently, I'm using Python and Ruby. I'll write something in one and
then try it in the other. I know Python better than Ruby, so it's a
learni
Ernesto wrote:
> Is there a special module for mail ?
>
> I'd like to send an email [to 'n' unique email addresses] from a python
> script.
from email.MIMEText import MIMEText
import email.Utils
import smtplib
# 'users' is a list of email addys.
for u in users:
try
John Salerno wrote:
> All of it was a joke?
You'd have to ask Guido that :)
I took it literally when I first read it b/c it made sense to me and I
did not notice the date. I don't think it will ever be _required_ of all
Python hackers, but I may be wrong.
--
http://mail.python.org/mailman/list
Fredrik Lundh wrote:
> in his april 1st, 2005 paper ?
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=101968
That was an April's Fools joke, right? I like it though :)
Maybe it'll happen!
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> A minor concern, but I'm curious if there is any kind of best practice
> for using whitespace within expressions and argument lists in the Python
> world. For example:
>
> 1 + 2 or 1+2
IMO, good style calls for spaces. Most companies have style guides for
programmers t
Tim Golden wrote:
> [Sergey]
>
> | import win32com.client
> |
> | loc = win32com.client.Dispatch("WbemScripting.SWbemLocator")
> | svc = loc.ConnectServer("srv", "root/cimv2", "[EMAIL PROTECTED]", "**")
> | sys = svc.get("Win32_Process")
> | sys.create("notepad.exe")
> |
> | =>
> |
> | Trac
[EMAIL PROTECTED] wrote:
> It works for me.
Right. I've found that it's not just the end spaces. The Macs somehow
copy these files and folders to the PCs without a security descriptor of
any type! When I goto the folder's properties, I see three tabs:
1. General
2. Web Sharing
3. Customize
The
Roel Schroeven wrote:
> rtilley schreef:
>
>> This will at least allow me to ID folders that start with
>> whitespace... from within Windows too :) yet I still cannot rename the
>> folders after stripping the whitespace... attempting to gives an
>> [Errno 2]
This will at least allow me to ID folders that start with whitespace...
from within Windows too :) yet I still cannot rename the folders after
stripping the whitespace... attempting to gives an [Errno 2] No such
file or directory. The strip seems to work right too according to the
prints before
Kent Johnson wrote:
> So...
> s.strip() gets a bound method object from the class and calls it with no
> additional argument.
> str.strip(s) gets an unbound method object from the class and calls it,
> passing a class instance as the first argument.
>
> Kent
Thank you Kent. That's a very inform
s = ' qazwsx '
# How are these different?
print s.strip()
print str.strip(s)
Do string objects all have the attribute strip()? If so, why is
str.strip() needed? Really, I'm just curious... there's a lot don't
fully understand :)
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Please post your Python code. I don't see the problem you're
> describing.
OK, here's a copy. This works on Mac/Unix/Linux yet has no effect on
Windows:
-
import os
import os.path
for root, dirs, files
[EMAIL PROTECTED] wrote:
> Please post your Python code. I don't see the problem you're
> describing.
OK, here's a copy. This works on Mac/Unix/Linux yet has no effect on
Windows:
-
import os
import os.path
for root, dirs, files
Larry Bates wrote:
> How about not naming files with leading and trailing spaces on
> the Mac? Seems like a bad habit that needs breaking ;-).
>
> -Larry Bates
Users will be users! Tell that to the guys and gals on Macs who like to
make a folder sort based on the number of spaces they've placed
rtilley wrote:
> I have the right username and password. I may be using the above code
> wrong. Any tips?
I had the _wrong_ password... Sorry.
--
http://mail.python.org/mailman/listinfo/python-list
I get this error:
HTTP Error 401: Authorization Required
When I do this:
try:
handler = urllib2.HTTPBasicAuthHandler()
handler.add_password('realm', 'website', 'user', 'pass')
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
f = urllib2.urlopen('http
Atanas Banov wrote:
> using
>os.chdir('/')
>os.getcwd()
> is plain wrong in Windows.
>
> what it does is change the current directory to root of the CURRENT
> DRIVE (i.e. the drive of the directory where script was started from),
> not the system drive. for example, if current directory wa
Carsten Haese wrote:
> Is there a reason why os.environ['SYSTEMDRIVE'] shouldn't work?
>
> Hope this helps
I didn't know it was in os! It returns C: instead of C:\ like my method.
Other than that, it seems to do the trick.
Thank you!
Brad
--
http://mail.python.org/mailman/listinfo/python-lis
Is there a proper way to get this variable from Windows? I know it's in
the registry, but I'd rather not go there. I could not find a CSIDL
shell constant for it either. I've been doing this:
os.chdir('/')
sys_drive = os.getcwd()
print sys_drive
C:\
This seems too much of a hack and maybe not 1
The link changed... sorry.
http://opensource.w2k.vt.edu/Win32_Perms.php
--
http://mail.python.org/mailman/listinfo/python-list
LittlePython wrote:
I am not too sure I know what None really means.
It means null, void or lack of value. It is not an empty string. You
can't add None to stings.
>>> r = None
>>> print r
None
>>> print type(r)
--
http://mail.python.org/mailman/listinfo/python-list
Hope this isn't too inappropriate:
Thanks to tips from comp.lang.python and the Python win32 mailing list,
I've been able to begin using Python to work with Windows security
descriptors with some small success.
http://opensource.w2k.vt.edu/brad_scripts.php
I've just started, not a whole lot th
I got this to work... just FYI:
s =
'O:owner_sidG:group_sidD:dacl_flags(string_ace1)(string_ace2)...(string_acen)S:sacl_flags(string_ace1)(string_ace2)...(string_acen)'
SD = {}
S = str.split(s, 'S:')
SD['S_ACL'] = S[1]
D = str.split(S[0], 'D:')
SD['D_ACL'] = D[1]
G = str.split(D[0], 'G:')
SD['G
Dave Hansen wrote:
> It's just simple slicing. Well, maybe not so simple, or at least not
> so common, but with a syntax similar to the range function. Consider
> the following (string chosen to make it obvious what's going on):
>
> s = "0123456789"
> s[::]
> s[3::]
> s[:3:]
> s[::3]
> s[::-2]
>
Dave Hansen wrote:
> How about
>
> s = "some random string"
> print s
> s = s[::-1]
> print s
That looks like Perl, but it works. Makes me wonder with the string
module doesn't have a reverse or invert function?
--
http://mail.python.org/mailman/listinfo/python-list
s = list('some_random_string')
print s
s.reverse()
print s
s = ''.join(s)
print s
Surely there's a better way to do this, right?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
While trying to better understand security descriptors on Windows. I've
been examining text-based security descriptors. I have the security
descriptors on individual lines stored in a text file. I want to break
these lines apart based on owner, group, dacl and sacl. These areas are
demarca
[EMAIL PROTECTED] wrote:
> I have just started to learn python. Some said that its slow. Can
> somebody pin point the issue.
It depends on what you are doing. Much of Python is just wrapped C. So
many things are very fast.
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> http://python.org/peps/pep-0356.html -- but it's still a draft, being
> discussed in the last few days on python-dev.
Thank you, that's exactly what I was looking for!
--
http://mail.python.org/mailman/listinfo/python-list
Is there a road map for python a 2.5 releases yet? I'd like to begin
testing the new hashlib module with some old scripts I have that
currently use the md5 and sha modules.
Thanks,
Brad
--
http://mail.python.org/mailman/listinfo/python-list
Bennie Tilma wrote:
> I'm having trouble with opening the IDLE and running programs. Every
> time I try to open it, it says:
> 1. Socket error: Connection refused
> 2. IDLE's subprocess didn't make connection. Either IDLE can't start a
> subprocess or personal firewall software is blocking the co
What is the most common way to spell check comments in code? Are there
any idle plugins or modules that do this?
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis wrote:
> Or a bit more efficiently (no need to allocate a new list for storing
> files+dirs):
>
> from itertools import chain
> for root, dirs, files in os.walk(path):
> for fs_object in chain(files,dirs):
> ADD fs_object to dictionary
I like that! itertools is
rtilley wrote:
> Hello,
>
> When working with file and dir info recursively on Windows XP. I'm going
> about it like this:
>
> for root, dirs, files in os.walk(path):
> for f in files:
> ADD F to dictionary
> for d in dirs:
> ADD D to d
Duncan Booth wrote:
> How about just concatentating the two lists:
>
>>for root, dirs, files in os.walk(path):
>for fs_object in files + dirs:
>> ADD fs_object to dictionary
Thank you Duncan! that solves the problem perfectly!
--
http://mail.python.org/mailman/listinfo/python-li
Hello,
When working with file and dir info recursively on Windows XP. I'm going
about it like this:
for root, dirs, files in os.walk(path):
for f in files:
ADD F to dictionary
for d in dirs:
ADD D to dictionary
Is it possible to do something such as this:
for root,
A portion from the _winreg Documnetation:
-
DeleteValue(key, value)
1. Removes a named value from a registry key. --> OK
2. key is an already open key, or one of the predefined HKEY_*
constants. --> OK
3. value is a str
Tim Golden wrote:
> [rtilley]
>
>
>>Below is a script that recursively deletes files from a directory. It
>>works well on the two directories that I'm currently using it on:
>
>
>>C:\Documents and Settings\user\Cookies
>>C:\Documents and Settings\u
Laszlo Zsolt Nagy wrote:
>
>> The script does not seem to work when used on Temporary Internet Files.
>>
> Doesn't work well? What does it mean? Is there an exception raised?
>
> Les
>
No exception. The files are not deleted.
--
http://mail.python.org/mailman/listinfo/python-list
A bit off-topic, but Python related.
Below is a script that recursively deletes files from a directory. It
works well on the two directories that I'm currently using it on:
C:\Documents and Settings\user\Cookies
C:\Documents and Settings\user\Temp
However, I'd like to use it on this directory a
Perhaps this is a dumb question... but here goes. Should a socket client
and a socket server each have different values for
socket.setdefaulttimeout() what happens? Does the one with the shortest
timeout period end first?
--
http://mail.python.org/mailman/listinfo/python-list
48 matches
Mail list logo