Chirag B wrote:
> i want to kno how to link two applications using python for eg:notepad
> txt file and some docx file. like i wat to kno how to take path of
> those to files and run them simultaneously.like if i type something in
> notepad it has to come in wordpad whenever i run that code.
Text
o
start up my full-blown IDE if I want consistent 4-space indentation?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> On 8/24/2012 6:33 PM, Alex wrote:
> > Despite being configured to use a 4 space
> > indentation
...
> > sometimes IDLE's "smart" indentation insists upon using
> > width-8 tabs.
>
> [The 4-space indentation setting] applies to
Mark Lawrence wrote:
> On 25/08/2012 13:50, Alex wrote:
> > Terry Reedy wrote:
> >
> > > On 8/24/2012 6:33 PM, Alex wrote:
> > > > Despite being configured to use a 4 space
> > > > indentation
> > ...
> > > > sometimes
Ramchandra Apte wrote:
> On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
> > I'm new to Python and have been using IDLE 3.2.3 to experiment with
> >
> > code as I learn. Despite being configured to use a 4 space
> > indentation
> >
> >
Terry Reedy wrote:
[snip]
> IDLE is not the interpreter.
Fine, I meant shell. Thanks for fixing that for me.
> The IDLE Shell is intended mainly for single-line inputs.
Maybe it should be limited to that, then. That way stoopid noobs like
me don't use it wrong and then use the wrong nomencla
mooremath...@gmail.com wrote:
> What's the best way to accomplish this? Am I over-complicating it?
> My gut feeling is there is a better way than the following:
>
> >>> import itertools
> >>> x = [1, 2, 3]
> >>> y = list(itertools.chain.from_iterable(('insertme', x[i]) for i
> in range(len(x
Fabio Zadrozny wrote:
> On Thu, Sep 6, 2012 at 10:43 AM, Alex wrote:
> > Ramchandra Apte wrote:
> >
> >> On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
> >> > I'm new to Python and have been using IDLE 3.2.3 to experiment
> with >>
Manatee wrote:
> On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote:
> > I read in this:
> >
> > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N',
> > '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D',
> > 'Digi-Key', '490-1521-1-ND', '']
> >
> >
> >
>
Yes. Although sometimes I fear that we are becoming a society of
end-users who rely too much on the capability of our tools and fail to
take the time to understand the fundamentals upon which those tools are
based or cultivate the problem-solving skills that Project Euler
appears to be trying to ho
Hello, does python have capabilities to display a spatial image and read the
coordinates from it? If so, what modules or extension do I need to achieve
that? I'll appreciate any help.
Thanks,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
This new project provides tools to play with geographical data. It also works
with non-geographical data, except for map visualizations :).
There are embedded data sources in the project, but you can easily play with
your own data in addition to the available ones. Files containing data about
a
Can please anyone explaine me what do each of these code lines and how k-means
algorithm works?
from scipy.cluster.vq import *
from scipy.misc import imresize
from pylab import *
from PIL import Image
steps = 500
im = array(Image.open("empire.jpg"))
dx = im.shape[0] / steps
dy = im.shape[1] / s
them.
They do get installed into the system but the IDLE is not installed.
what should I do about it ?
Regrards,
Alex
Sent from Mail for Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
p()
Everything is explained nicely except the zero parameter in MyApp(0).
Anybody knows what that zero refers to?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ative.
Is that correct?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
My native language is not English so I just wonder how you pronounce
wxPython.
vi-ex python
double-you-ex python
wax-python
or something else
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
file? I had to download, install and use py2exe and Inno Setup in order
to accomplish this. I might be wrong expecting that a language whose
moto is "Batteries Included" would be able to produce exe files. Are
there plans to do this in the future version of Python?
Alex
--
http://mail.py
is no standard, what works?
TIA
Alex
--
http://mail.python.org/mailman/listinfo/python-list
I have a serious problem and I hope there is some solution. It is
easier to illustrate with a simple code:
>>> class Parent(object):
__slots__=['A', 'B']
def __init__(self, a, b):
self.A=a; self.B=b
def __getstate__(self):
return self.A, self
Sorry, I copied and pasted a wrong piece from shell at one part of the
code:
objct.Z=4 was in fact obj.Z=4 and it did refuse to accept Z (because it
is not in __slots__).
But the question remains: why the value of attribute A is not preserved
during pickling and unpickling and what can be done ab
Thanks so much! It makes perfect sense and I am sure it will work now.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to both Alex Martelli and Steve Holden.. We need __slots__ for
other reasons, too long to explain, but basically to prevent assignment
of extra attributes.
I ended up changing child classes this way:
def __getstate__(self):
return(Parent.__getstate__(self), self.C)
def
> >
> OK, but do be aware that slots was intended solely as a
> memory-conservation measure where large numbers of objects are being
> created. You are therefore subverting its true intent by using it to
> limit the assignment of extra attributes (and there has been much recent
> discussion on thi
I apologize for asking maybe a very trivial question.
I have a new class object A with slots. One of the slots is, for
example, object spam. Object spam, in turn, also has slots and one of
them is attribute eggs. I need to assign a new value to eggs. In other
words, I need to perform the following
Great! Thanks, it works (of course).
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am a beginner with python and here is my first question:
How can I read the contents of a file using a loop or something? I open
the file with file=open(filename, 'r') and what to do then? Can I use
something like
for xxx in file:
Thanks for help
Alex
--
http://mail.
Hi,
is it possible to create 'global' variables that can be seen in all
other classes?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
> Jargons of Info Tech industry
>
> (A Love of Jargons)
>
> Xah Lee, 2002 Feb
>
> The jargon-soaked stupidity in computing field can be grouped into
> classes ... One flagrant example is Sun Microsystem's
> Java stuff ... fucking stupid Java and fuck Sun
> Microsystems. This i
Entering the following in the Python shell yields
>>> help(dict.copy)
Help on method_descriptor:
copy(...)
D.copy() -> a shallow copy of D
>>>
Ok, I thought a dictionary copy is a shallow copy. Not knowing exactly
what that meant I went to http://en.wikipedia.org/wiki/Deep_copy where
I coul
uding the
structures pointe to by the pointers). The original object and its deep
copy do not share any memory space.
In #1 no pointers are involved so changing a value affects only D but
not E.
In #2 D['a'] and E['a'] are pointers that both point to the same memory
space. Changing that memory space doesn't change the pointers
themsleves.
In #3 a deepcopy makes sure that a copy is made not just of the
pointers but also of the things pointed to.
So the lesson to be learned is that if you make a copy of a dictionary
whose values are pointers to other structures then a deepcopy prevents
a coupling between a the original and the copy.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
tried
>>> D.cmp('a','b')
Traceback (most recent call last):
File "", line 1, in -toplevel-
D.cmp('a','b')
AttributeError: 'dict' object has no attribute 'cmp'
>>>
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ot;>>>
", the interpreter is said to be in an interactive mode, or in a
calculator mode. In interactive mode, the Python interpreter acts as a
simple calculator: you can type an expression at it and it will write
back the value of that expression."
Is this correct or incorrect?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Where
can I find the "input script" where the sys.path is defined?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
import sys
>>> sys.path
If you've done exactly as I've described here you should see
C:\Python24\mypython in the list.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
>>> f=open('mytext.txt','w+')
>>> f.write('My name is Bob')
>>> s=f.read()
>>> s.len()
>>> len(s)
4082
>>>f.close()
If I open the file mytext.txt in Notepad I see something that begins
with
"My name is Bob VwMÚ¸
Yes the problem seems to be exactly that. I'm moving around the file
pointer. This piece of code works. Observe the only thing I've added is
f.seek(0)
>>> f=open('mytext.txt', 'w+')
>>> f.write('My name is Bob')
>>> f.seek(0)
>>> s=f.read()
>>> print s
My name is Bob
>>> f.close()
I've found this
Thanks Steven, very good explaination. f.seek(0) does the trick!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
g
or a list? I tried:
if a is list:
but that does not work. I also looked in the tutorial and used google
to find an answer, but I did not.
Has anyone an idea about that?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
):
...
...
So if the call is with one parameter only the second class is executed
(calling the 'init' method with the second parameter set to 'None' or
whatever. But this example does not work.
How to get it work?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
in sourceforge called pdf playground.
http://sourceforge.net/projects/pdfplayground
it's supposed to read/write pdf files..
I never tried it, you might want to check it out.
I don't think there's something like perl's pdf support on python.
but you can find tools and libs that might
r oriented)
yes I know it supports sizers, but it wasn't designed for it, and you'll
probably end up manually coding the sizers because the built-in support
is really weird.
anyway, I consider boa the best rad tool for wxpython, it could be
better.. but it's still the best of i
Do you have Python 2.7 64bit versions available for Solaris (10/11)
x86/SPARC, AIX, and HP-UX IA/RISC? I've had the displeasure of having to
install 64bit Python on Solaris and AIX and it's an experience I would not
recommend even though OpenCSW and Perzl have done much of the legwork
already. I'd
> Laura
>
> In a message of Thu, 16 Jul 2015 18:58:37 -0400, Alex writes:
> >Do you have Python 2.7 64bit versions available for Solaris (10/11)
> >x86/SPARC, AIX, and HP-UX IA/RISC? I've had the displeasure of having to
> >install 64bit Python on Solaris and AIX an
leonardo selmi wrote:
> hi all,
>
> i wrote the following code:
>
> def find(word, letter):
> index = 0
> while index < len(word):
> if word[index] == letter:
> return index
> index = index + 1
> return -1
>
> if i run the program i get this error: name '
s reasonable in expecting Python to do the operation
left-to-right.
Am I missing something written somewhere else in the docs? Are the docs
I quoted wrong? Please help me understand the discrepancy I am
perceiving here.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
>
> Opening paragraph, "... exponentiation, which groups from right to
> left". It follows the obvious expectation from mathematics. (The OP is
> using Python 2, but the same applies.)
Thanks. I did miss that parenthetical comment in para 6.15, and that
would have been the
__setstate__.
TIA,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
s going to be
aleatory. How can I get the file's name (only one file is in that
directory) and store it in a variable before executing ftp.retrbinary?
Thanks a lot for your help,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Thanks guys for the help! I used nlst().
The ftputil seems to be very helpfull, but getting a new library in an
organization like the one I work at is big issue. Thanks anyway :)
[EMAIL PROTECTED] wrote:
> alex wrote:
> > Hello,
> >
> > My script is trying to get a file
Hello everyone,
I am writing a terminal server client-server application, that offers
the client the ability to run commands on the server and read their
output.
So far everything works fine, but I encounter a problem with commands
which require some sort of user input; i.e. they don't return
im
be
> separately interpolated, then split the complex array into two real
> arrays and use the routine twice.
Hello,
Thanks for the pointer. I will interpolate the real and imaginary parts
separately then.
Regards,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
online.
Thanks,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
am NOT quite sure of the type of
the fields. How can I output these objects and their fields into an
external file. Any code sample would be highly appreciated !!!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Hye,
I was just wondering what is the difference between
>> if my_key in mydict:
>> ...
and
>> if mydict.has_keys(my_key):
>> ...
I've search a bit in the python documentation, and the only things I
found was that they are "equivalent".
But in this (quiet old) sample ( "http://aspn.ac
;
W. Watson wrote:
> Thanks, but no thanks. The learning curve is way too steep.
There are two good editors for writing code -- vim and emacs.
If you write more than a few lines of code a year you should learn
one of them. Time spent doing it will pay for itself *very* quickly.
--
Alex
--
http://mail.python.org/mailman/listinfo/python-list
W. Watson wrote:
> Well, you may. Unfortunately, there are many NGs that do the opposite.
>
> Bruno Desthuilliers wrote:
>> W. Watson a écrit :
>>> How about in the case of MS Win?
>>>
>>> Ben Finney wrote:
(Please don't top-post. Instead, reply below each point to which
you're resp
egc> how do i write a regexp for this.. or better yet shd i even be using
egc> regexp or is there a better way to do this
"A team of engineers were faced with a problem; they decided to handle
it with regular expressions. Now they had two problems"
Regular expressions are not always the bes
ntation is something to strive for.
So, to sum it up, I have one class in one file, both with the same
name. How do I store/import/handle it in a nice, clean and python-like
manner?
Thank you very much in advance.
/ Alex
--
http://mail.python.org/mailman/listinfo/python-list
On 5/15/06, bruno at modulix <[EMAIL PROTECTED]> wrote:
> Alex wrote:
> > Hi, this is my first mail to the list so please correct me if Ive done
> > anything wrong.
> >
> > What Im trying to figure out is a good way to organise my code. One
> > class per .
Which library could you recommend to perform simple editing of Python
code (from Python program)? For example, open *.py file, find specific
function definition, add another function call inside, find existing
call and change parameter value, etc.
What I'm trying to implement isn't a real visua
Guilherme Polo wrote:
> 2008/2/9, Alex <[EMAIL PROTECTED]>:
>
>> Which library could you recommend to perform simple editing of Python
>> code (from Python program)? For example, open *.py file, find specific
>> function definition, add another function call insi
Steven D'Aprano wrote:
> On Sat, 09 Feb 2008 14:38:29 +0300, Alex wrote:
>
>
>> Which library could you recommend to perform simple editing of Python
>> code (from Python program)?
>>
>
> I'm not even sure such a library exists.
>
Yes the
Guilherme Polo wrote:
> 2008/2/9, Arnaud Delobelle <[EMAIL PROTECTED]>:
>
>> On Feb 9, 12:32 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
>> > 2008/2/9, Alex <[EMAIL PROTECTED]>:
>> >
>> > > Guilherme Polo wrote:
>&
Guilherme Polo wrote:
> 2008/2/9, Alex <[EMAIL PROTECTED]>:
>
>> Guilherme Polo wrote:
>> > 2008/2/9, Arnaud Delobelle <[EMAIL PROTECTED]>:
>> >
>> >> On Feb 9, 12:32 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
>>
Can I get reference to module object of current module (from which the
code is currently executed)? I know __import__('filename') should
probably do that, but the call contains redundant information (filename,
which needs to be updated), and it'll perform unnecessary search in
loaded modules li
Gabriel Genellina wrote:
> En Sun, 17 Feb 2008 16:25:44 -0200, Alex <[EMAIL PROTECTED]> escribi�:
>
>> Can I get reference to module object of current module (from which the
>> code is currently executed)? I know __import__('filename') should
>> probably
Alex wrote:
> function and class namespaces have __name__ attribute too
I was wrong - these were function and class _objects'_ namespaces
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> En Mon, 18 Feb 2008 14:49:02 -0200, Alex <[EMAIL PROTECTED]> escribió:
>> That's what I've been searching for, thanks. By the way, I know it might
>> be trivial question... but function and class namespaces have __name__
>> at
Hi all,
The subject says pretty much all, i would very appreciate an answer. I
tried to search the various forums and groups, but didn't find any
specific answer...
Thanks,
Alex.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 12, 8:48 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Mar 12, 2:19 pm, Alex <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > The subject says pretty much all, i would very appreciate an answer. I
> > tried to search the various forums and groups,
On Mar 13, 6:21 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Mar 13, 7:02 am, Bruno Desthuilliers
>
>
> [EMAIL PROTECTED]> wrote:
> > Alex a écrit :
> > (sni)
>
> > > First of all thanks all for answering!
>
> > > I have some environm
On Mar 15, 5:42 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Mar 14, 6:37 pm, Alex <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Mar 13, 6:21 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > > On Mar 13, 7:02 am, Bruno Desthuilliers
> > > [EMA
There are several ways to use Scintilla in Python, the ones described at
http://scintilla.sourceforge.net/ScintillaRelated.html are:
-through wxPython
-pyscintilla is the original Python binding for Scintilla's default
GTK 1.x class. Includes some additional support, such as nativ
Hello everybody
I am mainly a Fortran programmer and beginning to learn Python(2.5)
and OOP programming.
I hope in the end to put a GUI on my existing Fortran code.
Therefore I am also trying to learn Python's "ctypes" library.
Unfortunately the ctypes tutorial does not show simple examples so I
s
, but
it's great! This is motivating for going ahead.
Regards Alex
--
http://mail.python.org/mailman/listinfo/python-list
Duncan
Thank you for your explanation of the relationship between calling
convention and stack management.
I will try to understand better this topic in the CVF and ctypes
documentation (not so easy).
Regards Alex
--
http://mail.python.org/mailman/listinfo/python-list
ccept gzipped
content to be as friendly as possible and don't do too many queries in
a small time span.
Parsing Google result page with Beautifulsoup is a piece of cake.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a Pyhon GUI application that launches subprocess.
I would like to read the subprocess' stdout as it is being produced
(show it in GUI), without hanging the GUI.
I guess threading will solve the no-hanging issue, but as far as I
searched for now, I've only seen how to read the stdout af
On Dec 19, 5:09 pm, Albert Hopkins wrote:
> On Fri, 2008-12-19 at 06:34 -0800, Alex wrote:
> > Hi,
>
> > I have a Pyhon GUI application that launches subprocess.
> > I would like to read the subprocess' stdout as it is being produced
> > (show it in GUI), wit
you can have a look at my project on launchpad
https://code.launchpad.net/~esaurito/jazz-crawler/experimental.
It's a single site crawler but you can easily modified it.
Bye.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
exapnding in
the height direction (two lines high).
I am currently running in circles so maybe can anybody help me?
See below for my best effort (OS WinXP, Python 2.5).
Thank you, regards Alex
import wx
class Frame(wx.Frame):
def __init__(self, title, pos, size):
wx.Frame.__init__
On 27 Feb., 15:14, Vlastimil Brom wrote:
> 2009/2/27 alex :
>
> > Hi all
> > I have a gridsizer consisting of two vertically stacked panels, one
> > with a StaticBox and the other with a TextCtrl.
> > I would like that the TextCtrl expands at program start fully t
Fortran world my programming style may be quite
"fortranic" instead of being "pythonic" but I am trying to improve and
enjoy what I learned so far...
Thanks Alex
#
#
#!/usr/bin/env python
#
#
"""Add Python docs string"""
import wx
import os
ure out
what the problem is.
Maybe you can give me a hint. Again thank you.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
;Edit",
("&Copy", "Copy", self.OnCopy),
("C&ut", "Cut", self.OnCut),
...)))
etc...
But I can not get the example running and I can't reprogram the
example to get it running for my case
Tim and Mensanator
Thank you very much, this will get me further.
I can not recall having seen this in my books...
I am still getting my grips with Python and OOP.
Regards Alex
--
http://mail.python.org/mailman/listinfo/python-list
re.
The following code shows the problem and works out of the DOS box.
Any help would be greatly apreciated.
Alex
#
#!/usr/bin/env python
#
"""Add Python docs string"""
import wx
#
#
class Frame(wx.Frame):
def __init__(self, title, pos, size):
wx.Frame
this group.
Thank you
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Hi all.
In order to understand the concept of threading pool in python I'm
working on a simple single-site web crawler.
I would like to stop the program when the threading pool have
downloaded all internal links from a web site, but now my program keep
waiting forever even if there are no more lin
ith_item()
> q.task_done()
>
> You can also use a condition variable and a lock or a semaphore to
> signal the worker threads that all work has completed.
Thanks a lot, it works!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
known bug or maybe I
missed something...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
and pragmatic way to produce working software, so I'd like to
find something really simple ad straightforward because I don't have
to manage big programming projects.
Thanks in advance,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
est choice? I'm not a
> > professional developer (I'm a SEO) but I belive that unit testing is a
> > good and pragmatic way to produce working software, so I'd like to
> > find something really simple ad straightforward because I don't have
> > to mana
Hi everybody,
I wonder if it is possible in python to produce random numbers
according to a user defined distribution?
Unfortunately the random module does not contain the distribution I
need :-(
Many thanks
axel
--
http://mail.python.org/mailman/listinfo/python-list
much clearer.
Many thanks,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
hey mark, wondering if you've still got a net presence out there. ive
been playing around with the old C prothon code base and wanted to chat with
you about things.
shoot me an email if you are still out there.
--Alex
--
http://mail.python.org/mailman/listinfo/python-list
SOP is to write the actual PID of the running process into the pidfile, then
check to a) that the pidfile exists, and b) that the process referenced in
the pidfile exists. if the pidfile exists, but the process does not, take
over the pidfile and carry on.
On Fri, Aug 29, 2008 at 9:51 AM, Heston
On Sep 11, 11:55 am, srinivasan srinivas <[EMAIL PROTECTED]>
wrote:
> Hi,
> I am trying to download data from a webpage. I use mechanize python module.
> Could someone tell me how to set/pass an agent like Mozilla or IE that we do
> in perl's WWW::Mechanize??
>
> Thanks,
> Srini
>
> Be the f
= "y"
if i == 2: data['param'] = "x"
print data_set
This script print out:
({'param': 'a'}, {'param': 'y'}, {'param': 'x'})
Why? I'm coping data_set in ds so why data_set is changed?
Thanks in advance.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 2554 matches
Mail list logo