Fwd: Inconveniente

2021-02-09 Thread Juan Jose Reyna Figuera
*Buenas tardes, le escribo breve y puntualmente para reportar este el siguiente error al cual no le pude dar solución.* *Instalé Python 3.9.1 (64 bits), todo había funcionado bien hasta que necesité usar la librería seaborn. Al ejecutar mi algoritmo obtenía el siguiente error: * (...\Python\Pytho

distribute python interpreter and dependencies

2018-11-12 Thread Juan Cristóbal Quesada
Hello, this is my first mail. I resorted to the list after some prior struggling. Im facing the need to distribute a python installation folder and interpreter in a shared network drive. Im also distributing the application's source code that would lie also in another network drive. For this, my

How to run self-contained Python scripts who don't need Python installation?

2017-06-08 Thread Juan C.
I need to run some Python 3.6.0 scripts on the users' machines (W7 and W10) in an enterprise environment, but I can't install Python on those machines. I tried looking for those "py to exe", but sadly they don't support Python 3.6.0. Then I found out about "Windows x86/x86-64 embeddable zip file" t

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Juan C.
On Thu, Feb 23, 2017 at 7:42 PM, Irmen de Jong wrote: > > import os > os.system("traceroute www.google.com") Indeed, that would work, but it isn't a great approach in my opinion because I would rely on a system command, in this case Windows uses tracert while UNIX uses traceroute, one could fix t

How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Juan C.
I need to implement a traceroute inside my script but I can't escalate privileges.  Unix uses UDP for traceroute, but I didn't find any material regarding UDP traceroute in Python. -- https://mail.python.org/mailman/listinfo/python-list

Re: What library/package to use for parsing XML?

2017-01-30 Thread Juan C.
On Mon, Jan 30, 2017 at 3:58 PM, Chris Green wrote: > I want to parse some XML data, it's the address book data from the > linux program osmo. The file I want to parse is like this:- Just like Irmen said, use the default xml.etree.ElementTree, it's amazing and very simple to use. -- https://mai

Re: What are your opinions on .NET Core vs Python?

2017-01-30 Thread Juan C.
On Sun, Jan 29, 2017 at 1:06 AM, Juan C. wrote: > > As you guys might know, .NET Core is up and running, promising a > "cross-platform, unified, fast, lightweight, modern and open source > experience" (source: .NET Core official site). What do you guys think about > it

What are your opinions on .NET Core vs Python?

2017-01-28 Thread Juan C.
As you guys might know, .NET Core is up and running, promising a "cross-platform, unified, fast, lightweight, modern and open source experience" (source: .NET Core official site). What do you guys think about it? Do you think it will be able to compete with and overcome Python in the opensource med

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Juan C.
On Mon, Jan 2, 2017 at 9:38 AM, Antonio Caminero Garcia < tonycam...@gmail.com> wrote: > The thing with the from-the-scratch full featured IDEs (Eclipse, IntelliJ, Pycharm) is that they look like a space craft dashboard and that unwarranted resources consumption and the unnecessary icons. I want my

Re: Python constructors have particular semantics, and ‘Foo.__init__’ doesn't qualify (was: The right way to 'call' a class attribute inside the same class)

2016-12-12 Thread Juan C.
I agree with you, I'll post here the same thing I said in there for another member: On Mon, Dec 12, 2016 at 6:59 PM, Thomas 'PointedEars' Lahn wrote: > > Using the Python official doc link you provided, it cl

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Juan C.
On Mon, Dec 12, 2016 at 6:59 PM, Thomas 'PointedEars' Lahn wrote: > Using the Python official doc link you provided, it clearly states that `__new__` is the one called to "create a new instance of class [...]

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Juan C.
On Mon, Dec 12, 2016 at 12:34 PM, Thomas 'PointedEars' Lahn wrote: > First of all, the proper term for what you are doing there is _not_ “call”; > you are _accessing_ an attribute instead. Indeed, `accessing` seems better. I was looking for a better word but couldn't find at the moment. > To cal

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Juan C.
On Sun, Dec 11, 2016 at 11:34 PM, Steve D'Aprano wrote: > So... in summary: > > > When *assigning* to an attribute: > > - use `self.attribute = ...` when you want an instance attribute; > > - use `Class.attribute = ...` when you want a class attribute in > the same class regardless of which sub

The right way to 'call' a class attribute inside the same class

2016-12-11 Thread Juan C.
I'm watching a Python course and was presented a topic regarding classes. One of the examples were: box.py class Box: serial = 100 def __init__(self, from_addr, to_addr): self.from_addr = from_addr self.to_addr = to_addr self.serial = Box.serial Box.serial

Re: How to properly retrieve data using requests + bs4 from multiple pages in a site?

2016-12-03 Thread Juan C.
On Thu, Dec 1, 2016 at 10:07 PM, Juan C. wrote: > It works, but it has a big issue: it gets all data from all units/courses/assignments at the same time, and this isn't very useful as I don't care about data from units from 1-2 years ago. How can I change the logic so it just gets th

How to properly retrieve data using requests + bs4 from multiple pages in a site?

2016-12-01 Thread Juan C.
I'm a student and my university uses Moodle as their learning management system (LMS). They don't have Moodle Web Services enabled and won't be enabling it anytime soon, at least for students. The university programs have the following structure, for example: 1. Bachelor's Degree in Computer Scien

Re: What's the best way to minimize the need of run time checks?

2016-08-28 Thread Juan Pablo Romero Méndez
2016-08-28 0:04 GMT-07:00 Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info>: > On Sunday 28 August 2016 15:56, Juan Pablo Romero Méndez wrote: > > > 2016-08-27 21:30 GMT-07:00 Steve D'Aprano : > [...] > >> Now it is true that speaking in full

Re: What's the best way to minimize the need of run time checks?

2016-08-27 Thread Juan Pablo Romero Méndez
2016-08-27 21:30 GMT-07:00 Steve D'Aprano : > On Sun, 28 Aug 2016 12:31 pm, Juan Pablo Romero Méndez wrote: > > > 2016-08-14 7:29 GMT-07:00 Steven D'Aprano : > > > >> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > >> > >>

Re: What's the best way to minimize the need of run time checks?

2016-08-27 Thread Juan Pablo Romero Méndez
2016-08-27 21:30 GMT-07:00 Steve D'Aprano : > On Sun, 28 Aug 2016 12:31 pm, Juan Pablo Romero Méndez wrote: > > > 2016-08-14 7:29 GMT-07:00 Steven D'Aprano : > > > >> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > >> > >>

Re: What's the best way to minimize the need of run time checks?

2016-08-27 Thread Juan Pablo Romero Méndez
2016-08-14 7:29 GMT-07:00 Steven D'Aprano : > On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > > > I've been trying to find (without success so far) an example of a > > situation where the dynamic features of a language like Python provides a > > c

Re: What's the best way to minimize the need of run time checks?

2016-08-12 Thread Juan Pablo Romero Méndez
2016-08-12 1:10 GMT-07:00 Lawrence D’Oliveiro : > On Thursday, August 11, 2016 at 8:33:41 AM UTC+12, Juan Pablo Romero > Méndez wrote: > > > I've been trying to find (without success so far) an example of a > situation > > where the dynamic features of a language

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
atures of some language are a better solution than static typing. This is of course more useful in languages that support both paradigms. Juan Pablo 2016-08-10 13:50 GMT-07:00 Michael Selik : > > > On Wed, Aug 10, 2016, 4:34 PM Juan Pablo Romero Méndez < > jpablo.rom...@gmail.com>

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 18:28 GMT-07:00 Steven D'Aprano : > On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > > > Hello, > > > > In online forums sometimes people complain that they end up having to > test > > constantly for None, > > Then don'

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 23:16 GMT-07:00 Gregory Ewing : > Juan Pablo Romero Méndez wrote: > > This is interesting. You are Ok having runtime errors? >> > > You're going to have runtime errors in any case, whether > they come from code you've put there yourself to check >

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 23:47 GMT-07:00 Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info>: > On Wednesday 10 August 2016 15:20, Juan Pablo Romero Méndez wrote: > > > Ok, so you suggested 1) catching exceptions at the point where you care, > 2) > > preemptively check f

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 18:28 GMT-07:00 Steven D'Aprano : > On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > > > Hello, > > > > In online forums sometimes people complain that they end up having to > test > > constantly for None, > > Then don'

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 14:01 GMT-07:00 Michael Selik : > On Tue, Aug 9, 2016 at 3:22 PM Juan Pablo Romero Méndez < > jpablo.rom...@gmail.com> wrote: > >> I'm actually looking for ways to minimize run time errors, so that would >> include TypeError and AttributeError. >>

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 13:18 GMT-07:00 Rob Gaddi : > Juan Pablo Romero Méndez wrote: > > > 2016-08-09 12:06 GMT-07:00 Paul Rubin : > > > >> Juan Pablo Romero Méndez writes: > >> > In online forums sometimes people complain that they end up having to > >> >

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
What static checking can actually guarantee varies depending on the specific type system at hand (C# vs Haskell vs Idris for example). But most of them can guarantee simple stuff like: "I'm I allowed to invoke this function at this point?" If you don't have that, well you can rely on tests to show

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 12:06 GMT-07:00 Paul Rubin : > Juan Pablo Romero Méndez writes: > > In online forums sometimes people complain that they end up having to > > test constantly for None > > That's something of a style issue. You can code in a way that avoids a > lot of

What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
s you like that addresses the following issue: What is the best way to use the dynamic features of Python to avoid having to write a poor's man type system? Thanks! Juan Pablo -- https://mail.python.org/mailman/listinfo/python-list

PLEASE HELP -- TOTALLY NEW TO PYTHON

2016-03-26 Thread Juan Dent
nge(len(subgraphs)-1, -1, -1): TypeError: object of type 'generator' has no len() Please, I know no python and am in a hurry to get this working… Please help Regards, Juan -- https://mail.python.org/mailman/listinfo/python-list

Re: Best practices for writing jobs run through cron

2015-07-06 Thread Juan Gutierrez
Hi WU, It sounds like you want to add a lot of helpful transparency into your task runner which is awesome, however, have you taken a look at Celery? http://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html Celery also comes with a monitoring tool (Flower - http://celery.readthedo

Re: Save session Selenium PhantomJS

2015-03-28 Thread Juan C.
Issue resolved. My code was working, the problem was PhantomJS 2.0, used 1.9.8 and now I have the 'cookies.txt' file as expected! -- https://mail.python.org/mailman/listinfo/python-list

Save session Selenium PhantomJS

2015-03-26 Thread Juan C.
Objective: Save the browser session/cookies to share them in multiples script execution. I currently have this working using ChromeDriver: chrome_options = Options() chrome_options.add_argument("user-data-dir=" + os.path.dirname(sys.argv[0])) browser = webdriver.Chrome(chrome_options=chrome_optio

OpenID + Python 3.4

2015-03-24 Thread Juan C.
I was looking on the Internet regarding the use of OpenID in Python apps but I only found Flask/web related stuff. Is there any module that provides OpenID implementation for desktop level? I currently have a Python desktop script that needs to authenticate in a OpenID server, but I don't know ho

Re: smtplib not working as expected

2014-12-27 Thread Juan Christian
Denis it was already resolved, check my message above. ^^ -- https://mail.python.org/mailman/listinfo/python-list

Re: smtplib not working as expected

2014-12-27 Thread Juan Christian
On Sat Dec 27 2014 at 1:23:12 AM Vincent Vande Vyvre < vincent.vande.vy...@telenet.be> wrote: Try with the TLS: Many thanks, working like a charm, code: server = smtplib.SMTP('smtp.mail.ru') server.starttls() server.ehlo() server.login('SENDER EMAIL GOES HERE', 'PASSWD GOES HERE') server.sendmail

Re: smtplib not working as expected

2014-12-26 Thread Juan Christian
On Fri Dec 26 2014 at 11:07:30 PM MRAB wrote: According to the docs, if you let the port parameter default to 0, it'll use port 465. I tested with my ISP. Using port 465, it failed. Using the default, it succeeded. So, I changed the code how you said, but still not working. Code: import smt

smtplib not working as expected

2014-12-26 Thread Juan Christian
I have the following test code: import smtplib fromaddr = 'mksfjnsfji4433j4...@bk.ru' toaddrs = ['mksfjnsfji4433j4...@bk.ru'] msg = ("From: %s\r\nTo: %s\r\n\r\n" % (fromaddr, ", ".join(toaddrs))) msg = msg + 'test' print("Message length is " + repr(len(msg))) server = smtplib.SMTP('sm

Re: Is there a way to schedule my script?

2014-12-18 Thread Juan Christian
On Thu Dec 18 2014 at 11:35:11 PM Chris Angelico wrote: Why does this matter to you? Why am I getting the feeling that I should not be helping you? Because that's what my project is all about, I need to fake some 'human actions' inside the network to do some benchmarks and test internal stuffs. T

Re: Is there a way to schedule my script?

2014-12-18 Thread Juan Christian
On Thu Dec 18 2014 at 2:24:46 PM Ian Kelly wrote: What kind of random distribution of the time between executions are you looking for? A random sleep lends itself easily to a uniform distribution. The latter approach that you describe would result in a geometric distribution. I'm looking for a ra

Re: Is there a way to schedule my script?

2014-12-18 Thread Juan Christian
Thanks, using cron here. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to schedule my script?

2014-12-18 Thread Juan Christian
On Wed Dec 17 2014 at 11:04:16 PM Juan Christian wrote: Thanks. That was a great answer. I'll redo my code. It's running and will only run in my Docker container (Ubuntu Server 14.04.1) so I'll use cron. Indeed, currently I'm using something like that: while True: if 9 &

Re: Is there a way to schedule my script?

2014-12-17 Thread Juan Christian
On Wed Dec 17 2014 at 9:40:52 PM Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > Juan Christian wrote: > > > I know about the schedule modules and such but they work in situations > > like 'run this in a X hours/minutes/seconds interval'

Re: Is there a way to schedule my script?

2014-12-17 Thread Juan Christian
On Wed Dec 17 2014 at 7:35:10 PM Chris Angelico wrote: time.time() % 86400 That's number of seconds since midnight UTC, ranging from 0 up to 86399. (I've no idea what 64562 would mean. That's an awfully big number for a single day.) If you offset that before calculating, you can get that in

Re: Is there a way to schedule my script?

2014-12-17 Thread Juan Christian
On Wed Dec 17 2014 at 6:25:39 PM John Gordon wrote: If you want to solve your problem entirely within Python, look at the "scheduler" module. (Although even this isn't a complete solution, as you still have to make sure the program is running in the first place...) My script is running fine, Win

Re: Is there a way to schedule my script?

2014-12-17 Thread Juan Christian
Ops, sorry. It's: 9:00 AM ~ 11:59 PM -> Running ... and not 9:00 AM ~ 11:50 PM -> Running -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to schedule my script?

2014-12-17 Thread Juan Christian
On Wed Dec 17 2014 at 5:45:31 PM John Gordon wrote: You could write a separate program whose only job is to send a STOP or CONTINUE signal to your main program, and then run that program from a scheduler. The standard system "kill" command would probably work for this purpose, assuming you have a

Is there a way to schedule my script?

2014-12-17 Thread Juan Christian
I know about the schedule modules and such but they work in situations like 'run this in a X hours/minutes/seconds interval', I already have my code in a while loop with sleep (it's a bit ugly, I'l change to a scheduler soon). What I really want is, for example: 24/7/365 9:00 AM -> Start 11:59 PM

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-28 Thread Juan Christian
On Fri Nov 28 2014 at 2:07:32 AM Michael Torrie wrote: Okay, here's a reworking of the code that invokes a new QThread instance each time. Note the QThread instance has to be bound to the MainWindow so that it won't be destroyed when it goes out of scope. Also the Worker thread sends a signal with

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Juan Christian
On Thu Nov 27 2014 at 9:16:38 PM Juan Christian wrote: I'll read the code thoroughly and reply to you if I find something strange, many thanks! So, instantly I found one issue, you said that this code won't block the GUI, only the thread event loop, but if we keep moving the window

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Juan Christian
On Thu Nov 27 2014 at 8:53:16 PM Michael Torrie wrote: Hope this helps. Here's complete working code, minus the .ui file: http://pastebin.com/VhmSFX2t Thanks, I'll just repost the code on pastebin with a NEVER expire time and UNLISTED, so that it can be of some help for others here in the mailist

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Juan Christian
On Thu Nov 27 2014 at 2:12:40 AM Michael Torrie wrote: Hmm, I hit a wall. There's no main.ui file. Can you rework your code so that you have a single file (plus a separate ui file that's okay), that simulates the url request, that I can execute easily. As you asked, here it's, everything on one m

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-26 Thread Juan Christian
On Wed Nov 26 2014 at 1:16:11 AM Michael Torrie wrote: You're going to have to post a complete, but small, code example, I think. Working with fragments of code is very difficult if not impossible to assist with, resulting in obtuse, obvious replies from folks. As asked, here is all the code: ou

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-25 Thread Juan Christian
So guys, I had to change to approach, I read that using Qt I can't do multiple inheritance. So my Outpost class can't be like 'Outpost(QObject, QThred)'. I had to change the code a bit: from PySide.QtCore import QObject, QThread, Signal import requests import bs4 class Worker(QThread): def __ini

Fwd: Python Signal/Slot + QThred code analysis

2014-11-25 Thread Juan Christian
On Tue Nov 25 2014 at 1:42:24 PM MRAB wrote: I think that the problem there is that strings don't have an __exit__ method. I don't understand what you said, what you mean by that? =/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Signal/Slot + QThred code analysis

2014-11-25 Thread Juan Christian
On Mon Nov 24 2014 at 11:56:31 PM Michael Torrie wrote: Looks alright. Does it work? Well, no =/ First I had to remove the multiple inheritance, because Qt doesn't allow that, so I removed the QObject. Second, just for testing I'm calling the module directly using: timer = QTimer() timer.start

Re: Python Signal/Slot + QThred code analysis

2014-11-24 Thread Juan Christian
Oh, and this code I made by myself, I didn't copy. That's why I want you guys to see if everything is ok. -- https://mail.python.org/mailman/listinfo/python-list

Python Signal/Slot + QThred code analysis

2014-11-23 Thread Juan Christian
This is a continuation of my other topic "How to access Qt components loaded from file", it was getting big and the focus changed completely, the real question there was already answered, and we were talking about signal/slot, QThred and other things. So, I read on the web (didn't find books talki

Re: How to access Qt components loaded from file?

2014-11-21 Thread Juan Christian
On Fri Nov 21 2014 at 8:05:30 AM alister wrote: > All of this VVV > [...] I'm sorry, I didn't know, but it seems there isn't any option to remove that in the Inbox (new Gmail), do you guys use any special program or client to use list? -- https://mail.python.org/mailman/listinfo/python-lis

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
On Thu Nov 20 2014 at 8:20:29 PM alister wrote: > > Then either do the necessary work (you have just proven you can)or find a > better way of communicating with this news group(NNTP or the mailing > list), otherwise you may find a number of good people simply ignore your > posts. > > While you are

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
On Thu Nov 20 2014 at 7:07:10 PM Mark Lawrence wrote: > > You also need to study the difference between top posting, interspersed > posting and bottom posting. The second and third are very much the > prefered styles here. > Yes I know, but I'm using the new Google Inbox, and I limited to what I

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
**Back to the list So, as I said the PyQt doc is using C o.0 Yes, I read the tutorials, I'll google for some books and things related. On Tue Nov 18 2014 at 10:48:44 AM Vincent Vande Vyvre < vincent.vande.vy...@telenet.be> wrote: > Le 18/11/2014 13:18, Juan Christian a écrit : &

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
Another problem is that this doc doesn't use Python. On Thu Nov 20 2014 at 5:36:37 PM Juan Christian wrote: > Yes, I read everything and saw that stackoverlfow on Google too. I'm > reading this doc: http://pyqt.sourceforge.net/Docs/PyQt4/classes.html > > I just asked for a

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
10:57 AM, Juan Christian wrote: > > So, I need to study QThreads, do you know any book or video-course that > > talks about this matter? I've seen the tutorials that you pointed but I > > need a "wider" approach regarding QThreads to really understand it and > > a

Re: How to access Qt components loaded from file?

2014-11-20 Thread Juan Christian
Thu Nov 20 2014 at 1:43:21 PM Michael Torrie wrote: > On 11/19/2014 07:53 PM, Juan Christian wrote: > > Thanks, it's working using QTimer. The thing is that whenever the program > > is going to do something, in my case, draw a new QGroupBox with some > > components inside a

Re: How to access Qt components loaded from file?

2014-11-19 Thread Juan Christian
onents just for testing.This shouldn't be normal, right? Am I doing something wrong? On Wed Nov 19 2014 at 7:00:43 PM Rob Gaddi wrote: > On Wed, 19 Nov 2014 20:47:31 + > Juan Christian wrote: > > > Let's say that I want to call the site in a 5min interval. I'm cur

Re: How to access Qt components loaded from file?

2014-11-19 Thread Juan Christian
app.exec_() loop, so I need to have a trigger configured that will be called in a defined interval, then inside this trigger I configure the "set_avatar", "set_text", "set_btn_link", etc, is that right? On Tue Nov 18 2014 at 9:37:21 PM Chris Angelico wrote: >

Re: How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
> > You can't have a slot like this: > > MainWindow.btn.clicked.connect(MainWindow.txtbox.setText(test())) > > because that's mean: "connect to the return of > MainWindow.txtbox.setText(test())" and it's not possible at this stage > of your program. > > Use instead a function: > > MainWindow.btn.cl

Re: How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
syntax is correct, I don't know why it failed, the btn is in the Form too, it's a QPushButton. The test func is just a simple func that returns a random text. On Tue Nov 18 2014 at 11:08:48 AM Juan Christian wrote: > Many thanks, worked. The only problem now is that I don't have

Re: How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
Many thanks, worked. The only problem now is that I don't have auto-complete for anything, because of this approach... I'll have to check the doc more regularly. ^^ On Tue Nov 18 2014 at 10:48:44 AM Vincent Vande Vyvre < vincent.vande.vy...@telenet.be> wrote: > Le 18/

How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
I have this simple code that load any Qt Designer .UI file: from PySide.QtCore import QFile from PySide.QtGui import QApplication from PySide.QtUiTools import QUiLoader def loadui(file_name): loader = QUiLoader() uifile = QFile(file_name) uifile.open(QFile.ReadOnly) ui = loader.load(uifile) uifi

Re: PySide 1.2.2 setMaxWidth and AeroSnap

2014-11-16 Thread Juan Christian
On Sun Nov 16 2014 at 3:46:40 PM Vincent Vande Vyvre < vincent.vande.vy...@telenet.be> wrote: > > No probleme with PyQt but I think this is a window manager question. > Window, gnome, KDE, Mate, ... > > > If your widget is a QMainWindow or a QDialog add a size grip: > > self.setSizeGripEna

PySide 1.2.2 setMaxWidth and AeroSnap

2014-11-16 Thread Juan Christian
PySide 1.2.2 Python 3.4.2 Code: from PySide.QtGui import * class MainWindow(QWidget): def __init__(self): QWidget.__init__(self) self.setMinimumSize(600, 700) self.setMaximumWidth(600) self.setLayout(QVBoxLayout()) * Call to this module in another module * app = QApplication(sys.argv) window =

Re: Python 3.4.2 + PyQt4 + PyCharm 3.4.1

2014-11-06 Thread Juan Christian
ov 6, 2014 at 12:50 farshad akbari wrote: > On Saturday, November 1, 2014 3:11:54 PM UTC+3:30, Juan Christian wrote: > > No one here uses PyCharm and Qt? =/ > > > > > > On Wed, Oct 29, 2014 at 8:45 PM, Juan Christian > wrote: > > > > It only occurs whule u

Re: Python 3.4.2 + PyQt4 + PyCharm 3.4.1

2014-11-01 Thread Juan Christian
No one here uses PyCharm and Qt? =/ On Wed, Oct 29, 2014 at 8:45 PM, Juan Christian wrote: > It only occurs whule using PyCharm I tried it via pure terminal and > everything works... =/ > > On Tue, Oct 28, 2014 at 7:45 PM, Juan Christian > wrote: > >> Python 3.4.2 Win

Re: Python 3.4.2 + PyQt4 + PyCharm 3.4.1

2014-10-29 Thread Juan Christian
It only occurs whule using PyCharm I tried it via pure terminal and everything works... =/ On Tue, Oct 28, 2014 at 7:45 PM, Juan Christian wrote: > Python 3.4.2 Windows x64 > PyQt4 4.11.2 Py3.4 Qt4.8.6 (x64) > PyCharm 3.4.1 Pro Edition > > > So, PyCharm works 100% with everyt

Python 3.4.2 + PyQt4 + PyCharm 3.4.1

2014-10-28 Thread Juan Christian
Python 3.4.2 Windows x64 PyQt4 4.11.2 Py3.4 Qt4.8.6 (x64) PyCharm 3.4.1 Pro Edition So, PyCharm works 100% with everything here but PyQt. I have this folder structure: Disk C: > PyQt4 >> Lib/site-packages/PyQt4/(tons of files here) > Python34 (normal/default installation) --- I tried copying

Python 3.4.1 and blitzdb issue

2014-10-22 Thread Juan Christian
Testing code: CODE - #!/usr/bin/env import requests from blitzdb import Document, FileBackend API_URL = 'http://api.themoviedb.org/3' API_KEY = 'ddf30289' class Actor(Document): pass def get_actor(_id): r = requests.get('{}/person/{}?api_key={}'.format(A

Re: Python 3.4.1 and blitzdb issue

2014-10-22 Thread Juan Christian
new millennium.","birthday":"1944-05-14","deathday":"","homepage":"","id":1,"imdb_id":"nm184","name":"George Lucas","place_of_birth":"Modesto - California - USA&qu

Re: Is there an easy way to control indents in Python

2014-10-20 Thread Juan Christian
Sorry guys, my post about SQL was not meant to be here!!! On Mon, Oct 20, 2014 at 5:43 PM, MRAB wrote: > On 2014-10-20 20:04, Juan Christian wrote: > >> Ok, new code using ?: >> >> import sqlite3 >> >> db = sqlite3.connect('db.sqlite') >> >

Re: Is there an easy way to control indents in Python

2014-10-20 Thread Juan Christian
Ok, new code using ?: import sqlite3 db = sqlite3.connect('db.sqlite') def create_db(): db.execute(''' CREATE TABLE TOPICS( ID INT PRIMARY KEY NOT NULL, URL VARCHAR NOT NULL, AUTHOR VARCHAR NOT NULL, MESSAGE VARCHAR NOT NULL ); ''') def insert_db(_id, url, auth

Re: Is there an easy way to control indents in Python

2014-10-14 Thread Juan Christian
Using PyCharm is easy: File > Settings > (IDE Settings) Editor > Smart Keys > Reformat on paste > choose "Reformat Block" On Tue, Oct 14, 2014 at 11:13 PM, ryguy7272 wrote: > I'm just learning Python. It seems like indents are EXTREMELY important. > I guess, since there are no brackets, everyt

Re: Flask and Django

2014-10-12 Thread Juan Christian
Anyone? On Fri, Oct 10, 2014 at 7:22 PM, Juan Christian wrote: > So, I'm already familiar with Flask and I fell comfortable using it, but I > see that no one uses it in "real business", everywhere I look regarding > jobs and web dev, people always talk about Django, no

Flask and Django

2014-10-10 Thread Juan Christian
So, I'm already familiar with Flask and I fell comfortable using it, but I see that no one uses it in "real business", everywhere I look regarding jobs and web dev, people always talk about Django, no one mentions Flask, no one uses Flask. I'm coding a personal tool using Flask but I feel the need

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: 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

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-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-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-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

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

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

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: 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: 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: 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
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: 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

  1   2   >