Re: How to 'ignore' an error in Python?

2023-04-29 Thread Phu Sam
Unsubscribe On Sat, Apr 29, 2023 at 7:05 PM Chris Angelico wrote: > On Sun, 30 Apr 2023 at 11:58, Chris Green wrote: > > > > Chris Angelico wrote: > > > On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran > wrote: > > > > > > > > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote: > > > > > I'm

Fwd: A typing question

2022-10-29 Thread Sam Ezeh
Do you want the following? ``` from typing import List, Optional class GLOBALS: foos: Optional[Foos] = None class Foo: def __init__(self): pass class Foos: Foos: List[Foo] = [] def __init__(self): pass GLOBALS.foos = Foos() ``` Kind regards, Sam Ezeh On

Re: Virtual PUG-meeting: An applied introduction to Finite State Machines

2022-09-13 Thread Sam Ezeh
That seems interesting. Is this hosted online? And are there any suggested reading materials for those who might not be able to attend? Kind regards, Sam Ezeh On Tue, 13 Sept 2022 at 22:53, dn wrote: > An applied introduction to Finite State Machines > 0730 UTC, Wed 21 Sep 2022 > >

Re: Building on Windows

2022-07-02 Thread Sam Ezeh
host desktop but in this scenario, the error was that single line and I can use paste sites where necessary. Kind regards, Sam Ezeh On Sat, 2 Jul 2022 at 15:27, Sam Ezeh wrote: > > I have a Windows virtual machine and I'm following the instructions on > the devguide [1] to bui

Building on Windows

2022-07-02 Thread Sam Ezeh
x27;m not well-acquainted with Windows and don't understand the solutions. Thanks in advance. Kind regards, Sam Ezeh [1]: https://devguide.python.org/compiler/ [2]: https://bugs.python.org/issue41213 [3]: https://bugs.python.org/issue33675 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python installation

2022-06-21 Thread Sam Ezeh
Inside my Windows virtual machine only entering `py` as the command brings up the repl, if that helps. Kind Regards, Sam Ezeh On Tue, 21 Jun 2022 at 18:15, Igor Korot wrote: > > Hi, > > On Tue, Jun 21, 2022 at 11:43 AM Brian Karinga wrote: > > > > Hello, > > &

Re: Seeking deeper understanding of python equality (==)

2022-05-06 Thread Sam Ezeh
Kind regards, Sam Ezeh On Fri, 6 May 2022 at 18:12, Jonathan Kaczynski wrote: > > Hi, > > I was recently trying to explain how python equality works and ran into a > gap in my knowledge. I haven't found any good pages going beneath a surface > level explanation of pyt

Fwd: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Sam Ezeh
-- Forwarded message - From: Sam Ezeh Date: Fri, 6 May 2022, 15:29 Subject: Re: Do projects exist to audit PyPI-hosted packages? To: Skip Montanaro I've had similar thoughts in the past. I don't know of anything but I wonder if repositiories for other languages

Re: Why no list as dict key?

2022-04-20 Thread Sam Ezeh
Repeating the above points, here is an example of what would happen if you tried. Dictionaries require their keys to be immutable as under-the-hood they use hash tables and they'd fail when the underlying values are allowed to change. ``` [sam@samtop]: ~>$ python Python 3.10.2 (main, Jan

Re: Tuple unpacking inside lambda expressions

2022-04-20 Thread Sam Ezeh
I went back to the code recently and I remembered what the problem was. I was using multiprocessing.Pool.pmap which takes a callable (the lambda here) so I wasn't able to use comprehensions or starmap Is there anything for situations like these? Kind Regards, Sam Ezeh On Sat, 16 Apr 2022

Re: Tuple unpacking inside lambda expressions

