Christian Gollwitzer wrote:
> Am 18.11.15 um 23:46 schrieb Ulli Horlacher:
> > To run my Python programs on other Windows systems without a Python
> > installation I must create standalone Windows executables.
> >
> > pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
> > w
fl writes:
> Hi,
>
> From previous post, I get many helpful replies. Now I have a new question
> when I run this example code:
>
>
> -
> sq=[]
> for xx in range(5):
> print 'here'
> sq.append(lambda:xx**2)
> ...
> sq[2]()
> Out[151]: 16
>
> sq[3]()
> Out[152]: 16
> /
Same rea
fl writes:
> Hi,
>
> I cannot reason out why the code:
>
> def mpl():
> return [lambda x : i * x for i in range(4)]
>
> print [m(2) for m in mpl()]
> /
>
> has result:
>
> [6, 6, 6, 6]
The "i" in your lambda definition is a variable reference which
is not dereferenced (
Am 18.11.15 um 23:46 schrieb Ulli Horlacher:
To run my Python programs on other Windows systems without a Python
installation I must create standalone Windows executables.
pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
with Python 3.5 I get:
[stack trace]
Are you u
On Wednesday, November 18, 2015 at 10:11:24 PM UTC-5, Chris Angelico wrote:
> On Thu, Nov 19, 2015 at 1:55 PM, fl wrote:
> > There are only one time 5 'here' printed out, but there is no 'here' print
> > out in thereafter call sq[2]() etc. How to understand this phenomenon?
>
> Code does what cod
On Thu, Nov 19, 2015 at 1:55 PM, fl wrote:
> There are only one time 5 'here' printed out, but there is no 'here' print
> out in thereafter call sq[2]() etc. How to understand this phenomenon?
Code does what code should.
Before you ask for comprehension of "this phenomenon", why don't you
tell u
Hi,
>From previous post, I get many helpful replies. Now I have a new question
when I run this example code:
-
sq=[]
for xx in range(5):
print 'here'
sq.append(lambda:xx**2)
here
here
here
here
here
xx
Out[150]: 4
sq[2]()
Out[151]: 16
sq[3]()
Out[152]: 16
/
There are
Found an example, needs a little updating but then it works (appears to) in
python 3.5.
http://coding4streetcred.com/blog/post/Asymmetric-Encryption-Revisited-(in-PyCrypto)
Vincent Davis
720-301-3003
On Wed, Nov 18, 2015 at 5:04 PM, Chris Angelico wrote:
> On Thu, Nov 19, 2015 at 10:56 AM, Paul
On Thu, Nov 19, 2015 at 1:08 PM, Ben Finney wrote:
>> Nope. Mutable objects are never guaranteed to retain the same values.
>> That's kinda the point.
>
> Well, they are the *same value*, if by “value” you mean “a particular
> object”.
>
> On the other hand, the value can *change* over time, while
Chris Angelico writes:
> On Thu, Nov 19, 2015 at 12:41 PM, BartC wrote:
> > On 18/11/2015 23:22, Chris Angelico wrote:
> >> On the contrary, it is certain always to be that exact object.
> >
> > But, not the same value that appears as the default?
It depends what you mean by “the same value”.
On Thu, Nov 19, 2015 at 12:41 PM, BartC wrote:
> On 18/11/2015 23:22, Chris Angelico wrote:
>> On the contrary, it is certain always to be that exact object.
>
> But, not the same value that appears as the default?
Nope. Mutable objects are never guaranteed to retain the same values.
That's kinda
On 18/11/2015 23:22, Chris Angelico wrote:
On Thu, Nov 19, 2015 at 10:14 AM, BartC wrote:
On 18/11/2015 22:11, Ian Kelly wrote:
On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
Hi,
I have tried the below function and find that it can remember the
previous
setting value to 'val'. I think the sec
MRAB writes:
> On 2015-11-19 00:34, fl wrote:
> > What does 'del' do? It does not look like a thorough list deletion
> > from the effect.
>
> No, "del list1" doesn't delete the list, it deletes the name "list1".
> The list still exists as the default parameter.
More generally, ‘del’ deletes a *r
On 2015-11-19 00:34, fl wrote:
On Wednesday, November 18, 2015 at 7:15:05 PM UTC-5, Chris Angelico wrote:
On Thu, Nov 19, 2015 at 11:02 AM, Ian Kelly wrote:
> On Wed, Nov 18, 2015 at 4:22 PM, Chris Angelico wrote:
>> On Thu, Nov 19, 2015 at 10:14 AM, BartC wrote:
>>> So, looking at some sourc
On Wed, Nov 18, 2015 at 5:34 PM, fl wrote:
> After I try with
>
> list1 = eList(12, [2])
>
> and
>
> list1 = eList(12)
>
> it gives me new surprises. Even though I delete list1, the subsequent
> list1 = eList(12)
> will remember the number of '12' of the previous sequence. This is my new
> questio
On Wed, Nov 18, 2015 at 5:05 PM, fl wrote:
> Hi,
>
> I cannot reason out why the code:
>
> def mpl():
> return [lambda x : i * x for i in range(4)]
>
> print [m(2) for m in mpl()]
> /
>
> has result:
>
> [6, 6, 6, 6]
>
>
> I have tried to simplify the above code to an easy und
On Wednesday, November 18, 2015 at 7:15:05 PM UTC-5, Chris Angelico wrote:
> On Thu, Nov 19, 2015 at 11:02 AM, Ian Kelly wrote:
> > On Wed, Nov 18, 2015 at 4:22 PM, Chris Angelico wrote:
> >> On Thu, Nov 19, 2015 at 10:14 AM, BartC wrote:
> >>> So, looking at some source code, a default value fo
Ulli Horlacher wrote:
> To run my Python programs on other Windows systems without a Python
> installation I must create standalone Windows executables.
>
> pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
> with Python 3.5 I get:
>
> [b0rked stack trace]
>
> Is there
On Thu, Nov 19, 2015 at 11:02 AM, Ian Kelly wrote:
> On Wed, Nov 18, 2015 at 4:22 PM, Chris Angelico wrote:
>> On Thu, Nov 19, 2015 at 10:14 AM, BartC wrote:
>>> So, looking at some source code, a default value for certain types is only
>>> certain to be that value for the very first call of tha
Hi,
I cannot reason out why the code:
def mpl():
return [lambda x : i * x for i in range(4)]
print [m(2) for m in mpl()]
/
has result:
[6, 6, 6, 6]
I have tried to simplify the above code to an easy understanding form,
but fails. Either the modified code does not work
On Thu, Nov 19, 2015 at 10:56 AM, Paul Rubin wrote:
> Vincent Davis writes:
>> I am looking for the "simplest" example of sending(encrypting) and
>> receiving(decrypting) using public key encryption. I am think of something
>> along the lines of having all the keys in local files and saving and
>
On Wed, Nov 18, 2015 at 4:22 PM, Chris Angelico wrote:
> On Thu, Nov 19, 2015 at 10:14 AM, BartC wrote:
>> So, looking at some source code, a default value for certain types is only
>> certain to be that value for the very first call of that function?
>
> On the contrary, it is certain always to
Vincent Davis writes:
> I am looking for the "simplest" example of sending(encrypting) and
> receiving(decrypting) using public key encryption. I am think of something
> along the lines of having all the keys in local files and saving and
> reading the message from a local file.
It's very easy to
On Thu, Nov 19, 2015 at 10:14 AM, BartC wrote:
> On 18/11/2015 22:11, Ian Kelly wrote:
>>
>> On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
>>>
>>> Hi,
>>>
>>> I have tried the below function and find that it can remember the
>>> previous
>>> setting value to 'val'. I think the second parameter has s
This might be a "Let me Google that for you question", I tried.
I am looking for the "simplest" example of sending(encrypting) and
receiving(decrypting) using public key encryption. I am think of something
along the lines of having all the keys in local files and saving and
reading the message from
On 18/11/2015 22:11, Ian Kelly wrote:
On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
Hi,
I have tried the below function and find that it can remember the previous
setting value to 'val'. I think the second parameter has something on this
effect, but I don't know the name and function of '=[]' in
To run my Python programs on other Windows systems without a Python
installation I must create standalone Windows executables.
pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
with Python 3.5 I get:
S:\python>pyinstaller.exe --onefile tk.py
Traceback (most recent call la
On Wednesday, November 18, 2015 at 5:38:45 PM UTC-5, fl wrote:
> On Wednesday, November 18, 2015 at 5:12:44 PM UTC-5, Ian wrote:
> > On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
> > > Hi,
> > >
> > > I have tried the below function and find that it can remember the previous
> > > setting value to 'v
On Wed, Nov 18, 2015 at 3:38 PM, fl wrote:
> On Wednesday, November 18, 2015 at 5:12:44 PM UTC-5, Ian wrote:
>> On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
>> > Hi,
>> >
>> > I have tried the below function and find that it can remember the previous
>> > setting value to 'val'. I think the second
Chris Angelico wrote:
> >> If you can use Python 3
> >
> > I cannot use it, because the Python compiler pyinstaller does not work
> > with it on Windows:
> >
> > S:\python>pyinstaller.exe --onefile tk.py
> > Traceback (most recent call last):
> > File "C:\Python35\Scripts\pyinstaller-script.py"
On Wednesday, November 18, 2015 at 5:12:44 PM UTC-5, Ian wrote:
> On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
> > Hi,
> >
> > I have tried the below function and find that it can remember the previous
> > setting value to 'val'. I think the second parameter has something on this
> > effect, but I d
On 2015-11-18, Ian Kelly wrote:
> On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
>> def eList(val, list0=[]):
> The list0 parameter has a default value, which is [], an initially
> empty list. The default value is evaluated when the function is
> defined, not when it is called, so the same list obj
On Wed, Nov 18, 2015 at 2:08 PM, fl wrote:
> Hi,
>
> I have tried the below function and find that it can remember the previous
> setting value to 'val'. I think the second parameter has something on this
> effect, but I don't know the name and function of '=[]' in this application.
>
> Could you
In fl
writes:
> Hi,
> I have tried the below function and find that it can remember the previous
> setting value to 'val'. I think the second parameter has something on this
> effect, but I don't know the name and function of '=[]' in this application.
> Could you explain a little to me?
> T
In a message of Thu, 19 Nov 2015 07:35:36 +1100, Chris Angelico writes:
>On Thu, Nov 19, 2015 at 7:01 AM, Anthony Papillion
> wrote:
>> I'm writing a program to help migrate mail from one host to another
>> with a few special circumstances. I'm able to get a list off of the
>> source IMAP server us
ryguy7272 writes:
> text_file = open("C:/Users/rshuell001/Desktop/excel/Text1.txt", "wb")
Remove the "b" from this line. This is causing it to omit the
platform-specific translation of "\n", which means some Windows
applications will not recognize the line endings.
--
https://mail.python.org/ma
Hi,
I have tried the below function and find that it can remember the previous
setting value to 'val'. I think the second parameter has something on this
effect, but I don't know the name and function of '=[]' in this application.
Could you explain a little to me?
Thanks,
def eList(val, list0=
On Thu, Nov 19, 2015 at 7:01 AM, Anthony Papillion
wrote:
> I'm writing a program to help migrate mail from one host to another
> with a few special circumstances. I'm able to get a list off of the
> source IMAP server using the .list() command but I'm not quite sure
> how to create a folder on th
On Thu, Nov 19, 2015 at 5:09 AM, Ulli Horlacher
wrote:
> Chris Angelico wrote:
>
>> > As I am Python newbie I have not quite understood the Python character
>> > encoding scheme :-}
>> >
>> > Where can I find a good introduction of this topic?
>>
>> Here are a couple of articles on the basics of
On Thu, Nov 19, 2015 at 6:30 AM, Laura Creighton wrote:
> apt-cache search works reasonably well, as long as you are
> willing to put up with some false hits. And it assumes you have a debian
> system handy, of course.
I suspect the most common case is "how can I get this on _this exact
system_
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
I'm writing a program to help migrate mail from one host to another
with a few special circumstances. I'm able to get a list off of the
source IMAP server using the .list() command but I'm not quite sure
how to create a folder on the target machine.
In a message of Wed, 18 Nov 2015 17:44:51 +1100, Chris Angelico writes:
>I don't know how the program would detect it, but I'd be thinking "the
>one where 'sudo apt-get install PACKAGENAME' gets the same code that
>'pip install THING' gets". In a lot of cases, PACKAGENAME will simply
>be python-TH
On Wed, Nov 18, 2015 at 3:14 AM, Christian Gollwitzer wrote:
> The standard terminal on Windows is very ugly, can't resize the width, and
> pasting works only if you right-click -> paste.
The console UI is improved in Windows 10:
http://blogs.windows.com/buildingapps/2014/10/07/console-improvemen
Chris Angelico wrote:
> > As I am Python newbie I have not quite understood the Python character
> > encoding scheme :-}
> >
> > Where can I find a good introduction of this topic?
>
> Here are a couple of articles on the basics of Unicode:
>
> http://www.joelonsoftware.com/articles/Unicode.htm
On Wed, 18 Nov 2015 09:40:58 -0800, ryguy7272 wrote:
>
> It doesn't seem like the '\n' is doing anything useful. All the text is
> jumbled together. When I open the file in Excel, or Notepad++, it is
> easy to read. However, when I open it in as a regular text file,
> everything is jumbled toge
On Wed, Nov 18, 2015 at 8:45 AM, Christian Ullrich wrote:
> Apparently %L is always the long file name, and %1 is the short name unless
> the shell can prove that the executable can handle long names.
Specifically old Win16 programs (identified by the file header) aren't
aware of long filenames.
On 11/18/2015 11:50 AM, Ulli Horlacher wrote:
Ulli Horlacher wrote:
from Tkinter import Tk
from tkFileDialog import askopenfilename
Tk().withdraw()
file = askopenfilename()
I found another glitch:
After termination of askopenfilename() the window focus i
On Wednesday, November 18, 2015 at 12:41:19 PM UTC-5, ryguy7272 wrote:
> On Wednesday, November 18, 2015 at 12:21:47 PM UTC-5, Denis McMahon wrote:
> > On Wed, 18 Nov 2015 08:37:47 -0800, ryguy7272 wrote:
> >
> > > I'm trying the script below...
> >
> > The problem isn't that you're over-writing
On Wednesday, November 18, 2015 at 12:21:47 PM UTC-5, Denis McMahon wrote:
> On Wed, 18 Nov 2015 08:37:47 -0800, ryguy7272 wrote:
>
> > I'm trying the script below...
>
> The problem isn't that you're over-writing the lines (although it may
> seem that way to you), the problem is that you're ove
Am 18.11.15 um 17:45 schrieb Ulli Horlacher:
This is my encoding function:
def url_encode(s):
u = ''
for c in list(s):
if match(r'[_=:,;<>()+.\w\-]',c):
u += c
else:
u += '%' + c.encode("hex").upper()
return u
The quoting is applied to a UTF8 string. But I th
On Wed, 18 Nov 2015 08:37:47 -0800, ryguy7272 wrote:
> I'm trying the script below...
The problem isn't that you're over-writing the lines (although it may
seem that way to you), the problem is that you're overwriting the whole
file every time you write a link to it. This is because you open an
On Wednesday, November 18, 2015 at 12:04:16 PM UTC-5, ryguy7272 wrote:
> On Wednesday, November 18, 2015 at 11:58:17 AM UTC-5, Chris Angelico wrote:
> > On Thu, Nov 19, 2015 at 3:37 AM, ryguy7272 <> wrote:
> > > text_file = open("C:/Users/rshuell001/Desktop/excel/Text1.txt",
> > > "wb")
> >
On Wednesday, November 18, 2015 at 11:58:17 AM UTC-5, Chris Angelico wrote:
> On Thu, Nov 19, 2015 at 3:37 AM, ryguy7272 wrote:
> > text_file = open("C:/Users/rshuell001/Desktop/excel/Text1.txt", "wb")
> > z = str(link)
> > text_file.write(z + "\n")
> > text_file.writ
On Thu, Nov 19, 2015 at 3:37 AM, ryguy7272 wrote:
> text_file = open("C:/Users/rshuell001/Desktop/excel/Text1.txt", "wb")
> z = str(link)
> text_file.write(z + "\n")
> text_file.write("\n")
> text_file.close()
You're opening the file every time you go through
Ulli Horlacher wrote:
> from Tkinter import Tk
> from tkFileDialog import askopenfilename
>
> Tk().withdraw()
> file = askopenfilename()
I found another glitch:
After termination of askopenfilename() the window focus is not returned to
the calling window (xterm
On Thu, Nov 19, 2015 at 3:45 AM, Ulli Horlacher
wrote:
> As I am Python newbie I have not quite understood the Python character
> encoding scheme :-}
>
> Where can I find a good introduction of this topic?
Here are a couple of articles on the basics of Unicode:
http://www.joelonsoftware.com/arti
I have written a program (Python 2.7) which reads a filename via
tkFileDialog.askopenfilename() (was a good hint here, other thread).
This filename may contain non-ASCII characters (German Umlauts).
In this case my program crashes with:
File "S:\python\fexit.py", line 1177, in url_encode
I'm trying the script below, and it simple writes the last line to a text file.
I want to add a '\n' after each line is written, so I don't overwrite all the
lines.
from bs4 import BeautifulSoup
import urllib2
var_file = urllib2.urlopen("http://www.imdb.com/chart/top";)
var_html = var_file.
So I am currently making a little program that generates a list of characters
with different stats. Now I would like to display those characters in a list
and when the user clicks on one of them display all the stats for that
character.
Here is my code for my GUI so far:
class CTABLE:
def
* Terry Reedy wrote:
On 11/18/2015 3:12 AM, Glenn Linderman wrote:
d:\>ftype Python.File
Python.File="C:\Windows\py.exe" "%L" %*
Verified on my Win 10
I'm surprised by the "%L" where usually programs have "%1". Is this a
new Windows feature I don't know about yet, or is it a bug in the
in
Ulli Horlacher writes:
> Steven D'Aprano wrote:
>
>> >> The limitation is that this will not work if any of the file names
>> >> contain astral (non-BMP) chars because tk cannot handle such
>> >> characters.
>> >
>> > What are "astral chars"?
>>
>> Unicode characters beyond U+.
>
> I see, for
On Thu, Nov 19, 2015 at 12:51 AM, Ulli Horlacher
wrote:
> Steven D'Aprano wrote:
>
>> >> The limitation is that this will not work if any of the file names
>> >> contain astral (non-BMP) chars because tk cannot handle such characters.
>> >
>> > What are "astral chars"?
>>
>> Unicode characters be
Chris Angelico wrote:
> > In my application the user MUST select files and directories (in one go).
>
> It's extremely uncommon to be able to select a combination of files
> and directories.
I have an uncommon application :-)
Filetransfer of ANY size: http://fex.rus.uni-stuttgart.de:8080/
>
Steven D'Aprano wrote:
> >> The limitation is that this will not work if any of the file names
> >> contain astral (non-BMP) chars because tk cannot handle such characters.
> >
> > What are "astral chars"?
>
> Unicode characters beyond U+.
I see, for very exotic character sets, like Klingo
On Thu, Nov 19, 2015 at 12:30 AM, Steven D'Aprano wrote:
> On Wed, 18 Nov 2015 11:40 pm, Chris Angelico wrote:
>> All the questions of performance should be
>> secondary to code clarity, though;
>
> "All"? Surely not.
The OP's example was checking if a string was equal to either of two
strings. E
On Thu, 19 Nov 2015 12:06 am, Ulli Horlacher wrote:
> Terry Reedy wrote:
>
>> > from Tkinter import Tk
>> > from tkFileDialog import askopenfilename
>> >
>> > Tk().withdraw()
>> > file = askopenfilename()
>>
>> To get multiple names, add 's'.
>
> I have found it already
On 2015-11-18, Steven D'Aprano wrote:
> On Wed, 18 Nov 2015 11:40 pm, Chris Angelico wrote:
>> so I would say the choices are: Set
>> literal if available, else tuple. Forget the performance.
>
> It seems rather strange to argue that we should ignore performance when the
> whole reason for using
On Wed, 18 Nov 2015 11:40 pm, Chris Angelico wrote:
> On Wed, Nov 18, 2015 at 10:37 PM, Steven D'Aprano
> wrote:
>> How about Python 3? Python 3 has the advantage of using set literals.
>
> 2.7 has set literals too.
Ah, so it does. I forgot about that. Most of my code has to run on multiple
ve
On Thu, Nov 19, 2015 at 12:06 AM, Ulli Horlacher
wrote:
>> The limitation is that this will not work if any of the file names
>> contain astral (non-BMP) chars because tk cannot handle such characters.
>
> What are "astral chars"?
Characters not on the Basic Multilingual Plane (BMP). The Unicode
Terry Reedy wrote:
> > from Tkinter import Tk
> > from tkFileDialog import askopenfilename
> >
> > Tk().withdraw()
> > file = askopenfilename()
>
> To get multiple names, add 's'.
I have found it already, thanks.
> The limitation is that this will not work if any of t
The EuroPython 2016 Team is pleased to account the dates for
EuroPython 2016 in Bilbao, Basque Country, Spain:
Sunday, July 17 - Sunday, July 24 2016
Pre-launch Website
--
To keep you updated, we have put together a pre-launch website for the
conference:
On 18 November 2015 at 07:50, Daniel Haude wrote:
>
> I'm trying to implement some (but not all) methods of a Python class in C.
> What I've found on the Net is:
> - how to implement entire modules in C so that I can import that module and
>use the C functions (successfully done it, too).
>
On Wed, Nov 18, 2015 at 10:37 PM, Steven D'Aprano wrote:
> How about Python 3? Python 3 has the advantage of using set literals.
2.7 has set literals too. All the questions of performance should be
secondary to code clarity, though; so I would say the choices are: Set
literal if available, else t
On 11/18/2015 6:01 AM, Ulli Horlacher wrote:
Ulli Horlacher wrote:
it is too complicated to rewrite my application from CLI to GUI.
But... is there a windows program with which one can select files and the
result is written to STDOUT?
Found it:
from Tkinter import Tk
from tk
On Wed, 18 Nov 2015 01:27 am, Nicolas Évrard wrote:
> Hello,
>
> I saw the following retweet by Raymond Hettinger in this morning:
>
> https://twitter.com/sanityinc/status/666485814214287360
>
> Programming tip: many of those arrays and hashes in your code
> should actually be sets.
Am 18.11.15 um 12:01 schrieb Ulli Horlacher:
Ulli Horlacher wrote:
it is too complicated to rewrite my application from CLI to GUI.
But... is there a windows program with which one can select files and the
result is written to STDOUT?
Found it:
from Tkinter import Tk
from tk
Ulli Horlacher wrote:
> it is too complicated to rewrite my application from CLI to GUI.
> But... is there a windows program with which one can select files and the
> result is written to STDOUT?
Found it:
from Tkinter import Tk
from tkFileDialog import askopenfilename
On 11/18/2015 3:12 AM, Glenn Linderman wrote:
Setting up a new machine with Windows 10, I installed Python 3.5.0 and
the Launcher. Invoking python files from batch files as
foo.py -a -bunch -of -parameters
Didn't seem to do _anything_ so I checked:
d:\>assoc .py
.py=Python.File
d:\>ftype Pyth
Christian Gollwitzer wrote:
> > How can I implement such a get_paste() function?
> > I need a non-blocking getkey() function.
> > It must work on Windows and Linux.
>
> Non-blocking I/O from the commandline is OS specific. There are
> different solutions, and it's usually hacky (stty on Linux,
Hi,
On Wednesday, November 18, 2015 at 10:00:43 AM UTC+1, Nagy László Zsolt wrote:
> > Perhaps there is a size threshold? You could experiment with different
> > block
> > sizes in the following f.read() replacement:
> >
> > def read_chunked(f, size=2**20):
> > read = functools.partial(f.rea
On 11/17/2015 3:51 PM, fl wrote:
n_iter = 50
sz = (n_iter,) # size of array
x = -0.37727
z = np.random.normal(x,0.1,size=sz)
Q = 1e-5 # process variance
# allocate space for arrays
xhat=np.zeros(sz)
P=np.zeros(sz)
I learn Python now and the above code seems from an experienced author.
The cu
On 11/18/2015 2:50 AM, Daniel Haude wrote:
Hello,
I'm trying to implement some (but not all) methods of a Python class in C.
What I've found on the Net is:
- how to implement entire modules in C so that I can import that module and
use the C functions (successfully done it, too).
- how t
Am 18.11.15 um 09:39 schrieb Ulli Horlacher:
In my program (for python 2.7) the user must enter file names with
mouse copy+paste. I use:
while True:
file = raw_input(prompt)
if file == '': break
files.append(file)
How can I implement such a get_paste() function?
I need a non-blocking g
> Perhaps there is a size threshold? You could experiment with different block
> sizes in the following f.read() replacement:
>
> def read_chunked(f, size=2**20):
> read = functools.partial(f.read, size)
> return "".join(iter(read, ""))
>
Under win32 platform, my experience is that the fa
In my program (for python 2.7) the user must enter file names with
mouse copy+paste. I use:
while True:
file = raw_input(prompt)
if file == '': break
files.append(file)
The problem now is: my users do not hit ENTER after pasting.
The file names are pasted together in one single line w
Setting up a new machine with Windows 10, I installed Python 3.5.0 and
the Launcher. Invoking python files from batch files as
foo.py -a -bunch -of -parameters
Didn't seem to do _anything_ so I checked:
d:\>assoc .py
.py=Python.File
d:\>ftype Python.File
Python.File="C:\Windows\py.exe" "%L" %
fl wrote:
>Hi,
>I find the following code snippet, which is useful in my project:
> ...
>correctly. Could you see something useful with variable 'sz'?
So that's example code in "An Introduction to the Kalman Filter" by Greg
Welch and Gary Bishop, and no, that construct was unnecessary. As you've
87 matches
Mail list logo