Re: beginners choice: wx or tk?

2015-07-12 Thread Christian Gollwitzer
his better. And jmf's complaints are otherwise invalid. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: linux os.rename() not an actual rename?

2015-07-20 Thread Christian Heimes
On 2015-07-20 20:50, Marko Rauhamaa wrote: > "Jason H" : > >> I have a server process that looks (watches via inotify) for files to >> be moved (renamed) into a particular directory from elsewhere on the >> same filesystem. We do this because it is an atomic operation, and our >> server process ca

Re: Can I copy/paste Python code?

2015-07-21 Thread Christian Gollwitzer
g font and copies the string without any word breaks. Laura's method works, because pdftotext can simulate the PDF appearance using spaces in the output. Maybe an OCR program with good layout could also be used. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Can I copy/paste Python code?

2015-07-22 Thread Christian Gollwitzer
;, which allows the text to reflow. This was invented by Adobe exactly for that purpose, to display text for disabled people etc. That's _exactly_ what HTML was supposed to be. Not a bad choice either. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python speed

2015-08-07 Thread Christian Gollwitzer
hard to believe. I could accept that PyPy can match the speed of Fortran in these cases, but exceeding seems highly unlikely. Was it a mistake, or do you have a reference that shows how PyPy can be faster than Fortran? I agree with the rest what you have said. Christian -- https

Re: Sometimes bottle takes a lot of time

2015-08-22 Thread Christian Gollwitzer
Note that this says nothing about the location of the bug, in can still be either in the OPs code or in the framework. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Sandboxing Python

2015-08-22 Thread Christian Gollwitzer
thon? On the C side, the interpreter is a structure and does not use global variables (as opposed to CPython), therefore it is easy to create more than one interpreter in a single program, and also to reflect that to the scripting level. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Linux users: please run gui tests

2015-08-27 Thread Christian Gollwitzer
cnf)) Can you inject this into both versions of the code? There is something about fonts. It could also have something to do with Xft, a compile-time option of Tk, to use fontconfig (vague guess). Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Linux users: please run gui tests

2015-08-28 Thread Christian Gollwitzer
Am 28.08.15 um 08:46 schrieb Terry Reedy: On 8/28/2015 1:56 AM, Christian Gollwitzer wrote: Am 27.08.15 um 20:32 schrieb Terry Reedy: On 8/27/2015 4:56 AM, Petr Viktorin wrote: 1321, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: expected

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Christian Gollwitzer
libraries. You can copy that to a different machine, and often it works - unless libc or some very basic library is different. Beware that this pulls in half of your system, so you'll end up with ~100 MB. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying pmw with python3: Lots of crashes!

2015-09-06 Thread Christian Gollwitzer
e are Python bindings around. Scrolling in Tk is generally done by grouping together scrollbars and widgets in a frame and connecting the scrollbars scrollcommands with xview/yview. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python handles globals badly.

2015-09-09 Thread Christian Gollwitzer
lack of reading comprehension and smugness. This sentence is a very arrogant one, yes, but it is quoted from the article. Overall I have the feeling that the point he wants to make is a very subtle one. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: textfile: copy between 2 keywords

2015-09-10 Thread Christian Gollwitzer
; kw.txt > kw_copy.txt would write it out to kw_copy.txt Beware that between the two slashes there are regexps, so if you have metacharacters in your keywords, you need to quote them. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Packaging and deployment of standalone Python applications?

2015-09-14 Thread Christian Gollwitzer
about to do is completely off anyone would do it in a Python environment. ;) Look at pyinstaller. It creates monsters (i.e. really huge single file or single directory builds), but it works for my projects. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Packaging and deployment of standalone Python applications?

2015-09-17 Thread Christian Gollwitzer
on one distro and "libpillow" on another etc. A well maintained portable distribution for all major platforms could substantially ease that out. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: .bat file trouble.

2015-09-18 Thread Christian Gollwitzer
e right there in the same directory. Concerning that, windows usually runs a .bat file in the directory where it is situated, so putting the python fies there /should/ work, but you can also set this using the right-click menu (execute in...), if you make a link to the desktop.

Re: Postscript to pdf