2022-04-20 Thread Sam Ezeh
This also works great! Kind Regards, Sam Ezeh On Tue, 19 Apr 2022 at 12:03, Antoon Pardon wrote: > > Op 16/04/2022 om 23:36 schreef Sam Ezeh: > > Two questions here. > > > > Firstly, does anybody know of existing discussions (e.g. on here or on > > python-ideas

Enums and nested classes

2022-04-20 Thread Sam Ezeh
Outer(Enum): a = 1 b = 2 class Inner(Enum): foo = 10 bar = 11 ``` ``` class Outer(Enum): a = 1 b = 2 class Inner: c = None def __init__(self): ``` Kind Regards, Sam Ezeh -- https://mail.python.org/mailman/listinfo/p

Re: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-20 Thread Sam Ezeh
I'll see if I can find out how positional only and keyword only arguments are used in __init__ methods in the wild and I'll see if there have been any other discussions talking about what this approach could offer. On Sun, 17 Apr 2022 at 02:54, dn wrote: > > On 17/04/2022 09.20

Re: Tuple unpacking inside lambda expressions

2022-04-16 Thread Sam Ezeh
Angelico wrote: > > On Sun, 17 Apr 2022 at 07:37, Sam Ezeh wrote: > > > > Two questions here. > > > > Firstly, does anybody know of existing discussions (e.g. on here or on > > python-ideas) relating to unpacking inside lambda expressions? > > > > I

Fwd: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-16 Thread Sam Ezeh
I've just seen Pablo's very recent post on python-ideas so I thought I'd link it here. [1] [1]: https://mail.python.org/archives/list/python-id...@python.org/message/SCXHEWCHBJN3A7DPGGPPFLSTMBLLAOTX/ Kind Regards, Sam Ezeh On Fri, 15 Apr 2022 at 22:57, Ethan Furman wrote: &g

Fwd: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-16 Thread Sam Ezeh
ncern I have is that even if this is useful, it might still fall to the same fate. [1]: https://mail.python.org/archives/list/python-id...@python.org/message/SCTXSEKOWDRDGVXXOEB7JUC6WE7XKGMO/ On Fri, 15 Apr 2022 at 22:30, dn wrote: > > On 15/04/2022 23.19, Sam Ezeh wrote: > ..

Tuple unpacking inside lambda expressions

2022-04-16 Thread Sam Ezeh
ocess(*job), jobs ) ``` Secondly, for situations like these, do you have any go-to methods of rewriting these while maintaining clarity? Kind Regards, Sam Ezeh -- https://mail.python.org/mailman/listinfo/python-list

Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-15 Thread Sam Ezeh
s assigned at least 3 of their arguments as attributes with the same name. ``` [sam@samtop]: ~/Documents/git/presearch>$ presearch -f queries/attribute_initialisation.py sources/ Running queries... Out of 1526 classes defining __init__, there were 290 (19.0%) classes whose __init__ functions ass

Re: Functionality like local static in C

2022-04-14 Thread Sam Ezeh
rint(function.variable) ... function.variable += 1 ... >>> function.variable = 1 >>> function() 1 >>> function() 2 >>> ``` If necessary, the variable can be initialised inside the function too. Kind Regards, Sam Ezeh On Thu, 14 Apr 2022 at 16:36, Sam Ezeh wrote: > > I

Re: memory consumption

2021-04-01 Thread Sam
On 3/29/21 5:12 AM, Alexey wrote: Hello everyone! I'm experiencing problems with memory consumption. I have a class which is doing ETL job. What`s happening inside: - fetching existing objects from DB via SQLAchemy - iterate over raw data - create new/update existing objects - commit cha

Re: Please don't feed the trolls

2021-03-09 Thread Sam
On 3/8/21 3:35 PM, Chris Angelico wrote: On Tue, Mar 9, 2021 at 8:31 AM D'Arcy Cain wrote: On 2021-03-06 4:24 p.m., Terry Reedy wrote: Trolling, among other things, is fishing with a moving line, especially with a revolving lure, as from a moving boat. A troll, among other things, is that me

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-28 Thread Sam
On 5/28/20 12:49 AM, Rahul Gupta wrote: I am having a Ubuntu system which has 125 Gb of RAM. I executed few python scripts on that system. Those scripts uses numpy arrays and pandas. Now execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap is occupied. At this moment no

Re: Java JMS and python

2020-04-13 Thread Sam
at 11:20 AM Sam wrote: Hi, We are not a java shop and we are trying to interface with an API that is "JMS only". We asked if it supported activeMQ or STOMP and they replied that it is Sun JMS only. So what does that mean if we want to communicate with it from py

Java JMS and python

2020-04-13 Thread Sam
if anyone else has been down this path... Regards, Sam -- https://mail.python.org/mailman/listinfo/python-list

Error getting data from website

2019-12-06 Thread Sam Paython
;id":"priceblock_dealprice"}) print(element.text.strip()) and this is the error I am getting: C:\Users\Sam\PycharmProjects\untitled2\venv\Scripts\python.exe C:/Users/Sam/PycharmProjects/untitled2/src/app.py Traceback (most recent call last): File "C:/Users/Sam/PycharmProjects/untitled

Re: Dictionary

2019-02-27 Thread Phu Sam
The condition 'if not fibs.get(n):' will not work because n = 0 fibs.get(0) is 0 so not 0 is 1 Here is the modified code that works: fibs={0:0,1:1} def rfib(n): if n == 0 or n == 1: return fibs[n] else: fibs[n]=rfib(n-2)+rfib(n-1) return fibs[n] >>>

Re: Scraping multiple web pages help

2019-02-27 Thread Phu Sam
You need to obtain a key for API first - from https://regulationsgov.github.io/developers/ The Regulations.gov API is taking action to conserve system resources. Beginning immediately, we will limit access to one account per organization, and require approval for enabling accounts.* Please contact

Synchronization Primitives in Python

2017-08-17 Thread Sam Chats
A good introductory article on synchronizing threads in Python: https://hackernoon.com/synchronization-primitives-in-python-564f89fee732 -- https://mail.python.org/mailman/listinfo/python-list

Re: poplib's POP3_SSL not downloading latest email

2017-07-08 Thread Sam Chats
can see my sent mails on the Gmail app on my phone. So the emails are indeed getting delivered. The problem is that POP shows me emails from about a month ago, and I've received potentially hundreds of emails after that. So it's a receiving problem. Cheers, Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: poplib's POP3_SSL not downloading latest email

2017-07-08 Thread Sam Chats
object > I'm using. It shows mails from more than a month ago. I'm unable to figure > out what's wrong. Please help me in correcting the code. > Thanks in advance. ð\x9f\x99\x8f > > Here's the script: > https://github.com/schedutron/CPAP/blob/master/Chap3/m

Re: How to write raw strings to Python

2017-07-05 Thread Sam Chats
On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote: > On 2017-07-05, Sam Chats wrote: > > > I want to write, say, 'hello\tworld' as-is to a file, but doing > > f.write('hello\tworld') makes the file look like: > [...] > > How can

Re: How to write raw strings to Python

2017-07-05 Thread Sam Chats
On Wednesday, July 5, 2017 at 8:22:13 PM UTC+5:30, Stephen Tucker wrote: > Sam, > > You use > > f.write(r'hello\tworld') > > The r in front of the string stands for raw and is intended to switch off > the escape function of the backslash in the string. It

How to write raw strings to Python

2017-07-05 Thread Sam Chats
I want to write, say, 'hello\tworld' as-is to a file, but doing f.write('hello\tworld') makes the file look like: hello world How can I fix this? Thanks in advance. Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: School Management System in Python

2017-07-05 Thread Sam Chats
On Wednesday, July 5, 2017 at 6:56:06 PM UTC+5:30, Thomas Nyberg wrote: > On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote: > > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote: > >> I can use either tsv or csv. Which one would be better? > > > > > > Some people complain that tsv has prob

Re: School Management System in Python

2017-07-05 Thread Sam Chats
Thanks for your suggestions. I would've not used pickle had I been aware about other tools while developing this. I was thinking about migrating to sqlite3. How about that? And yes, I need more comprehanesive documentation. Will work on that soon. Thanks, Sam Chats -- https://mail.pytho

Re: School Management System in Python

2017-07-05 Thread Sam Chats
Check message Sorry for this message. Sam -- https://mail.python.org/mailman/listinfo/python-list

School Management System in Python

2017-07-05 Thread Sam Chats
this does a lot more than perhaps all of them, while having a command line REPL interface. One neat thing I wanted to mention is that this project has absolutely no third-party dependencies. https://github.com/schedutron/S-Koo-L Sam Chats -- https://mail.python.org/mailman/listinfo/python-list

How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Sam Chats
https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 -- https://mail.python.org/mailman/listinfo/python-list

A million requests per second with Python

2017-06-27 Thread Sam Chats
https://medium.freecodecamp.com/million-requests-per-second-with-python-95c137af319 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Sam
e to use a thread instead of a fork. But not sure how well all that would work with celery. --Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: Python boilerplate

2016-03-21 Thread Sam
p.cfg ├── setup.py ├── tests.py └── tox.ini Fernando Felix There is this too: https://pypi.python.org/pypi/python_boilerplate_template --Sam -- https://mail.python.org/mailman/listinfo/python-list

help

2016-01-15 Thread sam Rogers via Python-list
adafruit project work. https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/overview Thanks,Sam -- https://mail.python.org/mailman/listinfo/python-list

Connecting Terminal to Python 3.5

2015-08-28 Thread Sam Miller
to python 3.5 so I can run python v3.5 within terminal? Thanks, Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: python command not working

2015-08-14 Thread sam . heyman
On Wednesday, April 22, 2009 at 8:36:21 AM UTC+1, David Cournapeau wrote: > On Wed, Apr 22, 2009 at 4:20 PM, 83nini <83n...@gmail.com> wrote: > > Hi guys, > > > > I'm new to python, i downloaded version 2.5, opened windows (vista) > > command line and wrote "python", this should take me to the pyth

Multiple thread program problem

2015-06-04 Thread Sam Raker
proc(f) isn't a callable, it's whatever it returns. IIRC, you need to do something like 'start_new_thread(proc, (f,))' -- https://mail.python.org/mailman/listinfo/python-list

Online offline Python apps

2015-04-23 Thread Sam Raker
Have you tried a conditional/try-catch block in your __init__? Something like class MyDBConn(object): def __init__(self, **db_kwargs): try: db = some_db.connect(**db_kwargs) except some_db.ConnectionError: db = my_fake_db()

Re: Newbie question about text encoding

2015-02-26 Thread Sam Raker
I'm 100% in favor of expanding Unicode until the sun goes dark. Doing so helps solve the problems affecting speakers of "underserved" languages--access and language preservation. Speakers of Mongolian, Cherokee, Georgian, etc. all deserve to be able to interact with technology in their native la

Re: module import questions and question about pytest and module imports

2014-12-08 Thread sam pendleton
Thanks for getting back with me! On Sun, Dec 7, 2014 at 11:26 AM, Dave Angel wrote: > On 12/05/2014 11:50 PM, sam pendleton wrote: >> >> garage/ >> |- __init__.py >> |- cars/ >> |- __init__.py >> |- hummer.py >> tests

module import questions and question about pytest and module imports

2014-12-07 Thread sam pendleton
garage/ |- __init__.py |- cars/ |- __init__.py |- hummer.py tests/ |- test_cars.py at the top of test_cars.py, there is this: from garage.cars import hummer pytest is on this import statement, so i guess it's incorrect. what should it be? if i open a python repl

Re: Array of Functions

2014-11-14 Thread Sam Raker
I second the call for a more concrete implementation, but if you want the results of the functions in c3 to be responsive to the values of c1 and c2 (i.e., if you change r1c1, r1c3 returns a different value), it might be worth encapsulating the whole thing in an object and making the c3 function

Pex import problems

2014-10-21 Thread Sam Raker
Hi all, I'm trying to use Pex (http://pex.readthedocs.org/en/latest/index.html) to include requests in a little script to ping a server from a machine that doesn't come with pip (or much of anything, really) installed. I'm running into problems outputting a pex file that depends on a local script.

Re: Pex import problems

2014-10-21 Thread Sam Raker
On Tuesday, October 21, 2014 12:05:00 PM UTC-4, Chris Angelico wrote: > On Wed, Oct 22, 2014 at 2:34 AM, Sam Raker wrote: > > > (Also: anyone who's planning on chewing me out about formatting: I TRIED > > posting by email to comp.lang.pyt...@googlegroups.com, but it woul

Pex import problems

2014-10-21 Thread Sam Raker
Hi all, I'm trying to use Pex (http://pex.readthedocs.org/en/latest/index.html) to include requests in a little script to ping a server from a machine that doesn't come with pip (or much of anything, really) installed. I'm running into problems outputting a pex file that depends on a local scrip

Re: Storing instances using jsonpickle

2014-09-03 Thread Sam Raker
1) There are, if you want to mess around with them, ways to make pickle "smarter" about class stuff: https://docs.python.org/2/library/pickle.html#pickling-and-unpickling-normal-class-instances . I've never worked with any of this stuff (and people don't seem to like pickle all that much), and

Re: GO vs Python

2014-08-24 Thread Sam Fourman Jr.
On Sun, Aug 24, 2014 at 10:07 PM, Chris Angelico wrote: > On Mon, Aug 25, 2014 at 12:57 PM, Sam Fourman Jr. > wrote: > > my initial reason for even looking at GO, was because, I noticed that if > I > > wanted to move my largest clients app from Python 2.x to 3.x it was &

Re: GO vs Python

2014-08-24 Thread Sam Fourman Jr.
3.x, they dropped the ball. -- Sam Fourman Jr. -- https://mail.python.org/mailman/listinfo/python-list

Can tuples be replaced with lists all the time?

2014-02-22 Thread Sam
My understanding of Python tuples is that they are like immutable lists. If this is the cause, why can't we replace tuples with lists all the time (just don't reassign the lists)? Correct me if I am wrong. -- https://mail.python.org/mailman/listinfo/python-list

