How to change the color of source browser in DrPython?
--
http://mail.python.org/mailman/listinfo/python-list
On 3/8/21 3:35 PM, Chris Angelico wrote:
On Tue, Mar 9, 2021 at 8:31 AM D'Arcy Cain wrote:
On 2021-03-06 4:24 p.m., Terry Reedy wrote:
Trolling, among other things, is fishing with a moving line, especially
with a revolving lure, as from a moving boat. A troll, among other
things, is that me
On 3/29/21 5:12 AM, Alexey wrote:
Hello everyone!
I'm experiencing problems with memory consumption.
I have a class which is doing ETL job. What`s happening inside:
- fetching existing objects from DB via SQLAchemy
- iterate over raw data
- create new/update existing objects
- commit cha
e to use
a thread instead of a fork. But not sure how well all that would work
with celery.
--Sam
--
https://mail.python.org/mailman/listinfo/python-list
if
anyone else has been down this path...
Regards,
Sam
--
https://mail.python.org/mailman/listinfo/python-list
at 11:20 AM Sam wrote:
Hi,
We are not a java shop and we are trying to interface with an API that
is "JMS only". We asked if it supported activeMQ or STOMP and they
replied that it is Sun JMS only. So what does that mean if we want to
communicate with it from py
On 5/28/20 12:49 AM, Rahul Gupta wrote:
I am having a Ubuntu system which has 125 Gb of RAM. I executed few python
scripts on that system. Those scripts uses numpy arrays and pandas. Now
execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap is
occupied. At this moment no
Antoon Pardon writes:
Assuming you mean threading.Thread, this is a native thread. It is not a
simulation. Something else is going wrong.
Then I must have something locked. Here's what I do:
Yes you have locked the GIL. Take a look at the following
URL: http://docs.python.org/api/threads
Reinhold Birkenfeld writes:
Hi,
after Guido's pronouncement yesterday, in one of the next versions of Python
there will be a conditional expression with the following syntax:
X if C else Y
which is the same as today's
(Y, X)[bool(C)]
What's wrong with "C ? X:Y"?
Aside from ":" being overl
Jaime Wyant writes:
On 9/30/05, Sam <[EMAIL PROTECTED]> wrote:
Reinhold Birkenfeld writes:
> Hi,
>
> after Guido's pronouncement yesterday, in one of the next versions of Python
> there will be a conditional expression with the following syntax:
>
> X if C el
Leif K-Brooks writes:
Sam wrote:
And "foo if bar" is Perl-ish; yet, even Perl has the ? : operators.
What _isn't_ Perl-ish?
BASIC?
pgp7WNg5zZz7a.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
I'm putting gtkhtml2.View() inside a gtk.ScrolledWindow, which goes into a
gtk.Dialog.vbox.
How do I obtain gtkhtml2.View's preferred height, and set the dialog's
height accordingly, given a specific width?
I can do a gtk.Dialog.set_default_size() up front, specifying the width and
height la
http://www.wnbc.com/family/5060215/detail.html
I know there's an on-topic joke in here somewhere, but I'm having some
problem finding it, at the moment.
You may take a crack at it, if you'd like…
pgpWkRit76A0o.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-l
Jeremy Moles writes:
in the world I got the idea from! According to the docs, METH_VARARGS is
(PyObject*, PyObject*)?
Right.
My prototype shouldn't even compile... but it
Why wouldn't it compile?
2. No where in the docs does it show how to "correctly" create an
in
Xah Lee writes:
Dear Michael Goettsche,
why don't you lead the pack to be on-topic for a change, huh?
Why don't you:
1. Learn how to properly format messages for posting to Usenet, so that
your scribblings don't read like stream-of-consciousness babbling
(see http://en.wikipedia.org/wiki/
/samschul/
Sam Schulenburg
Claudio Grondi wrote:
> Thank you Jeff very much for your quick reply.
> It saved me really much time of digging in the wrong direction.
>
> <[EMAIL PROTECTED]> wrote in
> news:<[EMAIL PROTECTED]>...
> >> I took the
The main use of my SCSI routines,is that by using the SCSIPASSTHROUGH
layer under Windows gives the user absolute control of the storage
device. For example copying data from and IDE drive to a SCSI drive
becomes transparent using SCSI commands. I.e Logical block 0 remains
consistant. I had an PHD
Hi All,
I am interested in learning python since I am hearing more and more
about python for use in web development
I am starting out on python, with knowledge of PHP some perl
my current hurdle is setting up either apache 1 or 2 with python 2.3.3 I
have installed modpython fine
which informed
r in terms of functionality and stability?
Thanks
Sam
--
http://mail.python.org/mailman/listinfo/python-list
Hi group,
I m wondering which Excel module is good to be used by Python?
Thanks
Sam
--
http://mail.python.org/mailman/listinfo/python-list
Simon Brunning wrote:
On Wed, 12 Jan 2005 15:18:09 +0800, sam <[EMAIL PROTECTED]> wrote:
I m wondering which Excel module is good to be used by Python?
If you are on Windows, and you have Excel, then the Python for Windows
extensions[1] are all you need to drive Excel via COM. O'Reill
Hi,
I have seen some software written in python and delivered as binary form.
How does these binary code get generated by python compiler?
Thanks
Sam.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Daniel Bickett wrote:
I believe Sam was talking about "frozen" python scripts using tools
such as py2exe:
oh, you mean that "python compiler" didn't mean "the python compiler".
here are links to some more tools, btw:
http://effbot.org
#x27;ve guessed correctly at what the OP
meant, one should also consider that the word "binary"
can be quite ambiguous in the hands of a newbie.
After all, source code is stored in binary too...
Sorry for the vagues terms. I meant compile a python script into a
binary program.
Thanks
Sam
version of webmin first.
Thanks
Sam.
--
http://mail.python.org/mailman/listinfo/python-list
I'm using Python 2.3.5 with pygtk 2.4.1, and I'm using the second threading
approach from pygtk's FAQ 20.6 - invoking "gtk.gdk.threads_init()", and
wrapping all gtk/gdk function calls with
gtk.threads_enter()/gtk.threads_leave()
I start a thread, via thread.Threading.start(). The thread then
Jp Calderone writes:
On Wed, 21 Sep 2005 18:23:33 -0500, Sam <[EMAIL PROTECTED]> wrote:
I'm using Python 2.3.5 with pygtk 2.4.1, and I'm using the second threading
approach from pygtk's FAQ 20.6 - invoking "gtk.gdk.threads_init()", and
wrapping
nes in a configuration file, I want
to store the array of "macro" in a list.
How can I do that in Python?
Thanks
Sam.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
What is the correct syntax of declaring a regex syntax in Python 2.3?
I got the following error:
# python2.3 test.py
File "test.py", line 10
macros_parser = re.compile (r""" (\s+)=\"(\s+)\"$ """,re.VERBOS)
^
SyntaxError: invalid s
Larry Bates wrote:
sam wrote:
Hi,
I have a configuration file need to be processed (read/write) by python.
Currently I the following method can only read and store data that
python read a line from a configuraiton file:
def _parse (self):
# parse message
m = self.FWShow_Command.match
Hi,
I got the the following syntax error in comparison:
File "/usr/local/work/myparser.py", line 85
if ( (m=self.macro_parser.match (d)) != None ):
^
SyntaxError: invalid syntax
How can I get around wtih this? I don't want to break down this
comparison in two ste
Hi,
I was confused by \s+ and \S+ in python.
The second one (\S+) is stand for matching all alphabets except for
digit and space? How about the first one?
Thanks
Sam
--
http://mail.python.org/mailman/listinfo/python-list
Tim Roberts wrote:
sam <[EMAIL PROTECTED]> wrote:
Hi,
I got the the following syntax error in comparison:
File "/usr/local/work/myparser.py", line 85
if ( (m=self.macro_parser.match (d)) != None ):
^
SyntaxError: invalid syntax
How can I get around wtih this? I don
Hi group,
Is there any site like cpan.org for python?
Thanks
Sam
--
http://mail.python.org/mailman/listinfo/python-list
the following error:
for m, name in [self.macro_parser]
^
SyntaxError: invalid syntax
What is the valid syntax with this usage?
Thanks
Sam
--
http://mail.python.org/mailman/listinfo/python-list
I would like to use python to retrieve the mac address of the ethernet port.
Can this be done? Thank you.
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, January 12, 2014 12:34:35 AM UTC+8, Michael Torrie wrote:
> On 01/11/2014 07:35 AM, Andriy Kornatskyy wrote:
>
>
> On Linux you could access the /sys/devices/virtual/net/
>
> file in the sysfs filesystem. I'm sure there are other ways.
>
Thank you to everyone for the helpful answer
I have python modules which are used only in specific functions and the
functions are not called all the time. Is it better to import the function
inside the function only or is it a better practice to always import all
modules at the top of the script? If I import the module inside the function
I would like to build an array of dictionaries. Most of the dictionary example
on the net are for single dictionary.
dict = {'a':'a','b':'b','c':'c'}
dict2 = {'a':'a','b':'b','c':'c'}
dict3 = {'a':'a','b':'b','c':'c'}
arr = (dict,dict2,dict3)
What is the syntax to access the value of dict3->'a'
I would like to protect my python source code. It need not be foolproof as long
as it adds inconvenience to pirates.
Is it possible to protect python source code by compiling it to .pyc or .pyo?
Does .pyo offer better protection?
--
https://mail.python.org/mailman/listinfo/python-list
One thing I observe about python byte-code compiling is that the main script
does not gets compiled into .pyc. Only imported modules are compiled into .pyc.
May I know how can I compile the main script into .pyc? It is to inconvenience
potential copy-cats.
--
https://mail.python.org/mailman/li
I have a datafeed which is constantly sent to a MySql table. The table grows
constantly as the data feeds in. I would like to write a python script which
process the data in this table and output the processed data to another table
in another MySql database in real-time.
Which are the python li
On Friday, January 17, 2014 10:07:58 AM UTC+8, Denis McMahon wrote:
> On Thu, 16 Jan 2014 17:03:24 -0800, Sam wrote:
>
>
>
> > I have a datafeed which is constantly sent to a MySql table ...
>
>
>
> > Which are the python libraries which are suitable for t
is it able to utilize functions written in Python in Matlab?
--
https://mail.python.org/mailman/listinfo/python-list
I am writing my first python script to access MySQL database. With reference to
http://mysql-python.sourceforge.net/MySQLdb.html#connection-objects
Why is it advisable to use _mysql and not MySQLdb module directly?
--
https://mail.python.org/mailman/listinfo/python-list
Is MySQLdb the recommended python module for SQL database access? Are there
other modules? What I want in a module is to be able to write readable and
maintainable code.
--
https://mail.python.org/mailman/listinfo/python-list
For string, one uses "" to represent string. Below is a code fragment that uses
""" instead.
cursor.execute("""SELECT name, phone_number
FROM coworkers
WHERE name=%s
AND clue > %s
LIMIT 5""",
(name, clue_th
I got to know about Python a few months ago and today, I want to develop only
using Python because of its code readability. This is not a healthy bias. To
play my own devil's advocate, I have a question. What are the kinds of software
that are not advisable to be developed using Python?
--
http
p.cfg
├── setup.py
├── tests.py
└── tox.ini
Fernando Felix
There is this too: https://pypi.python.org/pypi/python_boilerplate_template
--Sam
--
https://mail.python.org/mailman/listinfo/python-list
Dynamic data type has pros and cons. It is easier to program but also easier to
create bugs. What are the best practices to reduce bugs caused by Python's
dynamic data-type characteristic? Can the experienced Python programmers here
advise?
Thank you.
--
https://mail.python.org/mailman/listinf
I would like to learn and try out functional programming (FP). I love Python
and would like to use it to try FP. Some have advised me to use Haskell instead
because Python is not a good language for FP. I am sort of confused at the
moment. Is Python a dysfunctional programming language to apply
I need to pass a global variable into a python function. However, the global
variable does not seem to be assigned after the function ends. Is it because
parameters are not passed by reference? How can I get function parameters to be
passed by reference in Python?
--
https://mail.python.org/mai
My understanding of Python tuples is that they are like immutable lists. If
this is the cause, why can't we replace tuples with lists all the time (just
don't reassign the lists)? Correct me if I am wrong.
--
https://mail.python.org/mailman/listinfo/python-list
hi everybody i am just starting to learn python, i was writing a simple i/o
program but my print statement is acting weird. here is my code i want to know
why it prints this way. thank you
car=int(input("Lamborghini tune-up:"))
rent=int(input('\nManhatan apartment: '))
gifts=int(input('\nRand
I had a simular situation when I was writing Python routines to access
the the storage (SCSIPASSTHROUGH) layer provided by Windows XP. My
solution was to develope an extention in C that allocated all storage
buffers within the extension. Then I added access extensions to
controll reading and writin
I have updated my page at http://starship.python.net/crew/samschul/
These tools allow for the user to issue low level SCSI commands via the
windows SCSIPASSTHROUGH interface layer. These routines will work from
IDLE, Pythonwin,and Python.exe.
The changes include the following:
1) Deleted documenta
Just a added note,that these routines will access any storage drive
that is mounted under Windows. The Scsi Pass Through layer maps all
Pcmcia,IDE,andSCSI drives to use SCSI commands. This allows a user to
access all these interfaces with a common command set.
Sam Schulenburg
--
http
SCSITOOLS24USBV1.4.zip
Sam Schulenburg
--
http://mail.python.org/mailman/listinfo/python-list
After downloading and trying out Ironpython, I have the following
comments:
1) I like the idea of Python under .net
2) I like the support for both Microsoft math lib,and Python's math lib
Will Microsoft maintain the compatability between standard python with
the addition of their libs?
--
http://
Has anyone been able to access the source code for Pywin32 at
sourceforge? I have been able to use TortouseCVS to access other CVS
projects,but with the Pywin32 cvs site, I can not log in.
Sam Schulenburg
--
http://mail.python.org/mailman/listinfo/python-list
Trent:
Thanks for the reply. I tried again today and everthing worked. I did
find a type in my CVSROOT string,and corrected it. Thanks for the
examples posted in the included link.
Sam Schulenburg
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm currently creating a GUI, which consists of a main frame that
contains a menu bar,a toolbar and an empty panel, let's call it
main_panel.
Ideally, I'd like the following functionality: upon choosing an item
from the menu bar, a particular graph will be displayed inside
main_panel.
Now
the right panels...
Secondly, I stuffed up when trying to give graph_panel a parent of
main_panel. It turns out I was actually never doing this, so the
toolbar would appear, but none of the buttons would work.
Thanks again for your comments, they were very helpful,
Cheers
Sam
--
http://mail.python.o
Hello,
I've installed matplotlib recently because I want to add graphing
functionality to a GUI that i'm making. I decided to try using the
wxAgg backend instead of plain old wx because:
a) I hear it's quicker, and
b) when i use the wx backend, the axis labels don't seem to work
properly - i can't
ly wondering about. is the code immediate legible to experienced
python users? or does it look like gibberish at first?
just hoped for some fresh eyes on it.
thanks,
sam
PS making check=True just saves the code from printing 'those numbers
don't sum to 100' if they haven't all been entered, which looks kind of
silly.
--
http://mail.python.org/mailman/listinfo/python-list
you're right, of course. it occurred to me that, even if it were
manageable for a few items, it would quickly become absurd as the
number of items grew. this:
def get_pct():
while True:
pct_list=[['cash', 0], ['bond', 0], ['blue', 0], ['tech', 0],
['dev',
0]]
this does what i want, though i don't like the inner while loop having
to be there
def get_pct():
while True:
pct_list=[['cash', 0], ['bond', 0], ['blue', 0], ['tech', 0],
['dev',
0]]
total=0
for i in range(len(pct_list)):
of interest.
thanks again,
sam
--
http://mail.python.org/mailman/listinfo/python-list
in IDLE:
4.433 seconds
in terminal:
0.001 seconds
a difference of between 3 and 4 orders of magnitude is rather striking.
anyone know what's going on here? is it a python, a unix thing, or
something else?
sam
--
http://mail.python.org/mailman/listinfo/python-list
i was actually experimenting on windows on my own pc before the
workstation arrived, and IDLE printed a lot faster on windows than in
solaris for me too.
i would indeed complain to sun if i had ever got the impression that
anyone over there ever knew what was going on... : )
> but on the ot
i forgot to mention that i'm running a version of python 2.3 (think
it's 2.3.5), as that's what was installed and i'm not hooked up to the
internet with the ultra 20 yet. that may account for some of the
difference.
sam
--
http://mail.python.org/mailman/listinfo/python-list
cise code in all. thought i'd try and
contribute something for once instead of just asking questions.
sam
PS it does actually work, in case you're wondering. :-)
--
http://mail.python.org/mailman/listinfo/python-list
realize there is a lot of material on this subject already available,
but i am finding it difficult to make sense of, it's like trying to
take a drink from a fire hose.
any advice would be gratefully received. i will almost certainly be
coding this on windows, for what it's worth.
thank
thanks guys,
i'll follow this up more in a couple of weeks when i know what i need
to do better.
sam
--
http://mail.python.org/mailman/listinfo/python-list
ed, when I signed the standard intellectual property
forms.
Sam Schulenburg
Jarek Zgoda wrote:
> [EMAIL PROTECTED] napisa³(a):
>
> >>In our field, we don't always get to program in the language we'd like
> >>to program. So... how do you practice Python in this cas
I recommend that you also replace the NULL after the METH_VARARGS with
a valid documentations string such as:
static PyMethodDef modglMethods[] =
{
{ (char *)"glVertex4f", _wrap_glVertex4f, METH_VARARGS, "My
Doc String"},
{ NULL, NULL, 0, NULL }
func */
const char *ml_doc;/* The __doc__ attribute, or NULL */
};
Sam Schulenburg
John Machin wrote:
> On 3/06/2006 1:38 PM, sam wrote:
> > I recommend that you also replace the NULL after the METH_VARARGS with
> > a valid documentations string such as:
> >
> >
tomer:
It is my opinion that you would loose performance if the Python
interpreter had the additional task of verifying byte code. It might be
more appropriate to have a preprocessor that did the verifying as it
compiled the byte code.
Sam Schulenburg
gangesmaster wrote:
> the following (ran
Mel:
Wow that book brings back memories. I scanned my copy to review the
subject covered, and came to the conclusion that mind reading
algorithms are the answer.
Sam Schulenburg
Mel Wilson wrote:
> sam wrote:
> > tomer:
> >
> > It is my opinion that you would loose perf
Very interesting, I have downloaded it,and I like what I see.
ago wrote:
> I have just discovered Python Scripter by Kiriakos Vlahos and it was a
> pleasant surprise. I thought that it deserved to be signalled. It is
> slim and fairly fast, with embedded graphical debugger, class browser,
> file b
figure out what I was trying to accomplish.
Sam Schulenburg
James Stroud wrote:
> Fredrik Lundh wrote:
> > James Stroud wrote:
> >
> >> See the actual question:
> >>
> >> >How would you construct a generator to acheive this?
> >
> >
>
I have been using the latest VC.net to compile my SCSIPython extension
dll for Python 2.3, 2.4, and 2.5 without any problems. I just have to
make shure that I link with the correct Python.lib
Sam Schulenburg
--
http://mail.python.org/mailman/listinfo/python-list
still got the same error. it's
probably something trivial, but i can't seem to get round it by using
while loops, and i had the same problem with cmp(), hence the explicit
comparison above, which still doesn't work. can anyone help a beginner
out with this?
many thanks in advance,
actually, that little bit of code i wrote is obscenely wrong anyway, so
please don't bother analyzing the flow.
any insight into the "list index out of range" error would still be
welcome, though.
--
http://mail.python.org/mailman/listinfo/python-list
yes, yes, of course, thank you. not sure what i thought i was doing
there.
i'll see if i can get it running now...
--
http://mail.python.org/mailman/listinfo/python-list
for what it's worth. and it is approx. five times quicker than the
bubblesort i wrote to begin with on a 286-word highly unordered list,
so i wasn't wasting my time after all...
__
import time
file_input = open('wordlist.txt', 'r
ny where we exchanged a lot of e-mails, and
the titles were always 're: your e-mail', or 'project stuff', or 'file
for client' or suchlike. made it kind of difficult to find anything.
figured a similar principle might apply here... ; )
thanks again all,
sam
--
http://mail.python.org/mailman/listinfo/python-list
to that default despite seemingly
(to me at least) avoiding it through explicitly returning something
else?
thanks in advance,
sam
--
http://mail.python.org/mailman/listinfo/python-list
i take
your point about trying to abbreviate what is, in effect, verbiage.
thanks again for all the answers. it boggles the mind that one can have
access to this almost immediate help at no charge.
sam
--
http://mail.python.org/mailman/listinfo/python-list
now moved and restored the python2.3 file to its
original position, i find the same command prompt failing to work. have
i messed it up by moving it around?
my workstation remains a shiny box which does naught but hum
malevolently. is there hope?
thank you,
sam
--
http://mail.python.org/mailma
ing 'there is no installed viewer capable of displaying the
document'?
i have no idea what i need, or where i can get it. any ideas?
sam
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> > i think i've tracked down the equivalent files on my pc. one opens the
> > interpreter in a white-backed text editor, the other at the
> > black-backed command prompt. i have equivalent files of the same size
> > on the workstation, which must be the same. does anyone k
> I would try to use the python executable located in /usr/bin if it is
> exists, otherwise use the python executable in /usr/sfw/bin.
>
> casevh
lordy lord, is that where it was. i just found it now. i had been
thinking that idle was the name of the python interpreter, not just the
IDE, hence m
hives here. maybe i'm just not searching
with the right words. it's late here and my brain's switching off...
cutting and pasting it into the interpreter is a bit of a bore. any
help?
much appreciated in advance,
sam
PS i've just reached first base with classes, and i think i'
should read 'definitions', of course. i hate stupid typos.
--
http://mail.python.org/mailman/listinfo/python-list
> What I do:
>
> For each new major version of python, in .../site-packages I make a
> directory "sdd" (my initials). In it I put an empty file named
> "__init__.py". When I have things I want to reuse, I put them in
> files named things like ".../site-packages/sdd/goodidea.py", and
> I get use
t; statements. To me, lining them up, even if it requires quite a few
> extra spaces, helps readability quite a bit. Comments?
>
> Thanks,
> Steve Bergman
I prefer to use 132 char per line, and like you I line up the = sign
for readability.
The reason for this conventio
x27;m just glad the damn thing's
working again... :)
sam
--
http://mail.python.org/mailman/listinfo/python-list
thanks, i'll remember that. it makes sense that there should be a way
of doing it...
sam
--
http://mail.python.org/mailman/listinfo/python-list
l2.SetValue(ct)
> ser.readline()
You might want to try using ser.read() instead of ser.readline() as
you may not be getting linefeed carrage return characters . I usually
setup a buffer to scan for the characters I expect.
>
>
>
> Pls.Note i hove also try with read(number of byte ) with inWaiting(),
> flush etc
>
>
> But no result.
>
> Thanks Luca
Hope this helps
Sam Schulenburg
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 316 matches
Mail list logo