2015-09-21 Thread Christian Gollwitzer
uld create a PDF with the papersize derived from an EPS image. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: A photo/image/video sharing app in Python

2015-09-21 Thread Christian Gollwitzer
'll be a star on SIGGRAPH (a conference about image processing). Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: A little test for you Guys😜

2015-09-22 Thread Christian Gollwitzer
k,v in p.items()} {'bar1': 'foo1', 'truc': 'chose', 'bar2': 'foo2'} list/dict comprehension is actually one of the features in Python that I like most, because it can greatly ease such transformations. and, as others said, these questio

Re: Postscript to pdf

2015-09-22 Thread Christian Gollwitzer
and "fn" to the file name path. Yet another option would be to use a Python package like Reportlab to create the PDFs, which requires you to reimplement the drawing code. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: PyInstaller+ Python3.5 (h5py import error)

2015-09-23 Thread Christian Gollwitzer
to import numpy as np import h5py a=np.arange(10) print(a) This is another hint: obviously h5py defers module loading until you first really open a HDF5 file. There pyinstaller has no means to find this out. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.5.0 Feedback

2015-10-18 Thread Christian Gollwitzer
n gefundenen Links Dinge wie '= (etc)' an. * Globale Funktionen wie 'open' sind nicht mehr an der ersten Stelle bei der Suche (welches Sie zwischendurch mal waren, glaube ich). === Bugs === * Python 3.5 verträgt a=input('\n') nicht. What does it mean, it doesn

Re: Problem in implementing Romania Map using Paython Script

2015-11-01 Thread Christian Gollwitzer
. If not, look for a library that does routing or make an API call to graphhopper, Google maps or similar. Routing (esp. fast routing) is a non-trivial problem. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Regular expressions

2015-11-03 Thread Christian Gollwitzer
ight still encounter them in a text editor or database engine. Even some web forms allow some limited form, like e.g. the DVD rental here or Google. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: What does “grep” stand for?

2015-11-04 Thread Christian Gollwitzer
ped EDLIN as the only editor... In contrast to ed, the stream editor "sed" is used multiple times avery day in a typical Unix session inside shell scripts to perform automated text processing tasks, including regex replacement. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: What does “grep” stand for?

2015-11-04 Thread Christian Gollwitzer
Am 05.11.15 um 01:42 schrieb Chris Angelico: On Thu, Nov 5, 2015 at 6:38 AM, Christian Gollwitzer wrote: As someone who grew up on MS-DOS, I'd like to mention that EDLIN's value wasn't in the obvious places. There were two features it had that most other editors didn't: fi

Re: Regular expressions

2015-11-05 Thread Christian Gollwitzer
to write it down. Admittedly, this problem is constructed, but solving similar tasks by regexes is still something that I need to do on a daily basis, when I get data from other scientists in odd formats and I need to preprocess them. I know people who use a spreadsheet and copy/paste millio

Re: Snake Error 🐍

2015-11-05 Thread Christian Gollwitzer
owver, it should not crash, rather paste a U+FFFD character. X-Post to comp.lang.tcl. Can you check the Tk version you use? Try: import tkinter tkinter.Tk().eval("info patchlevel") Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about math.pi is mutable

2015-11-06 Thread Christian Gollwitzer
Am 06.11.15 um 20:40 schrieb Chris Angelico: On Sat, Nov 7, 2015 at 6:30 AM, Bartc wrote: Is there no way then in Python to declare: pi = 3.141519 # etc and make it impossible to override? Nope. Even in C++, where classes can define certain things as const, private, and other such r

Re: Regular expressions

2015-11-06 Thread Christian Gollwitzer
string functions, then either you do not have problems where you need regexps/other formal parsing tools, or you are very masochistic. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Scipy odeint (LSODA) gives inaccurate results; same code fine in MATLAB ode15s/ode23s

2015-11-06 Thread Christian Gollwitzer
make sense to set some of the coefficients to zero and if you still get the same difference, can you simplify the program to expose the problem? How do you know that the Matlab code produces the correct answer? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about math.pi is mutable

2015-11-08 Thread Christian Gollwitzer
ecause on OSX, const can be stored in write-only memory. apfelkiste:Tests chris$ g++ --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_6