Can global variable be passed into Python function?

2014-02-20 Thread Sam
I need to pass a global variable into a python function. However, the global variable does not seem to be assigned after the function ends. Is it because parameters are not passed by reference? How can I get function parameters to be passed by reference in Python? -- https://mail.python.org/mai

Can one use Python to learn and even apply Functional Programming?

2014-02-15 Thread Sam
I would like to learn and try out functional programming (FP). I love Python and would like to use it to try FP. Some have advised me to use Haskell instead because Python is not a good language for FP. I am sort of confused at the moment. Is Python a dysfunctional programming language to apply

Best practices to overcome python's dynamic data type nature

2014-02-14 Thread Sam
Dynamic data type has pros and cons. It is easier to program but also easier to create bugs. What are the best practices to reduce bugs caused by Python's dynamic data-type characteristic? Can the experienced Python programmers here advise? Thank you. -- https://mail.python.org/mailman/listinf

What are the kinds of software that are not advisable to be developed using Python?

2014-02-08 Thread Sam
I got to know about Python a few months ago and today, I want to develop only using Python because of its code readability. This is not a healthy bias. To play my own devil's advocate, I have a question. What are the kinds of software that are not advisable to be developed using Python? -- http

What does """ means in python?

2014-02-08 Thread Sam
For string, one uses "" to represent string. Below is a code fragment that uses """ instead. cursor.execute("""SELECT name, phone_number FROM coworkers WHERE name=%s AND clue > %s LIMIT 5""", (name, clue_th

What is the recommended python module for SQL database access?

2014-02-08 Thread Sam
Is MySQLdb the recommended python module for SQL database access? Are there other modules? What I want in a module is to be able to write readable and maintainable code. -- https://mail.python.org/mailman/listinfo/python-list

Why use _mysql module and not use MySQLdb directly?

2014-02-08 Thread Sam
I am writing my first python script to access MySQL database. With reference to http://mysql-python.sourceforge.net/MySQLdb.html#connection-objects Why is it advisable to use _mysql and not MySQLdb module directly? -- https://mail.python.org/mailman/listinfo/python-list

Re: python and matlab

2014-02-06 Thread Sam Adams
On Thursday, February 6, 2014 8:55:09 AM UTC-5, Sturla Molden wrote: > Sam wrote: > > > is it able to utilize functions written in Python in Matlab? > > > > Yes, if you embed the Python interpreter in a MEX-file. Thanks Sturla, could you please explain in more det

python and matlab

2014-02-06 Thread Sam
is it able to utilize functions written in Python in Matlab? -- https://mail.python.org/mailman/listinfo/python-list

Re: Process datafeed in one MySql table and output to another MySql table

2014-01-17 Thread Sam
On Friday, January 17, 2014 10:07:58 AM UTC+8, Denis McMahon wrote: > On Thu, 16 Jan 2014 17:03:24 -0800, Sam wrote: > > > > > I have a datafeed which is constantly sent to a MySql table ... > > > > > Which are the python libraries which are suitable for t

Process datafeed in one MySql table and output to another MySql table

2014-01-16 Thread Sam
I have a datafeed which is constantly sent to a MySql table. The table grows constantly as the data feeds in. I would like to write a python script which process the data in this table and output the processed data to another table in another MySql database in real-time. Which are the python li

Compiling main script into .pyc

2014-01-16 Thread Sam
One thing I observe about python byte-code compiling is that the main script does not gets compiled into .pyc. Only imported modules are compiled into .pyc. May I know how can I compile the main script into .pyc? It is to inconvenience potential copy-cats. -- https://mail.python.org/mailman/li

Is it possible to protect python source code by compiling it to .pyc or .pyo?

2014-01-16 Thread Sam
I would like to protect my python source code. It need not be foolproof as long as it adds inconvenience to pirates. Is it possible to protect python source code by compiling it to .pyc or .pyo? Does .pyo offer better protection? -- https://mail.python.org/mailman/listinfo/python-list

Building and accessing an array of dictionaries

2014-01-16 Thread Sam
I would like to build an array of dictionaries. Most of the dictionary example on the net are for single dictionary. dict = {'a':'a','b':'b','c':'c'} dict2 = {'a':'a','b':'b','c':'c'} dict3 = {'a':'a','b':'b','c':'c'} arr = (dict,dict2,dict3) What is the syntax to access the value of dict3->'a'

Is it better to import python modules inside function or at the top? What are the pros and cons?

2014-01-11 Thread Sam
I have python modules which are used only in specific functions and the functions are not called all the time. Is it better to import the function inside the function only or is it a better practice to always import all modules at the top of the script? If I import the module inside the function

Re: How to get Mac address of ethernet port?

2014-01-11 Thread Sam
On Sunday, January 12, 2014 12:34:35 AM UTC+8, Michael Torrie wrote: > On 01/11/2014 07:35 AM, Andriy Kornatskyy wrote: > > > On Linux you could access the /sys/devices/virtual/net/ > > file in the sysfs filesystem. I'm sure there are other ways. > Thank you to everyone for the helpful answer

How to get Mac address of ethernet port?

2014-01-11 Thread Sam
I would like to use python to retrieve the mac address of the ethernet port. Can this be done? Thank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: basic maze problem with turtle

2013-10-14 Thread Sam Fourman Jr.
o/python-list> > Who the hell is Nikos? I hear reference to this guy ALL the time, is he a troll or a python god? this simply isn't clear.. I have only been on this list a few months. -- Sam Fourman Jr. -- https://mail.python.org/mailman/listinfo/python-list

Re for Apache log file format

2013-10-08 Thread Sam Giraffe
Hi, I am trying to split up the re pattern for Apache log file format and seem to be having some trouble in getting Python to understand multi-line pattern: #!/usr/bin/python import re #this is a single line string = '192.168.122.3 - - [29/Sep/2013:03:52:33 -0700] "GET / HTTP/1.0" 302 276 "-" "

Hostrange expansion

2013-09-27 Thread Sam Giraffe
Hi, I need some help in expanding a hostrange as in: h[1-100].domain.com should get expanded into a list containing h1.domain.com to h100.domain.com. Is there a library that can do this for me? I also need to valid the range before I expand it, i.e., h[1*100].domain.com should not be accept, or ot

Print statement not printing as it suppose to

2013-09-20 Thread Sam
hi everybody i am just starting to learn python, i was writing a simple i/o program but my print statement is acting weird. here is my code i want to know why it prints this way. thank you car=int(input("Lamborghini tune-up:")) rent=int(input('\nManhatan apartment: ')) gifts=int(input('\nRand

Re: Moving to Python for web

2013-08-29 Thread Sam Fourman Jr.
python bindings :) there are MANY micro frameworks, I have been following these guys for a few years http://www.pocoo.org/ specifically jinja2 and flask looks to be the best choice out of all the options out there -- Sam Fourman Jr. -- http://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-08-29 Thread Sam Fourman Jr.
on and don't put? > > Yours, > Mohsen I totally understand where you are coming from, but I have found that the thing I can't get used to is the "indent thing" Python is a great language, but I always secretly find myself wishing I could somehow use python, an

Re: Having troubles with list methods

2013-08-01 Thread Sam Whitehead
Your indentation is such that the first print statement is the only thing inside the while loop. -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Sam Whitehead
I find myself doing this a lot with libraries whose documentation encourages an understanding based on intuition, rather than one based on formal concepts. When doing more 'pure' stuff with mostly the standard library, not so much. Most imperative languages let their users get kind of loose wit

Re: Question about pickle

2013-06-26 Thread Phu Sam
f.seek(0) really does the trick. Danke sehr, Phu On Tue, Jun 25, 2013 at 6:47 AM, Peter Otten <__pete...@web.de> wrote: > Phu Sam wrote: > > > I have a method that opens a file, lock it, pickle.load the file into a > > dictionary. > > I then modify the status

Question about pickle

2013-06-25 Thread Phu Sam
I have a method that opens a file, lock it, pickle.load the file into a dictionary. I then modify the status of a record, then pickle.dump the dictionary back to the file. The problem is that the pickle.dump never works. The file never gets updated. def updateStatus(self, fp, stn, status):

Threading within a GUI and OpenCV

2013-04-03 Thread Sam Berry
would be the way to go, or if there are alternative routes? A snippet from my code can be seen at (http://pastebin.com/9uFRjkgV) with a failed attempt of using threading! Any help would be appreciated. Thanks, Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python class and variable issue(newby question!)

2013-03-29 Thread Sam Berry
Thanks for the responses! My issue was sorted with Benjamins post, just printing s worked. Cheers for the info though Chris, if i have any further issues il post them with some working code. Sam -- http://mail.python.org/mailman/listinfo/python-list

Python class and variable issue(newby question!)

2013-03-29 Thread Sam Berry
code would be very helpful! Thanks, Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Recording live video stream from IP camera issue

2013-02-18 Thread Sam Berry
Thanks for the advice! I looked into it, seems using windows was an issue, switched to ubuntu and it worked! Just wondering if you have used opencv for recording purposes? Or if you know of any python documentation for opencv2? Information is hard to come by! Thanks again, Sam -- http

Re: Recording live video stream from IP camera issue

2013-02-17 Thread Sam Berry
IP address http://192.168.1.72:1025/videostream.cgi?user=&pwd=&resolution=8. Did you have this issue? Is there some lines of code i may need to add? Any help would be appreciated! Thanks, Sam -- http://mail.python.org/mailman/listinfo/python-list

OpenCV and WIFI IP Camera Issue

2013-02-14 Thread Sam Berry
7: # exit on ESC break When run, python tries to open the window to display the camera feed then closes before displaying the feed. Anyone have any ideas why? I read somewhere that there is an issue with this been run on windows? Any insight would be appreciated! Im all goog

Re: Recording live video stream from IP camera issue

2013-02-06 Thread Sam Berry
look into OpenCV, thanks for the help! Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Recording live video stream from IP camera issue

2013-02-06 Thread Sam Berry
20mb of a picture and then nothing. Could you give any insight into how to record an mjpeg stream? External libraries for me to consider etc? Thanks, Sam -- http://mail.python.org/mailman/listinfo/python-list

Recording live video stream from IP camera issue

2013-02-06 Thread Sam Berry
just flashes an image instead of a video file, even though the .avi file is around 20mb. Is there some extra lines of code i need to include or change? Perhaps a timing option instead of a file size? Any help or insight would be much appreciated!! Thanks, Sam -- http://mail.python.org/mailman/listinfo/python-list

[no subject]

2012-03-10 Thread Sam Sam
How to change the color of source browser in DrPython? -- http://mail.python.org/mailman/listinfo/python-list

Re: Masking a dist package with a copy in my own package

2012-01-21 Thread Sam Simmons
I just installed 2.7... should have done this a while ago. pip finally works! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Masking a dist package with a copy in my own package

2012-01-20 Thread Sam Simmons
Hey all, I'm using twisted in a project and have run into a class that's in version 11.1 but not 8.2 in OSX. I was thinking to get it working for mac users I could just extract the 11.1 twisted package and through it under my package. e.g. project/ __init__.py twisted/ __init__.py ...

ukhomemadescandals

2010-10-11 Thread sam
due to high pornography i have hidden the video in the website. left side below search box click the image and watch all video..http://ukhomemadescandals.tk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI python 3 write RAW BINARY

2010-05-21 Thread sam
On May 7, 7:33 am, Dodo wrote: > Le 01/05/2010 12:52, Dodo a écrit : > > > > > > > Le 30/04/2010 17:52, Antoine Pitrou a écrit : > >> Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : > >>> I don't get a thing. > >>> Now with the fix : > >>> All browsers shows a different thing, but not the i

------->>>FREE MAC<<<-------

2010-03-21 Thread sam
http://michellemichaeldiscounts.com/16801.html -- http://mail.python.org/mailman/listinfo/python-list

[ANN] onlinepayment v1.0.0 released

2010-03-21 Thread Sam Tregar
onlinepayment v1.0.0 - a generic Python API for making online payments This module provides an API wrapper around a variety of payment providers. Using this module you can write code that will work the same regardless of the payment provider in use. Examples:: from onlinepayment import Onlin

  1   2   3   4   >