On Sun, 13 Sep 2009 21:43:49 -0700 (PDT) TerryP bigboss1...@gmail.com
wrote:
Not to be omega-rude and disrespectful, but if you have to ask such a
question -- you are either to stupid a programmer to warrant any
intellectual response, or are just interested in wasting peoples
bandwidth.
On Mon, 14 Sep 2009 11:17:02 -0400 Terry Reedy tjre...@udel.edu wrote:
At the recent Google Code Jam, Python was the 3rd most popular
language after C/C++ and Java.
Good for C/C++ and Java that they are not ranked by fun per line.
/W
--
INVALID? DE!
--
On Sun, 13 Sep 2009 18:44:25 + (UTC) Nikola Skoric
nick-n...@net4u.hr wrote:
Hi there,
I have a simple problem and I know how to solve it :-D, but I suspect
that there is a standard solution which is more elegant.
So, here is my problem: I have django app versioned with svn and I
On Sun, 13 Sep 2009 09:25:50 -0700 (PDT) Peng Yu pengyu...@gmail.com
wrote:
Is there is a way to make python check the variables just as the
strict mode in perl.
Short answer: No.
Long answer: I'm guessing you want Python to complain when assigning to
a variable that has not been declared
On Sun, 13 Sep 2009 14:17:42 -0400 Joel Goldstick
joel.goldst...@columbuswebmakers.com wrote:
I'm learning python and django more or less concurrently. I've
googled to find a similar list like this for django. Help?
Didn't like http://groups-beta.google.com/group/django-users ?
(Second hit
On Sun, 13 Sep 2009 15:52:44 -0500 Peng Yu pengyu...@gmail.com wrote:
On Sun, Sep 13, 2009 at 12:27 AM, John Nagle na...@animats.com
wrote:
What are the differences between 2.5 and 2.6?
http://docs.python.org/dev/whatsnew/2.6.html
/W
--
INVALID? DE!
--
On Sun, 13 Sep 2009 15:54:07 -0400 Albert Hopkins
mar...@letterboxes.org wrote:
On Sun, 2009-09-13 at 21:27 +0200, Andreas Waldenburger wrote:
Didn't like http://groups-beta.google.com/group/django-users ?
(Second hit for django mailing list, but I know Google results
vary from country
On Sun, 13 Sep 2009 17:04:25 -0500 Peng Yu pengyu...@gmail.com wrote:
On Sun, Sep 13, 2009 at 4:01 PM, Andreas Waldenburger
use...@geekmail.invalid wrote:
On Sun, 13 Sep 2009 15:52:44 -0500 Peng Yu pengyu...@gmail.com
wrote:
On Sun, Sep 13, 2009 at 12:27 AM, John Nagle na...@animats.com
On Sun, 13 Sep 2009 18:46:44 -0400 Joel Goldstick
joel.goldst...@columbuswebmakers.com wrote:
Thanks.. I saw the google group, but I was hoping for a list that I
can read in my thunderbird client. Thanks all for the good pointers
Huh? Django-Users is a mailing list. That's what Google-Groups
On Mon, 14 Sep 2009 01:24:49 +0200 Andreas Waldenburger
use...@geekmail.invalid wrote:
(among a Usenet portal)
Damn those late hours. What I meant was amongst other things such as a
Usenet portal.
/W
--
INVALID? DE!
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 10 Sep 2009 17:48:32 +0200 Giacomo Boffi
giacomo.bo...@polimi.it wrote:
Maggie la.f...@gmail.com writes:
[...]
else:
print 'The loop is finito'
do you know of it.comp.lang.python?
Neat! They use computers in IT now?
*flees, snickering*
/W
--
INVALID? DE!
--
Hi,
I need to extract a string after a matching a regular expression. For
example I have the string...
s = FTPHOST: e4ftl01u.ecs.nasa.gov
and once I match FTPHOST I would like to extract
e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the
problem, I had
Hi,
I need to extract a string after a matching a regular expression. For
example I have the string...
s = FTPHOST: e4ftl01u.ecs.nasa.gov
and once I match FTPHOST I would like to extract
e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the
problem, I had been trying to
On Fri, 28 Aug 2009 09:03:49 +0100 Mark Lawrence
breamore...@yahoo.co.uk wrote:
p.s. is it separator or seperator, after 50+ years I still can't
remember?
The former. It's cognate to English part if that helps any.
/W
--
INVALID? DE!
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger
use...@geekmail.invalid wrote:
[snip]
Might I humbly suggest
sheet = list(spamReader) # ?
Oh, and while I'm humbly suggesting:
spam_reader instead of spamReader or SpamReader or SpamrEadeR or
suchlike. Caps are reserved
On Thu, 27 Aug 2009 13:12:07 -0700 (PDT) vsoler
vicente.so...@gmail.com wrote:
On Aug 27, 9:42 pm, Andreas Waldenburger use...@geekmail.invalid
wrote:
[snip what I wrote]
Thank you for your answers. Let me however make some comments:
1- the csv file was generated with Excel 2007
Stefan Behnel wrote:
You forgot to create a thread state for the new thread. See the
PyThreadState_New() function.
this does not really solve the problem even if the original error does no
happen anymore ...
but a bucket of other error happen sometimes and this mean
that time and (I
Hi,
the following scenario:
1. using GIL
2. a pthread is created in a library and have to be announced to python
3. the thread is created in a PyObject_CallObject function call from
extension c code using a other extension c-code function called
from python code
python
Hi,
I have a string as str='123ACTGAAC'.
I need to extract the numeric part from the alphabetic part which I
did using
numer=re.findall(r'\d+',str)
numer
123
To get the alphabetic part, I could do
alpha=str.replace('123','')
alpha
ACTGAAC
But when I give
hi at all,
If I have this list:
lista
['ciao', 1, ['mela', 'pera', 'banana'], [1, 2, 3]]
if I want enumerate elements...I can see:
for parola in lista:
print lista[i]
i = i + 1
ciao
1
['mela', 'pera', 'banana']
[1, 2, 3]
but, if I want to enumerate elements
Certainly possible with list comprehensions.
a = abc
[(x, y) for x in a for y in a]
[('a', 'a'), ('a', 'b'), ('a', 'c'), ('b', 'a'), ('b', 'b'), ('b',
'c'),
('c', 'a'), ('c', 'b'), ('c', 'c')]
But I like bearophile's version better.
Andreas,
Thanks, but I think you were
Hi Newsgroup,
I'm new to python and I am familiarizing myself with threads (haven't done any
threading in any
other language before...). I was playing around and discovered some weird
behavior. Here is my code:
import threading
from time import sleep
from random import random
import sys
class
David Gibb:
For example: if my values are ['a', 'b', 'c'], then all possible
lists
of length 2 would be: aa, ab, ac, ba, bb, bc, ca, cb, cc.
from itertools import product
list(product(abc, repeat=2))
[('a', 'a'), ('a', 'b'), ('a', 'c'), ('b', 'a'), ('b', 'b'), ('b',
'c'), ('c', 'a'),
Andreas Kloeckner inf...@tiker.net added the comment:
Vladislav: The behavior you find funny is actually correct. pass is a
statement and as such not allowed in a lambda. (only expressions are)
Your posting is unrelated to this bug report. If you're still confused,
please ask on comp.lang.python
and this has still some bugs ...
to get the release 3.4 files you have to use the files link.
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
Changes by Andreas Kloeckner inf...@tiker.net:
--
nosy: +inducer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1652
___
___
Python-bugs-list
This is purely sport question. I don't really intend to use the answer
in my code, but I am wondering, if such a feat could be done.
I have a following problem: I have a list based upon which I would
like to construct a different one. I could simply use list
comprehensions, but there
This is purely sport question. I don't really intend to use the answer
in my code, but I am wondering, if such a feat could be done.
I have a following problem: I have a list based upon which I would
like to construct a different one. I could simply use list
comprehensions, but
Andreas Tawn andreas.t...@ubisoft.com writes:
list(.join([(a,b*2)[x] for x in [1,0,0,1]])
50 characters. Do I win £5?
Er, missing right paren. Try:
list(.join((a,bb)[x] for x in [1,0,0,1]))
--
Indeed. Stupid paste ;o)
--
http://mail.python.org/mailman/listinfo/python-list
Changes by Andreas Kloeckner inf...@tiker.net:
--
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4949
___
___
Python-bugs
New submission from Andreas Kloeckner inf...@tiker.net:
Take this program:
8 ---
print START
a = [
1
for i in range(10)]
8 ---
as a.py, run python -m pdb a.py, say b 3 to set a breakpoint
New submission from Andreas Kloeckner inf...@tiker.net:
Steps to reprdocue:
1) Debug a program with a syntax error in pdb.
2) Get the SyntaxError traceback.
3) Hit q to quit.
4) Another SyntaxError traceback, and you're back at the Pdb prompt.
--
components: Library (Lib)
messages
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Andreas Kloeckner inf...@tiker.net:
I get this debugger session with the attached file. Note that even
though a NameError occurs, no indication of that error is visible on the
debugger conosle.
8 -
$ python -m
Changes by Andreas Kloeckner inf...@tiker.net:
--
title: Python bebugger ignores exception if instructed to return from generator
- Python debugger ignores exception if instructed to return from generator
___
Python tracker rep...@bugs.python.org
Rhodri James wrote:
On Tue, 26 May 2009 14:22:29 +0100, Roy Smith r...@panix.com wrote:
My pet peeve is syntax-aware editors which get things wrong. For
example,
the version of emacs I'm using now doesn't parse this properly:
'''A triple-quoted string. Some editors won't get this
On May 27, 10:52 am, Peter Otten __pete...@web.de wrote:
This is a longstanding quirk of the CPython implementation. The
PRINT_ITEM_TO opcode triggers a PyFile_WriteObject() call which in turn does
the C equivalent of
if isinstance(f, file):
file.write(f, s)
else:
write = getattr(f,
Im using 2.6 python and when running this
class progess():
def __init__(self, number, total, char):
percentage = float(number/total*100)
percentage = int(round(percentage))
char = char * percentage
print char
progess(100, 999,
Hi,
I setup the PYTHONPATH environment variable too
does windows use this variable ?
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I solved the problem ...
thank you for your help
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
was updated:
=
- http://libmsgque.sourceforge.net
For a fast introduction use the following URL:
- http://libmsgque.sourceforge.net/features.htm
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
or just in general how I solve this kind of problem
3. why is no .pyd file created ?
- pyd is the extension name supported
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
a found module not be loaded
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
and the pymsgque extension was done using
Microsoft Visual C++ Express Edition
it seems that I missing something
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
Andreas Otto wrote:
Hi,
I have the following problem using python on windows.
I crated a binary extension called
pymsgque.dll
on windows. The same extension works fine on UNIX/Linux.
The problem is on Windows. The build is no problem
but python
If I have an integer k, for instance;
k = 32 // BASE 10
How do I get print to print it out in HEX and PREFIXED with 0x? What
is the PROPER WAY?
This does not work:
print This is hex 32: , int(k, 16)
Xav
k = 32
print This is hex 32: , hex(k)
Cheers,
Drea
--
new documentation and examples were added
The Web-Site was updated:
=
- http://libmsgque.sourceforge.net
For a fast introduction use the following URL:
- http://libmsgque.sourceforge.net/features.htm
mfg
Andreas Otto
--
http://mail.python.org/mailman
Dear Python-users,
I invented a new programming language called Nimrod that combines Python's
readability with C's performance. Please check it out: http://force7.de/nimrod/
Any feedback is appreciated.
Regards,
Andreas Rumpf
__
GRATIS für
Andreas Schawo andreas.sch...@gmail.com added the comment:
I think we're done here.
There's only the struct.error to be replaced by OverflowError or
TypeError. Do you start the discussion on python-dev? I don't know how to.
--
status: pending - open
.
So far
Andreas
--
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/
https://code.launchpad.net/s-x-emacs-werkstatt/
--
http://mail.python.org/mailman/listinfo/python-list
PyObject *
PyMqS_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
M0
?? type-tp_base-tp_new(
PyMqS_Obj *self = (PyMqS_Obj *)type-tp_alloc(type, 0);
self-msgque = NULL;
return (PyObject *)self;
}
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
found a solution
- PyObject_GC_New seems not to be *not* the right function to
create a new Python object with a base class included
- PyType_GenericNew is the right one ...
but this one is not documented
from: http://docs.python.org/3.0/c-api/type.html
of an error
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
Andreas Otto wrote:
well propable found the answer by my own ...
Py_RETURN_NONE
should be the best
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Behnel wrote:
Andreas Otto writes:
I'm writing a native language binding for a library.
http://libmsgque.sourceforge.net/
Every native method called by PYTHON have to return
a PyObject* even if the function itself does not
return anything.
[...]
Question
Propable you can help me with an other problem ...
the following code crash with:
==31431== Process terminating with default action of signal 11 (SIGSEGV)
==31431== General Protection Fault
==31431==at 0x4EA5151: PyObject_GenericGetAttr (object.c:982)
==31431==by 0x4EF1FBD:
, in module
from Cython.Distutils import build_ext
ImportError: No module named Cython.Distutils
7. a little bit to much errors for the first step, isn't it ?
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
is an email or something else available ?
--
http://mail.python.org/mailman/listinfo/python-list
alex23 wrote:
On Apr 17, 4:22 pm, Andreas Otto aotto1...@onlinehome.de wrote:
Question 1: Why you wall it Pyrex package ?
From the first paragraph on the Cython site: Cython is based on the
well-known Pyrex, but supports more cutting edge functionality and
optimizations.
python
Andreas Otto wrote:
alex23 wrote:
Did you unpack the Cython archive correctly? Is there a Shadow.py in
your src/Cython-0.11.1/Cython/ folder?
yes
dev1...@linux02:~/ext/x86_64-suse-linux/thread/bin/Cython-0.11.1 ls -al
Cython/Shadow.py
-rw-r--r-- 1 dev1usr users 4130 3. Apr 10:52 Cython
New submission from Andreas Otto aotto1...@users.sourceforge.net:
Hi,
if I search for sys.argv I get
Your search did not match any documents. Please make sure that all words
are spelled correctly and that you've selected enough categories.
but its available at: http://docs.python.org/3.0
Hi,
I want to make a language binding for an existing C library
http://libmsgque.sourceforge.net
is this possible ?
--
http://mail.python.org/mailman/listinfo/python-list
Yes, you are right ...
I read more and found the doc about this ...
the problem I have is something more tricky ...
I allready have an extension written for java
and the easyest thing would be use this as template
and replace the java specific calls with python calls ...
but the
model
to be passed through for GUI and LOG for the CLI version.
Does a good (pythonic) pattern exist to solve this in a better way?
Note: sorry, the code sample will not run on its own. I thought it'd be
to lengthy to have a functioning sample, especially for the gui.
--
Andreas Balogh
Andreas Schawo andreas.sch...@gmail.com added the comment:
Hi Mark,
currently there will be no struct.error neither TypeErorr because
PyLong_AsLong floors a given float (see my msg84620).
The Question is: should I test for long explicitly and raise an error if
a different type is given
into the function
from
above
mfg
Andreas Otto
--
http://mail.python.org/mailman/listinfo/python-list
Andreas Schawo andreas.sch...@gmail.com added the comment:
Hi,
could you have a look at cleanup_float_coerce_patch.diff.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5463
On 12 Apr., 02:31, Mark Tolonen metolone+gm...@gmail.com wrote:
Andreas a.pfren...@gmail.com wrote in message
news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com...
Hello,
I'd like to create a regex that captures any unicode character, but
not the underscore
On 12 Apr., 02:31, Mark Tolonen metolone+gm...@gmail.com wrote:
Andreas a.pfren...@gmail.com wrote in message
news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com...
Hello,
I'd like to create a regex that captures any unicode character, but
not the underscore
Hello,
I'd like to create a regex that captures any unicode character, but
not the underscore and the digits 0-9. ^(?u)\w$ captures them also.
Is there a possibility to restrict an expression like \w to \w
without [0-9_]?
I'm using python 2.5.4
Thanks in advance,
Andreas
--
http
On 11 Apr., 22:14, ergconce...@googlemail.com wrote:
Hi,
I have a list looking like
[ 0.84971586, 0.05786009, 0.9645675, 0.84971586, 0.05786009,
0.9645675, 0.84971586, 0.05786009, 0.9645675, 0.84971586,
0.05786009, 0.9645675]
and I would like to break this list into subsets of
Andreas Balogh balo...@gmail.com added the comment:
- a_datetime.replace(microsecond = 1)
+ a_datetime = a_datetime.replace(microsecond = 1)
Thanks for spotting the bug.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1982
Andreas Schawo andreas.sch...@gmail.com added the comment:
Doesn't took much time. Even nothing happend.
PyLong_AsLong trys to convert to int bevor raising an Exception.
I'm not sure if struct.pack('l', x) should raise an Exception when a
float is given. In case of string there is one.
I
Andreas Schawo andreas.sch...@gmail.com added the comment:
Yes you're right. The TypeError should be an OverflowError. It was just
the copy and paste thing.
Hm, I also wondering why struct.error is used. But someone already
wanted to change this.
The patch looks fine.
Do you want to go ahead
Andreas Schawo andreas.sch...@gmail.com added the comment:
I stepped back to r70187 and got no assertion.
An update to r70349 result in an assertion.
So I reverted the changes in test_fileio.py of r70349 and got no assertion.
But the test should work without assertion.
I tested releases 2.6.1
Andreas Schawo andreas.sch...@gmail.com added the comment:
r69214 works with os.close(f.fileno());f.close() (Exception with Errno 9)
r69560 does not compile
r70152 test_fileio failed (different reason)
MSVC Assertion with os.close(f.fileno());f.close()
I was not able to use _fileio.c
Andreas Schawo andreas.sch...@gmail.com added the comment:
I removed definition of _PY_STRUCT_RANGE_CHECKING.
The test_standard_integers now expects struct.errors when there are out
of range values (should have been part of my last patch). So
test_1229380 is now obsolete.
--
Added
Changes by Andreas Schawo andreas.sch...@gmail.com:
Removed file: http://bugs.python.org/file13304/struct_overflow_patch.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5463
New submission from Andreas Schawo andreas.sch...@gmail.com:
test_fileio fails on windows with MSVC Debug Assertion failed message
since last week.
--
components: Tests
messages: 84015
nosy: andreas.schawo, pitrou
severity: normal
status: open
title: test_fileio fials on windows MSVC
Andreas Schawo andreas.sch...@gmail.com added the comment:
I'm afraid your patch doesn't solve it.
I got the same popup:
Debug Assertion Failed!
Program: .\python_d.exe
File: f:\dd\vctoools\crt_bld\self_x86\crt\src\close.c
Line: 48
Expression: (_osfile(fh) FOPEN)
It failed while running
Andreas Schawo andreas.sch...@gmail.com added the comment:
Ok, heres the patch again.
Passed regression tests.
Should the version number increase to 0.3? Maybe to reflect there are no
more deprecated features. It should then take place after FLOAT_COERCE
cleanup.
I'm currently trying
2009/3/17 abhinayaraj.r...@emulex.com:
Could anyone suggest whether there is any Python to Perl code convertors?
I found one on the net viz. Perthon. But it wasn't really helping out.
I am just a beginner learning both the languages. Wondered if I can have some
comparative
Andreas Schawo andreas.sch...@gmail.com added the comment:
As I understand actually the zipfile module possibly creates damaged zip
files after version 2.4 because of '\x00\x00\x00\x00' instead of
'\xff\xff\xff\xff' as header offset. But without any error.
I think the _struct.c should
Andreas Schawo andreas.sch...@gmail.com added the comment:
I agree with you. A separate patch will do better.
In the next days I'm able to provide a new patch with the test_struct
cleanup.
Currently all tests succeeded on Windows and Linux. So I think no other
module relies on this feature
', 'mv', LOCALFILENAME, REMOTEFILENAME)
where LOCALFILENAME is some string like '/home/andreas/model.bin' and
REMOTEFILENAME is some string like '/home/nfs/model-output/'.
Here I have the problem that after about every 10th model run, I get an
error saying
Traceback (most recent call last
Andreas Schawo andreas.sch...@gmail.com added the comment:
Hi Mark,
I've removed all overflow masking from _struct.c.
Running the regression test test_struct failed for test_issue4228 wich I
think have to be removed too because it tests the deprecated feature.
I've tested the constraints
Changes by Andreas Schawo andreas.sch...@gmail.com:
Removed file: http://bugs.python.org/file13288/get_ulong_patch.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5463
New submission from Andreas Schawo andr...@schawo.de:
When compiling the newest 3.x trunk I've got a compiler warning that
get_ulong is defined but never used.
I moved the function near the only place where it is used (disabled code).
Now I have no more warnings.
I don't know if it's of any
Can someone suggest a easy method to do the inverse of dict(zip(x,y))
to get two lists x and y?
So, if x and y are two lists, it is easier to make a dictionary using
d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1,
x2:y2, ...}, what is there any trick to get lists x = [x1, x2, ...]
So, if x and y are two lists, it is easier to make a dictionary using
d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1,
x2:y2, ...}, what is there any trick to get lists x = [x1, x2, ...]
and y = [y1, y2, ...]
Cheers,
Chaitanya.
x = d.keys()
y = d.values()
But be aware that you
different Ruby threads might run on different cores, the
speed of
your program (at least the Ruby part) is limited to the speed of a
single
core.
-
Please don't mix threads and parallel processing on more then one CPU
core.
Andreas
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 08 Feb 2009 07:54:13 -0500 Pat p...@junk.net wrote:
Terry Reedy wrote:
Pat wrote:
Andreas Waldenburger wrote:
On Sat, 31 Jan 2009 13:27:02 -0500 Pat p...@junk.net wrote:
Tobiah wrote:
Just out of curiosity, why was len() made to
be it's own function? I often find myself
Andreas Jung aj...@users.sourceforge.net added the comment:
No idea - this bug is five years old!
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue924806
I've found something in the spirit of the following (in the epydoc
sources, if you care):
if True:
print outer if
for t in range(2):
if True:
print for if
else:
print phantom else
For the life of me I can't place the else. Which if clause does it
belong
On Sat, 7 Feb 2009 15:21:22 +0100 Andreas Waldenburger
geekm...@usenot.de wrote:
outer if
For if
For if
Phantom else
Geez, I'm a moron. This is obviously not the output from the snippet.
But if you fix the capitalization, it is. Sorry for that.
/W
--
My real email address is constructed
On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano
st...@pearwood.info wrote:
Andreas Waldenburger wrote:
It seems that there is a for...else construct. Replacing the inner
if with pass seems to confirm this. The else clause is still
executed.
Yes, there is a for...else construct
#open file and read last names
filename = input('name file')
file = open(filename, 'r')
names_list = file.readlines()
file.close()
#open a file for saving passwords
outfile_name = input('Save passwords')
outfile = open(outfile_name, 'a')
#create a password for each name in list
import random,
Andreas Kupries andre...@activestate.com added the comment:
Yes.
Session log:
andre...@bertha:~/tmp/x ll
total 0
andre...@bertha:~/tmp/x touch foobar
andre...@bertha:~/tmp/x ll
total 0
-rw-rw-r-- 1 andreask DomainUsers 0 Feb 2 10:17 foobar
andre...@bertha:~/tmp/x chown root foobar
Andreas Kupries andre...@activestate.com added the comment:
I do not know if this is standard for hpux or not.
I can say that right now we have six different HPUX machines which
behave in this manner, i.e. do not throw an error for the 'chown root
foobar' command for an ordinary (non-root) user
Andreas Kupries andre...@activestate.com added the comment:
Yes, that does fail with error 'not owner'.
andre...@bertha:~/tmp mkdir x
andre...@bertha:~/tmp cd x
andre...@bertha:~/tmp/x touch foobar
andre...@bertha:~/tmp/x ll
total 0
-rw-rw-r-- 1 andreask DomainUsers 0 Feb 2 15:06
601 - 700 of 1064 matches
Mail list logo