Re: using binary in python

2015-11-11 Thread Christian Gollwitzer
nto a specific binary format. That would allow to create a reader or writer for a given binary format in Python. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Christian Gollwitzer
le to interrupt the program between bytecodes? I'm thinking the only portable way is to run a watchdog process with subprocess or multiprocessing. What about a thread which calls exit() after the timeout? Does that forcefully kill the whole process? Christian -- https://mail.

Re: Swig + Numpy.i with a const int16_t pointer

2015-11-12 Thread Christian Gollwitzer
bit unsigned integers for input. The closest object in Python is a numpy array. There is a numpy.i available for Python, I'm not sure if it handles this case correctly. If you are unlucky, you need to write your own typemap. Christian -- https://mail.python.org/mailman/listinfo/p

Re: Swig + Numpy.i with a const int16_t pointer

2015-11-12 Thread Christian Gollwitzer
Am 12.11.15 um 09:46 schrieb Christian Gollwitzer: Am 11.11.15 um 02:09 schrieb shripha...@gmail.com: I am trying to wrap the following function with SWIG so I can call it from Python. The signature is: ``` int WebRtcVad_Process(VadInst* handle, int fs, const int16_t* audio_frame, size_t

Re: Swig + Numpy.i with a const int16_t pointer

2015-11-12 Thread Christian Gollwitzer
Am 12.11.15 um 10:16 schrieb Christian Gollwitzer: Am 12.11.15 um 09:46 schrieb Christian Gollwitzer: Am 11.11.15 um 02:09 schrieb shripha...@gmail.com: I am trying to wrap the following function with SWIG so I can call it from Python. The signature is: ``` int WebRtcVad_Process(VadInst

Re: More tkinter Madness

2015-11-12 Thread Christian Gollwitzer
; can you try reinstalling all related packages? Christian -- https://mail.python.org/mailman/listinfo/python-list

Running latest 32-bit Python on 64-bit system

2015-11-13 Thread Christian Ullrich
, and I don't necessarily know that in advance. I can code around that, of course, but I don't want to. If Python can select the 64-bit version to run by itself, it should also be able to for the 32-bit version, right? Thanks, -- Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: More tkinter Madness

2015-11-13 Thread Christian Gollwitzer
Am 13.11.15 um 20:14 schrieb Tim Daneliuk: On 11/13/2015 12:32 AM, Christian Gollwitzer wrote: Apfelkiste:Sources chris$ Well, I get window and when I do this: pack [button .b -text Hello -command exit] Nothing appears. No error, nothing? Just to be sure, you haven't closed the

Re: More tkinter Madness

2015-11-14 Thread Christian Gollwitzer
Am 13.11.15 um 23:10 schrieb Tim Daneliuk: On 11/13/2015 03:30 PM, Christian Gollwitzer wrote: Am 13.11.15 um 20:14 schrieb Tim Daneliuk: On 11/13/2015 12:32 AM, Christian Gollwitzer wrote: Apfelkiste:Sources chris$ Well, I get window and when I do this: pack [button .b -text Hello

Re: What is the right way to import a package?

2015-11-14 Thread Christian Gollwitzer
line. Maybe Canopy is doing a from pylab import * for you? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Jython standalone

2015-11-15 Thread Christian Gollwitzer
writing. You will not be able to double click and run this jar; it is a library, not an application. Try the installer instead. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Running latest 32-bit Python on 64-bit system

2015-11-16 Thread Christian Ullrich
* Zachary Ware wrote: On Fri, Nov 13, 2015 at 4:52 AM, Christian Ullrich wrote: However, with the shebang syntax supported by the launcher, I can only demand a 32-bit version if I also specify the Python minor version I want, and I don't necessarily know that in advance. I can code a

Re: non-blocking getkey?

2015-11-18 Thread Christian Gollwitzer
e the width, and pasting works only if you right-click -> paste. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: non-blocking getkey?

2015-11-18 Thread Christian Gollwitzer
a module simpledialog Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Launcher, and ftype Python.File

2015-11-18 Thread Christian Ullrich
hing for "%L" very well. https://www.google.com/search?q=ftype+%22%25L%22#q=ftype+%22%25L%22+-mks -- Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: handling of non-ASCII filenames?

2015-11-18 Thread Christian Gollwitzer
The quoting is applied to a UTF8 string. But I think you shouldn't do it yourself, use a library function: import urllib urllib.quote(yourstring.encode('utf8')) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller and Python 3.5 on Windows?

2015-11-18 Thread Christian Gollwitzer
using the newest version? According to http://www.pyinstaller.org/ they claim support for Python3. Does a hello world script work? If yes, it may have to do with some packages in your script. Is pywin32 a package that you load, or is it Pyinstaller that needs this? Christian -- https

Re: handling of non-ASCII filenames?

2015-11-19 Thread Christian Gollwitzer
Am 19.11.15 um 08:54 schrieb Ulli Horlacher: Christian Gollwitzer wrote: 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

Re: OT: This Swift thing

2014-06-07 Thread Christian Gollwitzer
er to call a factory function instead. I love C++. (seriously, but not /that/ part) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?

2014-06-19 Thread Christian Gollwitzer
unctions and run it in IPython (Example: SciPy) 3) Use a real GUI framework It turns out, that 3) is actually not only easier to use, but often easier to write than 1) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?

