you are on about you
access ports through the win32 API which is the 'driver' - you could
probably bypass this and start playing around with assembly code but
there's no point!!
Cheers,
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
T
The title is perhaps a little too grandiose but it's the best I
could think of. The change is really not large. Personally, I
would be happy enough if only %s was changed and the built-in was
not added. Please comment.
Neil
PEP: 349
Title: Generalised String Coercion
Version: $Rev
rails
http://download.rubyonrails.com/
Neil
--
http://mail.python.org/mailman/listinfo/python-list
always contain "." and
".." entries so they should be ignored. On other platforms there will be
similar low level functions.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
could ildg
> so you mean that this is not platform-independent?
Your existing code is platform-independent but I think for faster
code you will need to write platform-dependent code. FindFirstFile is
only available on Windows.
Neil
--
http://mail.python.org/mailman/listinfo/pyt
All you had to do was
>find out which stock he was recommending, then short it.
>
>
>
Err, that's not what is meant by enterprise, it's a catch all term for
large distributed systems, take a look at the link below for an idea of
this:
http://java.sun.com/j2ee/faq.html
27;t in there, they are in the fifth
argument to the property method (I can manually do this using
sections but is there a tag I can use?)
Cheers for your help,
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
German
ing
release management easier. However this solution requires more work.
* You could copy the java method using zip files with a manifest in
the same way Java uses jar files - I say could because I havn't
done this but it is the way I distribute Java apps - nice and
clea
ave the server running in Apache.
To work in SVN with eclipse you will need an eclipse plugin :
http://subclipse.tigris.org/#subclipse
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-
f I find
>repetitive tasks I can declare functions, but I won't go for a class
>immediately. Why do you think putting code into functions is not
>encapsulating?
>
>
>
>>While you could do all manner
>>of nasty hacks in C++ I worked with people who carefu
WELLSTART
notification.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
of dangerous features of
> languages, but more about the way of using imperative object-oriented
>languages in a non-object-oriented way.
>
>
well, in languages like C#, Java and eiffel - you shouldn't really be
doing that anyways. that is why they are poor choices for hobbies,
h
addition, there is a registry setting you need to
delete which automagically adds to the python path - it's in
HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE.
That's probably won't solve your problem but it's somethng to be
aware of anyways.
Neil
--
Neil Benn
Senior Automat
/windows/windowreference/windowfunctions/destroywindow.asp
"""A thread cannot use DestroyWindow to destroy a window created by a
different thread."""
Posting WM_CLOSE to the window will probably work. If not, then send
an application defined message to the win
applications and
report any incompatibilities.
PEP: 349
Title: Allow str() to return unicode strings
Version: $Revision: 1.3 $
Last-Modified: $Date: 2005/08/22 21:12:08 $
Author: Neil Schemenauer <[EMAIL PROTECTED]>
Status: Draft
Type: Standards Track
Content-Type: text/plain
Created: 02-Aug-200
than is needed, IMHO, even my handy/mobile phone/cell phone can easily
cope with 1.8Mb!
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : [EMAIL PROTECTED]
Cenix Website : http://www.cenix-bioscience.com
--
http://mail.python.org/mailman/listinfo/python-list
eiving patch files that assume one of Windows or
Unix (in terms of path names and line end characters) which then fail to
apply on the other platform. I would like to have a version I could hack on.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
.GetShortPathName(mypath),
> ...
> Looking at the pyWin32 sources, it does look like only the ASCII version
> of this function exists, which suggests that for now this route is a
> dead-end.
All APIs can be accessed through ctypes.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
ckly"-filter with a manual "okay,
> you're whitelisted for another 24 hours" setup, but it seems to block
> messages mostly by random. and some messages don't seem to get
> through at all. slightly annoying.
Hmm, the message should eventually get through since it ends
so I can use that through c-types.
--
Neil
--
http://mail.python.org/mailman/listinfo/python-list
67 bytes
1 Dir(s) 7,014,309,888 bytes free
C:\bin>dir "c:\Těší mě čý żółąźćśęŁ"
Volume in drive C has no label.
Volume Serial Number is A04B-224D
Directory of c:\Těší mě čý żółąźćśęŁ
17/09/2005 09:56 AM .
17/09/2005 09:56 AM ..
.
Instead of:
cmd = r'java -jar sforcedataloader.jar -Dsalesforce.config.dir=c:\config'
os.system(cmd)
use
cmd = r'java -Dsalesforce.config.dir=c:\\config -jar sforcedataloader.jar'
os.system(cmd)
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnova
Neil Benn wrote:
>Steve M wrote:
>
>
>
>>Well, apparently I fried my brain trying to sort this out. There is a
>>typo in my example code in the post but not in my real program. (I know
>>it is a no-no when asking help on c.l.py but I simplified some details
>
the Narrow:Width ratio if you're gonna try
and scan the barcode after printing it out - try and get hold of a
crappy scanner (I got stung by using a good scanner before in the past).
Cheers,
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-0130
there isn't a JVM present on the system - common in windows boxes),
installing JRE is a minimal effort and can be done silently - you can
remove it the same way after if you wish but often Java installers are
used to install Java programs so you don't want to bother doing that.
Cheer
oses. One cause of
slowness is that it reads the source files, traces include files and
checksums them all rather than relying on file times. There are some things
you can do to speed it up:
http://www.scons.org/cgi-bin/wiki/GoFastButton
Neil
--
http://mail.python.org/mailman/listinfo/python-list
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).
what's American about it? If anything, it's more French than American ;-)
N
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany
Tel : +49 (0)35
!", f
...
e:\unicode ! [] ! [u'ko.py', u'abc', u'ascii', u'Gr\xfc\xdf-Gott',
u'uni.py', u'\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2',
u'\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435',
u'\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1', u'\u306b\u307d\u3093',
u'\u66e8\u05e9\u3093\u0434\u0393\xdf', u'\u66e8\u66e9\u66eb', u'unilin.py']
Neil
--
http://mail.python.org/mailman/listinfo/python-list
Peter Maas:
> Perhaps we will soon see a triumphant publication with the title
> "Ilias Lazaridis - the ELIZA of the 21st century. A milestone towards
> the perfect Turing test" ;)
as laridis
Neil
--
http://mail.python.org/mailman/listinfo/python-list
ld be used
when the input failed to convert to string because of a UnicodeError.
Something like
def stri(x, enc='us-ascii'):
try:
return str(x)
except UnicodeError:
return unicode(x).encode(enc)
Neil
--
http://mail.python.org/mailman/listinfo/python-list
rt. Grammatical errors
are often perceived as rudeness.
> Perhaps the question was meant rhetoric.
Aghhh! He's got you doing it too.
Neil -- Aussie ear for the foreign guy
--
http://mail.python.org/mailman/listinfo/python-list
entred dots.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
ciTEFAQ.html#BlackBackground
Adding changes to your user options file rather the global options file
means that they will survive if you upgrade to a new version of SciTE.
There is a SciTE mailing list at
http://mailman.lyra.org/mailman/listinfo/scite-interest
Neil
--
http://mail.python
gt; into system encoding before;
This can lead to failure on Windows when the true Unicode file name can
not be encoded in the current system encoding.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
er input that is not
representable in the encoding? It is easy for users to input any characters
into a Unicode enabled UI either through invoking an input method or by
copying and pasting from another application or character chooser applet.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
default.cfg
> didn't help.
It appears that the bindings are done by key code rather than character.
You may be able to patch this up in pythonwin\pywin\scintilla\keycodes.py
Neil
--
http://mail.python.org/mailman/listinfo/python-list
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : [EMAIL PROTECTED]
Cenix Website : http://www.cenix-bioscience.com
--- Begin Message ---
Leeds, Mark wrote:
I have a string variable say “8023 “ and
are talking about the Interactive Window which is
spread out a bit. The line height is determined by the tallest font
possible in the window. You could go looking through the code to find
all the styles set up for that window. Selecting View | Fixed Font
*twice* does tighten up the text.
urce code, change the dialog resource and recompile
PythonWin. Another approach would be to manipulate the dialog and
control sizes after creation in pythonwin/pywin/mfc/dialog.py
GetSimpleInput().
Neil
--
http://mail.python.org/mailman/listinfo/python-list
a format
supported by that OS: Windows prefers ICO files.
> - Does someone know of a nice downloadable collection of standard glyphs
> (Bitmaps for Open file, New file, Save file, ...) with a free license?
http://sourceforge.net/projects/icon-collection/
Neil
--
http://mail.python.org/mailman/listinfo/python-list
Alia Khouri:
> ctypes - Thomas Heller
I would like this to go in but it won't be added as it allows unsafe
code, such as dereferencing bad pointers.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
Swing tutorial on the Java
tutorials site by sun - that can give you some good starters.
Cheers,
Neil
--
http://mail.python.org/mailman/listinfo/python-list
re, I dunno?)
The GIL thing makes it easier to do threading with Python (there are
disadvantages to the GIL but I won't get into that here - if you're
interested read through the history on this group) but it's still
threading so beware!
Cheers,
Neil
--
Neil Benn
Senior Autom
tring, translation:
''.join([chr(x) for x in range(len)]), or if you are modifying an
existing sequence or inserting into a sequence. It is also impossible to
tell if you should be using a list, array or string for this job.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
ect\tJob\tBarcode\tPlate set )
As you can see, when __str__ is called, the FieldStorage is
displaying the name of the client side file - so it knows what it is,
however when I call .filename on it, I get None. I don;t get what is
happening here - has anyone else seen this and/or knows what
Neil Benn wrote:
Hello,
I'm writing a simple cgi script and want to be able to access
the filename in a FieldStorage file instance. I have successfully
manmaged to access the file as a 'file-like object' by using the
simple code of :
Sorry, split the filename on p
Why psuedo code - this is similar to python code I know but it means
I'm not posting untested python code!!
Cheers,
Neil
--
http://mail.python.org/mailman/listinfo/python-list
ting? PythonWin can be upset by another non-
responding application. A simple thing to try is to remove and reinstall
in case you have modified one of the files in Pythonwin.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
n32ui.pyd on the system path?
Neil
--
http://mail.python.org/mailman/listinfo/python-list
Jim,
> 1.Could someone tell me how to terminate execution in PythonWin?
Use the "Break into running code" command on the context menu of the
PythonWin icon in the bottom right of the taskbar.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
debug),
> step etc.
No, I use PythonWin just as a console and prefer HAP Debugger
although it hasn't been updated for Python 2.4.
http://hapdebugger.sourceforge.net/
Neil
--
http://mail.python.org/mailman/listinfo/python-list
d read or destroy your
files.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
ermission from
Java but it looked complex to me and I doubt many browsers will
cooperate. They have often locked security down to prevent this sort of
access.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
y may not have permission to do so. Often they
won't know how to allow this so you will have to write up detailed
instructions after exploring the area thoroughly yourself.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
much
experience.
While publishing a correction in a future issue would not be very
helpful, adding a correction to online and CD-ROM versions would be. If
anyone understands the technical review process at DDJ, could they give
them a little prod.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
eader(email.Header.decode_header(sub))
Neil
--
http://mail.python.org/mailman/listinfo/python-list
:
Hello,
Guess he's talking about windows :
http://www.dropline.net/gtk/
You will already have a windowing toolkit on windows - mfc/win32.
BTW, I cheated and saw a windows related question from above also same
poster ;-)
Cheers,
Neil
--
Neil Benn
Senior Automation Engineer
e to fail over to a working place.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
create the data file manually, race conditions
seem unlikely.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
de runs and
how clever you are at using cython.
PyPy isn't designed to speed up programs that run for a few
hundred milliseconds and then complete, though it might sometimes
work for that.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
or oats. Also "far too arrogant".
I just learned about this kind of error yesterday while browsing
the programming reddit!
http://en.wikipedia.org/wiki/Muphry's_law
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
hing is utf-8,
right? RIGHT?!?" It also has the interesting behavior that
indexing strings retrieves bytes, while iterating over them
results in a sequence of runes.
It comes with support for no encodings save utf-8 (natively) and
utf-16 (if you work at it). Is that really enough?
--
Neil Cerutti
udgeon and maybe overly sensitive,
> but I felt a need to vent a bit.
The cases where written and spoken English diverge are hotbets of
word usage problems. I'm glad the issue doesn't exist for
programming languages, which thankfully don't really have a
colloquial or spoken v
thm. Can you show sample input and output?
Can you describe the algorithm in plain English?
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
. (13006517)"
>
> Any help would be appreciated
What has A Friend written so far? Where are you stuck?
--
Neil Cerutti
On Tue, Nov 19, 2013 at 1:40 PM, wrote:
> Hi,
>
> A Friend is doing maths in University and has had some coursework to do with
> python.
>
> The que
Larry Wilson itd...@gmail.com via python.org
10:39 PM (10 hours ago) wrote:
>
> Wanting to parse out the the temperature value in the
> " ElementTree or xml.sax.
Since you aren't building up a complex data structure, xml.sax
will be an OK choice.
Here's a quick and dirty job:
import io
import xm
ases where entering
context is optional, and so also works for this use case.
with contextlib.ExitStack() as stack:
try:
f = gzip.open('blah.txt', 'rb')
except IOError:
f = open('blah.txt', 'rb')
stack.enter_context(f)
for line in
ies of British children's literature, The Wombles,
and a British TV show, Steptoe and Son, but the characters work
fine on their own.
But even so, I agree that a footnote is a good idea. And I haven't always
lived up to that ideal, myself.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
ef process(self, name):
print("Node {} Nest {}".format(name, '/'.join(self.names)))
# Do your stuff.
def endElement(self, name):
self.names.pop()
print(sys.version_info)
handler = NodeHandler()
parser = sax.parse(io.StringIO(the_xml), handler)
Output:
sys.version_info
nations(s, i+1):
print(comb)
Output:
('L',)
('E',)
('Q',)
('N',)
('L', 'E')
('L', 'Q')
('L', 'N')
('E', 'Q')
('E', 'N')
('Q', 'N')
('L', 'E', 'Q')
('L', 'E', 'N')
('L', 'Q', 'N')
('E', 'Q', 'N')
('L', 'E', 'Q', 'N')
For some reason I've got more 2-character combinations than you,
though.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
e them.
with contextlib.ExitStack() as stack:
input = stack.enter_context(open(self.full_path, 'r'))
writer = csv.writer(stack.enter_context(open(self.output_csv)))
When working with a csv file I like how it removes the output
temporary file object variable, though if you needed
lar, into a low opinion of Google.
The crappy usenet portal is poor marketing.
I wish they'd never bought dejanews.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2013-12-02, Roy Smith wrote:
> In article ,
> Neil Cerutti wrote:
>
>> On 2013-11-28, Roy Smith wrote:
>> > In article ,
>> > Alister wrote:
>> >> Perhaps the best option is for everybody to bombard Google
>> >> with bug repor
point sequence into one, and
normalizing can lose or mangle information. There are good
examples here: http://unicode.org/reports/tr15/
> Thanks for this excellent post.
Agreed.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
> else:
> SystemExit
>
> The input and output is as wanted, but my answer keep rejected,
> here is my source code http://txt.do/1smv
No, your program outputs nothing. That's bound to fail. ;)
How is your program supposed to work, in your own words?
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2013-12-03, geezl...@gmail.com wrote:
>> x = input()
Your first problem is that input() returns text only up the a
newline, and then stops.
So you are reading the initial number line, but never reading the
rest of the lines.
--
Neil Cerutti
--
https://mail.python.org/mailman/li
cost of switching isn't zero, but it's much easier than
emmigrating from a police state.
Moreover, I'll always feel that I deserve more than I actually
do deserve.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2013-12-04, wxjmfa...@gmail.com wrote:
> Yon intuitively pointed a very important feature of "unicode".
> However, it is not necessary, this is exactly what unicode does
> (when used properly).
Unicode only provides character sets. It's not a natural language
par
ntifiers as attributes is generally a bad idea,
not something to do commonly. Your proposed syntax leaves the
distinction between valid and invalid identifiers a problem the
programmer has to deal with. It doesn't unify access to
attributes the way the getattr and setattr do.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2013-12-04, Piotr Dobrogost
wrote:
> On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti
> wrote:
>> not something to do commonly. Your proposed syntax leaves the
>> distinction between valid and invalid identifiers a problem
>> the programmer has to dea
ization of the style I think your
describing that I can see is it quickly returns zero when modulus
is one.
I'm not a skilled or experienced CPython source reader, though.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
h a fish. A
new Python programmer can generally just get her code working in
a fairly comfortable way, then possibly rewrite it once her first
few programs become horrifying years later.
I haven't found time to rewrite all of mine yet. I still have a
program I use almost every day with an
make them use rocks to bang nails
>>in, because it will make them better carpenters in the long
>>run.
>
> NAILS
>
> Nails were verboten in my high school wood working class...
>
> We used dowels and glue; chisels to carve dove-tails; etc.
...
on makes it very easy to manipulate such a structure. It
isn't clear that you need more than that yet.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
written in C.
I can't think of a reference, but I to recall that
bugs-per-line-of-code is nearly constant; it is not language
dependent. So, unscientifically, the more work you can get done
in a line of code, then the fewer bugs you'll have per amount of
work done.
--
Neil Cerutti
wo ints being what Py3 does). Why
> adorn pointer usage?
Indeed. Golang allows . to do member lookup for both structs and
pointers to structs.
The -> syntax perhaps was needful in the days before function
prototypes.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
rain-damage, writing C
code is no problem; in fact, it feels darn good.
And another thing: How many other languages have their very own
calling convention?
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
n(path, '*')):
if os.path.isdir(fname):
self.descend(fname)
else:
self.process(fname)
def process(self, path):
# Do what I want done with an actual file path.
# This is where I add to the data.
In your case you m
e a convenient place to
hang the functions.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
ssions regularly, for example, when editing
text with gvim. But when I want to use them in Python I have to
contend with the re module. I've never become comfortable with
it.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-01-20, Devin Jeanpierre wrote:
> On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence
> wrote:
>> On 20/01/2014 16:04, Neil Cerutti wrote:
>>> I use regular expressions regularly, for example, when
>>> editing text with gvim. But when I want to use them in Python
m, how
> can judge the OP's reaction to it?
Obvious copying of another person's program, nearly verbatim, is
most likely to be detected. Well, that and submitting one of the
entrapment-purposed answers that are sometimes made availalbe
here and elsewhere.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-01-22, wxjmfa...@gmail.com wrote:
> In fact, Python just becomes the last tool I (would)
> recommend, especially for non-ascii users.
Have a care, jmf. People unfamiliar with your opinions might take
that seriously.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/
maybe I'm just naive.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
ely, just like the responsible adults that we are. Isn't
that right, Mr... Poopy-Pants?
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
case was wanting to print a timedelta without
> the fractions of seconds. The most straight-forward is:
>
> print td.replace(microseconds=0)
That would be nice.
In the meantime, this works for your use case:
td -= td % timedelta(seconds=1)
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
answer to test your program's answer with.
2. A general idea of how to solve the problem.
It's often a mistake to start writing code. Eventually you'll be
able to go directly from problem to code more often, but it will
take practice.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
in Python 2.7. newline handling can be enscrewed
if you forget.
file = open('raw.csv', 'b')
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-02-06, Tim Chase wrote:
> On 2014-02-06 17:40, Mark Lawrence wrote:
>> On 06/02/2014 14:02, Neil Cerutti wrote:
>> >
>> > You must open the file in binary mode, as that is what the csv
>> > module expects in Python 2.7. newline handling can be enscrewe
is few controversial opinions
brought into other topics. Tim's post was responding to a
specific, well-presented criticism of Python's string
implementation. Left unchallenged, it might linger unhappily in
the air, like a symphony ended on a dominant 7th chord.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
501 - 600 of 2046 matches
Mail list logo