2014-06-19 Thread Christian Gollwitzer
Am 19.06.14 09:42, schrieb Chris Angelico: On Thu, Jun 19, 2014 at 5:18 PM, Christian Gollwitzer wrote: Am 19.06.14 01:38, schrieb Chris Angelico: a good console UI just requires this: something = raw_input("Enter something: ") print("Result: "+result) That is actua

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Christian Gollwitzer
re OO system, ...) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Christian Gollwitzer
Am 25.06.14 21:26, schrieb Peter Tomcsanyi: "Christian Gollwitzer" wrote in message news:lodruv$k45$1...@dont-email.me... may I ask which features of 8.6 you need in particular? I need two of them: - Angled text - PNG image support with alpha channel (even if it seems a b

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-26 Thread Christian Gollwitzer
Am 26.06.14 12:39, schrieb Peter Tomcsanyi: "Christian Gollwitzer" wrote in message news:lofciv$nq6$1...@dont-email.me... For PNG image support you can load either the Img package which gives support for a large variety of images, or the smaller tkpng package. My first Google

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-26 Thread Christian Gollwitzer
Am 26.06.14 14:37, schrieb Christian Gollwitzer: Am 26.06.14 12:39, schrieb Peter Tomcsanyi: "Christian Gollwitzer" wrote in message news:lofciv$nq6$1...@dont-email.me... For PNG image support you can load either the Img package which gives support for a large variety of imag

Re: patch request for os.urandom()

2014-07-17 Thread Christian Heimes
On 17.07.2014 20:34, Paul Rubin wrote: > Could os.urandom() be patched to use the new Linux getrandom() system > call on systems where it is available? Further info: > > http://lists.openwall.net/linux-kernel/2014/07/17/235 > > I've stopped posting to the Python bug tracker because the password

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Christian Gollwitzer
ore: All those box drawing symbols are in the BMP: http://www.unicode.org/charts/PDF/U2500.pdf So you could use a Tkinter text widget and put your data there - or even a simple label would do. Christian -- https://mail.python.org/mailman/listinfo/python-list

Making every no-arg method a property?

2014-08-05 Thread Christian Calderon
I have been using python for 4 years now, and I just started learning ruby. I like that in ruby I don't have to type parenthesis at the end of each function call if I don't need to provide extra arguments. I just realized right now that I can do something similar in python, if I make all methods wi

Re: how to write file into my android phone?

2014-08-10 Thread Christian Gollwitzer
omputer and the phone. It is still possible to activate the mass storage driver in current Android using custom firmware. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Idle crashes when using accentuated letters in Mac OS X

2014-08-10 Thread Christian Gollwitzer
ActiveTcl. I remember such a bug in the OSX version, which was fixed a long time ago. There is a number of bugs in the OSX Tk, a lot of them was recently fixed, so stay tuned and maybe update when 8.6.2 becomes available. Christian -- https://mail.python.org/mailman/listinfo/python

Re: Begginer in python trying to load a .dll

2014-08-12 Thread Christian Gollwitzer
ctype, but it doesn't work. I'm begginer in python. All the comments are useful to me. For sure this DLL will come with a header file for C. You could pass it through SWIG and see if it generates a useful Python module. You need a C compiler for that route, though. Chris

Re: PyMatch Tool.

2014-08-15 Thread Christian Gollwitzer
ttp://laurent.riesterer.free.fr/regexp/ Since RegExp-Syntax is very similar across tools, yours is almost identical to grep. Is it not? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: PyMatch Tool.

2014-08-18 Thread Christian Gollwitzer
Am 18.08.14 14:21, schrieb Rafael Francischini: Em sexta-feira, 15 de agosto de 2014 17h59min28s UTC-3, Christian Gollwitzer escreveu: I expected something like visual regexp: http://laurent.riesterer.free.fr/regexp/ Since RegExp-Syntax is very similar across tools, yours is almost

Re: Matplotlib Contour Plots

2014-08-18 Thread Christian Gollwitzer
, as in a topographic map. You don't seem to have a two-dimensional dataset at first place; maybe you already have *contour data*, and you just want to plot(x,y) ? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python vs C++

2014-08-22 Thread Christian Gollwitzer
comparing to python) is performance. But I'm convinced that, in general, the right approach is "python-profiling-(extension/numpy/Cython/...)". Well, that's Ousterhouts dichotomy. Christian Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python vs C++

2014-08-22 Thread Christian Gollwitzer
could still run with native speed. For sure it is much easier to do a compiler in Python, but this will come with a speed penalty (of the compilation, not the code, as evidenced by PyPy). Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Global indent

2014-08-23 Thread Christian Gollwitzer
vim, and that has triggered the request from them to learn a bit of (g)vim. But when they asked me, which editor they should use, I pointed them to kate. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Global indent

2014-08-23 Thread Christian Gollwitzer
Hi Steven, I agree with all you said. Am 23.08.14 16:56, schrieb Steven D'Aprano: Christian Gollwitzer wrote: There are ways to put these editors into Beginner's mode, for vim there is "evim", and for sure emacs has something similar, where the editor behaves more like

Re: Global indent

2014-08-23 Thread Christian Gollwitzer
Am 23.08.14 16:19, schrieb Joshua Landau: (Since this is already an editor war...) On 23 August 2014 10:41, Christian Gollwitzer wrote: Sometimes I impress my colleagues with what they call "magic", i.e. creating special repeated lists of numbers by a few keystrokes in gvim, an

Re: What is acceptable as 'open-source'? [was Python vs C++]

2014-08-27 Thread Christian Gollwitzer
s via github - For large projects, git is much faster than fossil to update the repo. The good news: you can migrate from fossil to git; e.g. the tcl/tk repos are mirrored to github. For fossil, there is also public storage space e.g. on chiselapp.com as an alternative Christian [

PySide 1.2.2 and Python 3.4.1 - "native Qt signal is not callable"

2014-08-30 Thread Juan Christian
Hello everyone, I have a question regarding PySide 1.2.2 and Python 3.4.1 I have this code that I made following a Python tutorial , mine is a bit different because the tutorial is a bit old, and I'm trying to use Python n

Re: PySide 1.2.2 and Python 3.4.1 - "native Qt signal is not callable"

2014-08-30 Thread Juan Christian
Yes, indeed, my code was a mess! I did a clear code here (http://pastebin.com/XsVLSVky) that's fully working, thanks! 2014-08-30 16:05 GMT-03:00 MRAB : > On 2014-08-30 14:35, Juan Christian wrote: > >> Hello everyone, I have a question regarding PySide 1.2.2 and Python 3.4.1

Error reading from 'urllib.request' and iterating over lines

2014-08-30 Thread Juan Christian
My code: http://pastebin.com/CBgVvT4n Line 25 returns the text correctly [1], but it seems not being parsed to line 27-28 correctly. This is just a training program that I'm doing following some books/tutorials/docs, nothing special. [1] Output from line 25: http://pastebin.com/HSbAtDHQ Python 3

Re: Python is going to be hard

2014-09-03 Thread Juan Christian
I'm learning Python using this mailist, and the Tutor mailist, reading the docs and watching this course, Python Fundamentals ( http://www.pluralsight.com/training/Courses/TableOfContents/python-fundamentals ). Python is really easy and useful, OP don't blame the language because you didn't unders

Re: My backwards logic

2014-09-05 Thread Juan Christian
I made this code just for fun and learning, it's working, but would this be a good approach? Thanks. import sys def prime_checker(start = 1, stop = 1): for number in range(start, stop + 1): divisors = [(number % x) for x in range(1, number + 1)] print("{n} prime? {r}".format(n = number, r = (div

Re: My backwards logic

2014-09-05 Thread Juan Christian
What's [snip] ?? On Fri, Sep 5, 2014 at 3:48 PM, MRAB wrote: > On 2014-09-05 18:35, Juan Christian wrote: > >> I made this code just for fun and learning, it's working, but would this >> be a good approach? Thanks. >> >> import sys >> >>

Re: My backwards logic

2014-09-05 Thread Juan Christian
@Mark Lawrence: Sorry to ask, but what do you mean by "don't top post here, thanks.", I'm not familiar with mailing lists, so I may be doing something wrong and I don't know. On Fri, Sep 5, 2014 at 4:54 PM, Mark Lawrence wrote: > On 05/09/2014 20:34, Juan Christ

Re: Posting style: interleaved responses (was: My backwards logic)

2014-09-05 Thread Juan Christian
On Fri, Sep 5, 2014 at 11:37 PM, Ben Finney wrote: > Juan Christian writes: > > > @Mark Lawrence: Sorry to ask, but what do you mean by "don't top post > > here, thanks.", I'm not familiar with mailing lists, so I may be doing > > something wrong and

Re: pycrypto 3.4 binaries for windows x86

2014-09-09 Thread Christian Heimes
e with MSI, EXE and wheels for Python 2.6 to 3.4 from my dropbox: https://www.dropbox.com/s/n6rckn0k6u4nqke/pycrypto-2.6.1.zip?dl=0 Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: very lightweight gui for win32 + python 3.4

2014-09-14 Thread Christian Gollwitzer
, BTW - "starpack" technology is the Tcl way to make a single-file executable containing Tcl, Tk, scripts and any number of libraries. Unfortunately, no python interpreter can be included so far. By bridging Tcl_FileSystem with Python's VFS, this restriction could be overcome.

Re: Lists

2014-09-14 Thread Christian Gollwitzer
nge() does not return a list of numbers, but rather a generator - that is an object which produces the values one after another. But you can transform it into a list: print(list(nums)) should give you what you want. Christian -- https://mail.python.org/mailman/listinfo/python-list

Best approach to get data from web page continuously

2014-09-18 Thread Juan Christian
I'll write a python (Python 3.4.1) script to fetch for new data (topics) from this page (http://steamcommunity.com/app/440/tradingforum) continuously. All the topics follow this structure: http://steamcommunity.com/app/440/tradingforum/TOPIC_ID/";> It will work like that: I'll get the last topic

Re: hashlib suddenly broken

2014-09-18 Thread Christian Heimes
On 18.09.2014 21:23, Larry Martell wrote: > On Thu, Sep 18, 2014 at 11:18 AM, Chris Angelico wrote: >> On Fri, Sep 19, 2014 at 3:07 AM, Steven D'Aprano >> wrote: >>> but I expect that's probably not where the problem lies. My *wild guess* is >>> that your system updated SSL, and removed some unde

Re: hashlib suddenly broken

2014-09-18 Thread Christian Heimes
d by the _hashlib.so shared library. On OSX otool -L should give a similar output as ldd on Linux: $ otool -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so Christian -- https://mail.python.org/mailman/listinfo/python-list

Class Inheritance from different module

2014-09-20 Thread Juan Christian
I have the following structure: Third-party API installed via pip: steamapi / app.py consts.py core.py users.py [...] My script: test.py In the API, the module users.py has a class 'SteamUser' and I want to mimic it's usage on my code, like this: import steamapi [...] class User(Inheritance

Flask and Python 3

2014-09-23 Thread Juan Christian
I'm following a tutorial about Flask using Python 3.4.1, but I'm getting an error with a dead simple example: generator.py: from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): return 'Hello World' @app.route('/blog/post/') def post(): return render_tem

Re: Flask and Python 3

2014-09-23 Thread Juan Christian
On Tue, Sep 23, 2014 at 6:48 PM, John Gordon wrote: > > > @app.route('/') > > def index(): > > return 'Hello World' > > As posted, your code is not indented. Is this literally how your code > looks? > > The mail screwed the indentation, it's indented in the file. > > {% block content %}{% endlb

Re: Flask and Python 3

2014-09-23 Thread Juan Christian
On Tue, Sep 23, 2014 at 8:46 PM, Terry Reedy wrote: > > Did you use tabs? They are more likely to disappear than spaces. Yes, I use tabs. On Tue, Sep 23, 2014 at 9:33 PM, Jon Ribbens wrote: > > app.run(port=8000, debug=True) might've made the problem easier to find. > I didn't learn debug wit

Re: Flask and Python 3

2014-09-24 Thread Juan Christian
On Wednesday, September 24, 2014, Chris “Kwpolska” Warrick < kwpol...@gmail.com> wrote: > Learning from videos is the worst thing you can do. Use the official > flask documentation at http://flask.pocoo.org/docs/0.10/quickstart/ — > it’s much friendlier than a video. > > Also, there is nothing to

Re: Flask and Python 3

2014-09-25 Thread Juan Christian
On Thu, Sep 25, 2014 at 2:28 PM, Chris “Kwpolska” Warrick < kwpol...@gmail.com> wrote: > > It doesn’t matter. Here, have some wisdom, as provided by the top > Google hit for “video tutorials suck”: > https://news.ycombinator.com/item?id=4565615 > Using your link, the first comment from user 'aroc

Re: Flask and Python 3

2014-09-25 Thread Juan Christian
On Thu, Sep 25, 2014 at 3:23 PM, Chris Angelico wrote: > Actually, what most of the comments are agreeing on is that videos > need their transcripts. Without them, they suck. Most videos don't > have any sort of transcript. Ergo, most videos suck. I'm not talking about "360p 3min kid's tutorial

joining thread hangs unexpectedly

2014-09-26 Thread Christian Calderon
I am working on a personal project that helps minecraft clients connect to minecraft servers using tor hidden services. I am handling the client connection in a separate thread, but when I try to join the threads they hang. The problem is in the file called hiddencraft.py, in the function main at t

Re: SNI support in python 2.7 for Locust load tests

2014-09-30 Thread Christian Heimes
SNI support. 2.7.9 will be released shortly. You could try the 2.7 branch from hg.python.org. Use PyOpenSSL instead of Python's ssl module. It supports SNI, too. Regards Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Programming for Everybody (Python)

2014-10-02 Thread Juan Christian
I recommend to everyone. Already took one of his courses on Coursera and he's amazing as a teacher. On Thu, Oct 2, 2014 at 4:24 PM, Seymore4Head wrote: > Starts in 3 days > Coursera.org > > About the Course > This course is specifically designed to be a first programming course > using the popul

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-03 Thread Christian Gollwitzer
internals etc.) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: "High water" Memory fragmentation still a thing?

2014-10-03 Thread Christian Heimes
On 03.10.2014 21:16, Antoine Pitrou wrote: > It is not a leak. It is a quite common pattern of memory fragmentation. > The article is wrong in assuming that Python doesn't return the memory to > the OS. Python does return its empty memory pools to the OS, however the OS > itself may not be able to

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-05 Thread Christian Gollwitzer
th Apple's and ActiveState's wish executables are linked as well: wish is a type A program, it creates an interpreter and therefore must link to the actual library. So is Tkinter. But Tkagg is not, it extends a preexisting interpreter. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Syntax Highlighting in a tkinter Text widget

2014-10-06 Thread Christian Gollwitzer
a full-blown editor component, which is used in many code editors as the basic building block. Since this is a compiled extension, I have no idea how hard it will be to interface it with Python, however. Christian -- https://mail.python.org/mailman/listinfo/python-list

<    4   5   6   7   8   9   10   11   12   13   >